I've installed a fresh new Nexus Repository OSS 3.3.2-02. It has a maven-central repository pre-configured. Without changing anything I just grabbed URL for accessing this proxy repository and added it to my local M2 settings.
When I try building some project, my dependencies are correctly fetched and project built. Here is a look of maven client logs:
[INFO] ------------------------------------------------------------------------
[INFO] Building jiraBootcamp 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.atlassian.jira:jira-api:jar:7.2.2 is missing, no dependency information available
[WARNING] The POM for com.atlassian.plugin:atlassian-spring-scanner-annotation:jar:2.1.1 is missing, no dependency information available
[WARNING] The POM for com.atlassian.activeobjects:activeobjects-plugin:jar:1.2.3 is missing, no dependency information available
[WARNING] The POM for com.atlassian.plugins.rest:atlassian-rest-common:jar:1.0.2 is missing, no dependency information available
[WARNING] The POM for com.atlassian.sal:sal-api:jar:2.6.0 is missing, no dependency information available
Downloading: https://devtools.morosystems.cz/nexus/repository/maven-central/org/projectlombok/lombok/1.16.4/lombok-1.16.4.pom
Downloading: http://repo.maven.apache.org/maven2/org/projectlombok/lombok/1.16.4/lombok-1.16.4.pom
Downloaded: http://repo.maven.apache.org/maven2/org/projectlombok/lombok/1.16.4/lombok-1.16.4.pom (2 KB at 10.5 KB/sec)
The problem is that when I browse Nexus UI I would expect Lombok library to be:
present in Components/Assets view,
searchable.
However, this is not working as the views are empty and search finds nothing.
Please, can you help me find what is wrong? It is the first time I configure Nexus OSS 3 so solution may be very simple.
Thank you very much!
Your maven log shows that the component wasn't downloaded from Nexus:
Downloading: http://repo.maven.apache.org/maven2/org/projectlombok/lombok/1.16.4/lombok-1.16.4.pom
Set up Nexus as a mirror of all repositories in Maven as outlined here:
http://books.sonatype.com/nexus-book/reference3/maven.html#maven-sect-single-group
That will prevent Maven from accessing repositories other than Nexus.
Related
I have strange behavior with maven. During my build, the download of the json-smart metadata component (the only artifact that seems to be affected by this problem) loops without ever stopping.
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< fr.project:myProject >----------------
[INFO] Building Ned MyProject 1.8.2
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from nexus: http://mynexus/repository/maven-public/net/minidev/json-smart/maven-metadata.xml
If I pour central maven repo directly it's OK but if I use our Nexus, the problem is still there.
I check certificat, they are OK I check nexus log, there is nothing
about this download Maven Log in debug show nothing elses (just this
final command)
I have use -U and udpatePolicy command in maven setting but nothing (When maven says "resolution will not be reattempted until the update interval of MyRepo has elapsed", where is that interval specified?)
I have clean all json-smart artifact form maven-central repo of our
nexus and task a clean metadata but nothing(Remove artifacts from Nexus repository and how to force sonatype nexus 3 to recreate maven-metadata.xml for maven repository?)
I have no other ideas, has anyone as one ?
Apache Maven 3.6.3
Java version: 11.0.3, vendor: Oracle Corporation
Nexus : 3.6.0-02
We found the solution but no explication on the real problem.
metadata of our json-smart artefact were corrupted on our Nexus and block download from maven. I have delete all composant, invalidate cache of the repository and rebuilt the index and it's seem resolve the problem.
I have a mavenized Mule project in MuleStudio. When I try to package using maven it starts downloading some EE jar files from http://dev.ee.mulesource.com/repository/...
I have no EE dependencies in my POM.xml.
Why is maven trying to download these dependencies?
Maven is just pulling pom files only (and not related jar files). Why ?
Downloading: http://dev.ee.mulesource.com/repository/content/repositories/releas
es/com/ibm/icu/icu4j-normalizer_transliterator/4.8.1.1/icu4j-normalizer_translit
erator-4.8.1.1.pom
Downloading: http://dev.ee.mulesource.com/repository/content/repositories/snapsh
ots/com/ibm/icu/icu4j-normalizer_transliterator/4.8.1.1/icu4j-normalizer_transli
terator-4.8.1.1.pom
Downloading: http://dev.ee.mulesource.com/repository/content/repositories/ext-re
leases/com/ibm/icu/icu4j-normalizer_transliterator/4.8.1.1/icu4j-normalizer_tran
sliterator-4.8.1.1.pom
Downloading: https://repository-lsi.forge.cloudbees.com/release/com/googlecode/s
ardine/sardine/248/sardine-248.pom
Downloading: http://dev.ee.mulesource.com/repository/content/repositories/releas
es/com/googlecode/sardine/sardine/248/sardine-248.pom
Downloading: http://dev.ee.mulesource.com/repository/content/repositories/snapsh
ots/com/googlecode/sardine/sardine/248/sardine-248.pom
These are DataMapper dependencies. To use it you need an enterprise edition license.
If you have purchased a subscription you can get access to MuleSoft's Enterprise Edition (EE) Nexus repository, otherwise simply remove the datamapper dependency and the clover-etl one from your pom.
I'm trying to integrate the Atlassian Clover plugin to work with my existing Maven 3 project. I'm also using Nexus 2.6.3. e.g.
mvn clover2:setup test clover2:aggregate clover2:clover
produces the error:
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.2.0:instrumentInternal (default-cli) on project hpcmom: Execution default-cli of goal com.atlassian.maven.plugins:maven-clover2-plugin:3.2.0:instrumentInternal failed: Plugin com.atlassian.maven.plugins:maven-clover2-plugin:3.2.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.ant:ant:jar:1.8.4, com.cenqua.clover:clover:jar:3.2.0: Could not find artifact org.apache.ant:ant:jar:1.8.4 in nexus (http://olympus:8081/nexus/content/groups/public) -> [Help 1]
And this is not true, I can see and download manually the supposedly missing artifacts org.apache.ant:ant:jar:1.8.4 correctly in Central and even from the Remote repository tab view I can also find the needed artifacts.
My build also results in the following errors:
Downloading: http://olympus:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-compiler-api/2.2/plexus-compiler-api-2.2.pom
[WARNING] The POM for org.codehaus.plexus:plexus-compiler-api:jar:2.2 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/org/apache/ant/ant/1.8.4/ant-1.8.4.pom
[WARNING] The POM for org.apache.ant:ant:jar:1.8.4 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/org/apache/ant/ant-launcher/1.8.4/ant-launcher-1.8.4.pom
[WARNING] The POM for org.apache.ant:ant-launcher:jar:1.8.4 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/org/apache/maven/reporting/maven-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.pom
[WARNING] The POM for org.apache.maven.reporting:maven-reporting-impl:jar:2.0.5 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/com/cenqua/clover/clover/3.2.0/clover-3.2.0.pom
[WARNING] The POM for com.cenqua.clover:clover:jar:3.2.0 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/com/intellij/annotations/9.0.4/annotations-9.0.4.pom
[WARNING] The POM for com.intellij:annotations:jar:9.0.4 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/org/apache/ant/ant/1.8.4/ant-1.8.4.jar
Downloading: http://olympus:8081/nexus/content/groups/public/com/cenqua/clover/clover/3.2.0/clover-3.2.0.jar
Make sure the Central repository is part of your public group. Check out the configuration and potentially check by browsing the remote repo from within Nexus to make sure no network issue prevents Nexus from connecting to the Central repo to download these jars.
Once you have confirmed force an update since Maven might have cached the fact that components were not found in your local repo. Use
mvn -U clover2:setup test clover2:aggregate clover2:clover
I have been trying to follow the tutorial here: https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
I have spent about 7 hours on this now and finally decided to just ask and hope for a response.
I haven't edited the pom file at all from the create command. I am pretty sure I have my settings file correct. When I try to run or package the project though I get this:
[WARNING] The POM for org.apache.maven.surefire:surefire-booter:jar:2.9 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.surefire:maven-surefire-common:jar:2.9 is missing, no dependency information available
[WARNING] The POM for org.apache.maven:maven-toolchain:jar:2.0.9 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.260s
[INFO] Finished at: Tue Jan 29 16:07:56 EST 2013
[INFO] Final Memory: 41M/387M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) on project helloworld: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.9:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.9 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.surefire:surefire-booter:jar:2.9, org.apache.maven.surefire:maven-surefire-common:jar:2.9, org.codehaus.plexus:plexus-utils:jar:2.1: Failure to find org.apache.maven.surefire:surefire-booter:jar:2.9 in http://repo.jenkins-ci.org/public/ was cached in the local repository, resolution will not be reattempted until the update interval of repo.jenkins-ci.org has elapsed or updates are forced ->
So I am assuming that it is supposed to be downloading these 3 jar files from the repositories I set up in the settings file... but it isn't. Is there any reason this would happen? Anything I can do to make it download these files? Or is it downloading them I am just not referencing them correctly somewhere? I'm pretty new to this so i could be completely off.
If it helps I have maven 3.0.4 and jdk 1.7.0_02. Everything else I have pretty much copy and pasted from the tutorial I think. Any help would be greatly appreciated!
Something went probably wrong when you attempted to get the artefacts the first time, and now you are stuck because of a nasty maven bug. Maven might have created an empty folder in your local repository (.m2) and now thinks you already have the dependency. So you should check if this is what happened and, if so, deleted the folder.
See my answer here :
Compiler error "archive for required library could not be read" - Spring Tool Suite
And you can also check why there was a problem in the first place. Do you access the following url with your browser ?
http://repo.jenkins-ci.org/public/org/apache/maven/surefire/surefire-booter/2.9/
I am trying to download a specific artifact (and all of its dependencies) to a machine's local repository.
It would seem that using the dependency:get goal would be the best option for this, but despite the documentation it does not seem to actually get the transitive dependencies.
Here is an example where I have tried to use dependency:get to download the spring-core jar and all of its many dependencies. You'll notice that the spring-core jar is the only thing downloaded despite the fact that this was done after cleaning the local repository.
$ mvn org.apache.maven.plugins:maven-dependency-plugin:2.2:get -DrepoUrl=http://repo1.maven.org/maven2/ -Dartifact=org.springframework:spring-core:3.0.5.RELEASE -Dtransitive=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.2:get (default-cli) # standalone-pom ---
Downloading: http://repo1.maven.org/maven2/org/springframework/spring-core/3.0.5.RELEASE/spring-core-3.0.5.RELEASE.jar
Downloaded: http://repo1.maven.org/maven2/org/springframework/spring-core/3.0.5.RELEASE/spring-core-3.0.5.RELEASE.jar (374 KB at 548.4 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.401s
[INFO] Finished at: Wed May 25 00:29:47 CDT 2011
[INFO] Final Memory: 7M/107M
[INFO] ------------------------------------------------------------------------
My questions are:
Is this a bug with the dependency:get goal?
If not, what am I doing wrong?
Are there any alternatives methods I could use to accomplish my initially stated goal?
If this is a one time or irregular occurrence for you, The simplest thing to do would be to define the dependency in a POM and run mvn package or similar to retrieve the dependency artifacts. You could also try mvn dependency:sources if you'd like to have the source jars too.
If this is something you want to do more regularly or as part of a process, you could look at using Aether directly to retrieve the dependencies for you.
Another approach if this is something you need to do regularly to manage groups of artifacts into your internal development ecosystem is to use Nexus' procurement suite to retrieve the dependencies and manage them into your repository.
You might can go with this solution
1) Download the artifact as you described (I tested with version 2.5.2)
c:\test>mvn -DrepoUrl=http://repo1.maven.org/maven2/ -Dartifact=org.springframework:spring-core:2.5.2 -Dtransitive=true
2) Download the pom (-Dpackaging=pom) of this artifact
c:\test>mvn -DrepoUrl=http://repo1.maven.org/maven2/ -Dartifact=org.springframework:spring-core:2.5.2 -Dtransitive=true -Dpackaging=pom org.apache.maven.plugins:maven-dependency-plugin:2.2:get
3) Use the downloaded pom to copy all dependencies via the dependency:copy-dependency gaol
c:\test>mvn -DoutputDirectory=C:/test/dependency -f C:/<path-to-repository>/org/springframework/spring-core/2.5.2/spring-core-2.5.2.pom dependency:copy-dependencies
You will find the dependencies (including test and optional scope!) in the created c:\test\dependency folder. To exclude test and optional scope use -DincludeScope=runtime.
You need to dynamically build some path information (e.g. path to the pom in your repository) to set up this solution and also need to bring the artifact itself together with its dependencies but it should work in a script without generating a special pom (which might be easier).
It would appear the answer to question #1 (Is this a bug with the dependency:get goal?) is yes. As of 5/25/2011 issue MDEP-308 is still unresolved.