maven dependency versionioning issue - maven

I am trying to add the dependency as below to use the version mentioned or the latest.I am expecting maven to take the dependencies with version >= 0.0.1 but maven is failing to resolve the dependencies.If i mention the exact version the dependencies are getting downloaded.
Iam using maven 3.5
<dependency>
<groupId>com.company.esb.fuse</groupId>
<artifactId>common</artifactId>
<version>[0.0.1,)</version>
<scope>provided</scope>
</dependency>
maven logs:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building source out Write 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.401 s
[INFO] Finished at: 2018-01-22T17:26:21+01:00
[INFO] Final Memory: 14M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project source: Could not resolve dependencies for project com.company.esb.source.out:source:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.company.esb.fuse:common:jar:[0.0.1,): No versions available for com.company.esb.fuse:common:jar:[0.0.1,) within specified range -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Above details are not sufficient to determine the exact problem. But according to your maven logs,
No versions available for com.company.esb.fuse:common:jar:[0.0.1,)
Note that it says com.company, not com.compant as you typed in this question.
check your pom.xml first and put correct groupId.
If you are still getting the same error, check your local .m2 folder and confirm that you have at least one artifact with a version which is in the declared range.
UPDATE : the error may be in the maven-metadata file. check maven-metadata-local.xml file placed inside .m2/repository/com/company/esb/fuse/common. All versions should be there under <versions> tag.

Related

Maven Build Failure due Plugin Dependency

I've read the following previous answers to similar topics, but none have worked for me.
Here is what I've tried:
Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved
Maven Build Failure - failure to find plugins
The first link doesn't really apply because I'm not using a proxy, but I did check the settings.xml file for other possibilities. I can download directly by going to the plugin .jar file.
The second link might apply, but I have no idea what they mean by: "change user settings to point out to correct settings.xml and to your repository folder should exist in your system." I don't know how to do this and am not sure which repository they are referring to and how I find out. I'm looking only at my Maven settings.xml file.
So here's my errors
C:\cas-overlay-template-master>mvn package install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cas-overlay 1.0
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.3/maven-compiler-plugin-3.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.965 s
[INFO] Finished at: 2017-03-21T23:42:13-04:00
[INFO] Final Memory: 7M/97M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:3.3 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:jar:3.3 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
My goal is to get CAS 5.0.4 working for a Liferay 7.0ga3, running Tomcat 8, JDK 1.8, and Maven 3. I am a student, have never used any of these technologies except JDK 1.8, so I really need very understandable answers. Not veteran answers for those that should know what they are doing. Thanks
The actual problem here is around the certificates the Maven JVM is trusting:
Unexpected error: java.security.InvalidAlgorithmParameterException:
the trustAnchors parameter must be non-empty
Various things can fix it, but this question has a lot of solutions (and one more here).

no dependency infomation available when building a project throung maven

Project source: https://github.com/parallaxinc/BlocklyProp
I'm trying to deploy it to a local server. after I cloned it and run "mvn package", error occurs.
root#ubuntu:/home/tinywind/BlocklyProp-master# mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building BlocklyProp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.parallax.client:Cloud-Session-java-client:jar:1.0-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for com.parallax.client:Cloud-Compiler-java-client:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.946 s
[INFO] Finished at: 2017-02-23T17:55:12-08:00
[INFO] Final Memory: 9M/31M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project BlocklyProp: Could not resolve dependencies for project com.parallax:BlocklyProp:war:1.0-SNAPSHOT: The following artifacts could not be resolved: com.parallax.client:Cloud-Session-java-client:jar:1.0-SNAPSHOT, com.parallax.client:Cloud-Compiler-java-client:jar:1.0-SNAPSHOT: Failure to find com.parallax.client:Cloud-Session-java-client:jar:1.0-SNAPSHOT in http://bits.netbeans.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of netbeans.maven2.repository has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Is there any solution or suggestion, I am a PHP developer, this is my first time to deploy a java application to server.

Failure to find com.oracle.state-management:state-management-parent:pom:1.0.0-SNAPSHOT

I can't remember what I did to cause this problem. When I try to run mvn clean install, I get the following output:
mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building search Maven Webapp 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.slf4j:slf4j-api:jar:12.1.2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.895 s
[INFO] Finished at: 2014-05-29T21:55:34+02:00
[INFO] Final Memory: 6M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project search: Could not resolve dependencies for project com.ws:search:war:1.0: Failed to collect dependencies at com.oracle.weblogic:weblogic-server-pom:pom:12.1.2-0-0 -> com.oracle.weblogic:com.oracle.state-management.e
xecutor-internal-api_12.1.2:jar:12.1.2: Failed to read artifact descriptor for com.oracle.weblogic:com.oracle.state-management.executor-internal-api_12.1.2:jar:12.1.2: Failure to find com.oracle.state-management:state-management-parent:pom:1.0.0-SNAPSHOT in http://10.68
.20.32:8081/artifactory/libs-snapshot was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
The attempt to find com.oracle.state-management.executor-internal-api_12.1.2:jar:12.1.2 (Note the version: 12.1.2) fails because it originates from the dependency com.oracle.state-management.executor-internal-api_12.1.2 (version 12.1.2 too) while this dependency's pom has the following portion:
<parent>
<artifactId>state-management-parent</artifactId>
<groupId>com.oracle.state-management</groupId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
What surprises me is that there is another version for this dependency (com.oracle.state-management.executor-internal-api_12.1.2) which is 12.1.2-0-0, I believe that this is the right version to refer to, not 12.1.2
What I think supports my assumption is that the output mentions that it failed to find sfl4j dependency with the version 12.1.2 !!
[WARNING] The POM for org.slf4j:slf4j-api:jar:12.1.2 is missing, no dependency information available
I refer to weblogic's dependency this way
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-server-pom</artifactId>
<version>12.1.2-0-0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
How can I fix that ?
For some unearthly reason, weblogic's dependency
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-server-pom</artifactId>
<version>12.1.2-0-0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
had the following version for it's dependencies
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>[12.1.2,12.1.3)</version>
</dependency>
To resolve this, I replaced all [12.1.2,12.1.3) occurrences with 12.1.2-0-0 and now I can install my project again.
I would really appreciate it if someone tells me why was the POM generated this way ?!

Building Hadoop with Maven Error

When I try to build hadoop using:
mvn install -e -DskipTests
It always throw the following error:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/xiu/myGit/hadoop2/hadoop-mr1-project/hadoop-mr1/src/test/java/org/apache/hadoop/mapreduce/security/TestTokenCache.java:[153,4] getDelegationTokenSecretManager() is not public in org.apache.hadoop.hdfs.server.namenode.FSNamesystem; cannot be accessed from outside package
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop MR1 ................................. FAILURE [3.144s]
[INFO] Apache Hadoop MR1 Examples ........................ SKIPPED
[INFO] Apache Hadoop MR1 Project ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.353s
[INFO] Finished at: Thu Jul 18 11:01:30 PDT 2013
[INFO] Final Memory: 32M/100M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project hadoop-mr1: Compilation failure
[ERROR] /home/xiu/myGit/hadoop2/hadoop-mr1-project/hadoop-mr1/src/test/java/org/apache/hadoop/mapreduce/security/TestTokenCache.java:[153,4] getDelegationTokenSecretManager() is not public in org.apache.hadoop.hdfs.server.namenode.FSNamesystem; cannot be accessed from outside package
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I have tried clean and reinstall different versions of maven with no luck. Any expert knows what is going on here?
I came across same problem during hadoop 2.2.0 source code building. During "mvn install -DskipTests" this error came in "Hadoop Auth" Folder.
From somewhere(i dont remember from where) i came to know that there is one missing dependency in pom.xml of this Hadoop Auth folder
dependency is
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>test</scope>
</dependency>
I added this dependency and again tried "mvn install -DskipTests". My error resolved.
You just try to add this dependency in pom.xml of "APACHE Hadoop MR1". May ur error will resolve
Seems like Maven compiler plugin complaining that getDelegationTokenSecretManager() method in Hadoop FSNameSystem is not accessible due to method visibility i.e. it's not public:
[ERROR] /home/xiu/myGit/hadoop2/hadoop-mr1-project/hadoop-mr1/src/test/java/org/apache/hadoop/mapreduce/security/TestTokenCache.java:[153,4] getDelegationTokenSecretManager() is not public in org.apache.hadoop.hdfs.server.namenode.FSNamesystem; cannot be accessed from outside package
[INFO] 1 error
I would suggest you to check on your Hadoop version defined in your pom.xml, and double check that the method is really accessible in the Hadoop version JavaDoc.

build failure in dyn.js

Today I tried to build dyn.js from source with the instructions on https://github.com/dynjs/dynjs.
I tried it on Windows 7 and Linux (Fedora), but on both systems the build fails.
This is what i get:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building dynjs 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.projectodd.rephract:rephract:jar:1.x.incremental.39 is missing, no dependency information available
[WARNING] The POM for org.jboss.jreadline:jreadline:jar:0.20.incremental.2 is missing, no dependency information available
[WARNING] The POM for org.jruby.joni:joni:jar:1.1.10.incremental.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.382s
[INFO] Finished at: Wed Mar 20 12:01:04 CET 2013
[INFO] Final Memory: 7M/109M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dynjs: Could not resolve dependencies for project org.dynjs:dynjs:jar:0.1.0-SNAPSHOT: The following artifacts could not be resolved: org.projectodd.rephract:rephract:jar:1.x.incremental.39, org.jboss.jreadline:jreadline:jar:0.20.incremental.2, org.jruby.joni:joni:jar:1.1.10.incremental.1: Failure to find org.projectodd.rephract:rephract:jar:1.x.incremental.39 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Does anyone know how to fix this or how to get a working version of dyn.js?
Thanks!
The version # for that dependency has just been updated, see here:
https://github.com/dynjs/dynjs/blob/master/pom.xml#L144
so if you pull the repo, it should fix that and here is a link to the 0.1.1 tag
https://github.com/dynjs/dynjs/tree/v0.1.1
Once the sonatype ends its maintenance, 0.1.1 should be released in central
-Luke

Resources