I'm trying to use maven to get the dependency below and intellij is saying that it's not found and I can't figure out why, there doesn't seem to be anything on google. The dependency is listed in the maven website here so I know it exists. Any help would be appreciated!
<!-- https://mvnrepository.com/artifact/com.github.docker-java/docker-java -->
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>3.2.7</version>
</dependency>
Related
I unable to import Java jwt 3.10.0. in my spring project. Actually I was trying before version 3.15.0 but it was giving me an error in pom.xml
"Dependency 'com.auth0:java-jwt:3.15.0' not found"
anyway I then move with version 3.10.0 which is accepted in pom.xml, but it doesn't importing in project, although I've many updated Maven, restart Intellj.
Grateful if anyone can advise.
Dependency in pom.xml
<!-- https://mvnrepository.com/artifact/com.auth0/java-jwt -->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.10.0</version>
</dependency>
I have trouble running bimserver on eclipse.
I started by cloning the repo, then import it, from there I can't overcome this error : Execution add-source of goal org.codehaus.mojo:build-helper-maven-plugin:1.10:add-source failed: Plugin org.codehaus.mojo:build-helper-maven-plugin:1.10.
I am relatively new to maven, so hope to find a solution for this.
Add bimserver as dependency on your pom.xml
<dependencies>
<!-- https://mvnrepository.com/artifact/org.opensourcebim/bimserver -->
<dependency>
<groupId>org.opensourcebim</groupId>
<artifactId>bimserver</artifactId>
<version>1.5.21</version>
</dependency>
</dependencies>
I have spring project setup on Intellij Idea 2016.2 using Maven. For some reason I cannot import or use any class present in ch.qos.logback.classic package. I tried to invalidate cache, re-import maven dependencies.
For example with
import ch.qos.logback.classic.Level;
the IDE says 'cannot resolve symbol Level'. When compiling from command line it says 'package ch.qos.logback.classic does not exist'. Any suggestion what might be wrong?
Update - found the issue. I had set dependency scope to compile. Updating this fixed the issue.
Have you added the ch.qos.logback:logback-classic Maven artifact in your dependencies?
You should have something like that in your pom :
<dependencies>
...
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
</dependency>
...
<dependencies>
Can anyone tell me please what's wrong with my dependency Hamcrest in Maven?
That's a pity but I can't attach screenshot here.
The screenshot from IntelliJ IDEA
One the right side one can see that the dependency hamcrest-all:1.3 is inside dependency junit:4.11.
Maybe something wrong with my pom.xml file?
There is also a problem with hamcrest version 1.3 - dependency hamcrest:hamcrest-all:1.3 not found.
When I try to update Maven indices, nothing happens.
There is a slight difference between the group ids. Notice in the maven repository group id is org.hamcrest
http://mvnrepository.com/artifact/org.hamcrest/hamcrest-all/1.3
Sometimes, not specifying the dependency's version can give this Error
Unresolved Dependency
just specify the version of the dependency
example:
instead of this:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
use this:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
<version>3.1.2</version>
</dependency>
Getting the following error. The problem is it happens intermittently when we restart our server. Sometimes the error comes and sometimes not. How to resolve this? I am using maven.
java.lang.NoSuchMethodError: org.hsqldb.DatabaseURL.parseURL(Ljava/lang/String;ZZ)Lorg/hsqldb/persist/HsqlProperties;
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoSuchMethodError: org.hsqldb.DatabaseURL.parseURL(Ljava/lang/String;ZZ)Lorg/hsqldb/persist/HsqlProperties;
Edit: It's not working. Old version is coming from hadoop-client:2.0.0-mr1-cdh4.2.0. I excluded hsqldb from this and checked in dependency tree and the old version is not showing up. But still I am getting the error at runtime.
You almost certainly have a dependency mismatch.
Make sure you know which version of hsqldb you expect to be using.
Check the list of dependencies that are in use by the app, by that I mean the actual JAR files in the built application, not the list of maven dependencies.
Most likely you have either the wrong version of the hsqldb jar or multiple different versions (ie the right version and a wrong version).
This can be caused by unexpected transitive dependencies being pulled in
To identify where the transitive dependencies are coming from, you can use the maven dependency:tree goal:
E.g.
mvn dependency:tree -Dverbose -Dincludes=hsqldb
Where hsqldb is the name of the artifact you are looking for.
http://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-conflicts-using-the-dependency-tree.html
Oncer you have identified where the multiple versions are coming from, you can exclude from those dependencies, e.g.:
<dependency>
<groupId>sample.ProjectA</groupId>
<artifactId>Project-A</artifactId>
<version>1.0</version>
<scope>compile</scope>
<exclusions>
<exclusion> <!-- declare the exclusion here -->
<groupId>sample.ProjectB</groupId>
<artifactId>Project-B</artifactId>
</exclusion>
</exclusions>
</dependency>
More details here: http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
I had this same error, and was
I was able to get this to work using gt-epsg-wkt instead of hsql.
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-wkt</artifactId>
<version>${geotools.version}</version>
</dependency>