Maven can't find artefact from Nexus
We have an Atlassian Bamboo instance building and deploying our projects (snapshots) to Nexus, around 11:20 pm every day. Another Bamboo instance runs a test plan A at midnight and fails because it can't find an artefact from Nexus (although it's looking in the right repositories), artefact that was built by the other Bamboo instance and is actually in Nexus. A test plan B starts around 00:30 on the same instance and this one finds the artefact. In the morning, when I manually launch the plan A, it works well. So I suspect a cache/metadata issue, but I couldn't figure out what is the right configuration to set, either in Nexus or in the Maven settings. It's running Maven 2.2.1. Other plans running Maven 3.0.5 for a different version of our project don't seem to have the problem. Nexus is 2.7.2-03. The error is "2 required artifacts are missing." and the list of Nexus groups in "from the specified remote repositories:" is the right one. Those groups are configured like that in the project's pom: <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> Any idea about how to fix this issue? Thank you!
Best practices we've identified for moving Maven 2 builds to Maven 3: 1) All of the builders (individual users running builds on personal machines plus Jenkins/CI) should be converted at the same time. In other words, once the POM for an artifact has been adjusted as needed and the built artifact deployed to the remote repository with Maven 3, then Maven 2 should not be used to build that same artifact ever again. This is because Maven 3 uses timestamped snapshots, while Maven 2 does not. Also, Maven 2 and Maven 3 handle dependency resolution and repository metadata differently. Mixing the two doesn't work well. One symptom is someone commits changes, builds, and deploys to the remote repo with Maven 3, then another developer tries to download the changed jar with Maven 2 and gets the old one. The team may prevent the artifacts from being built with Maven 2 using the Enforcer plugin. 2) All builders should clean out their local artifact repositories. Maven 2 and Maven 3 handle dependency resolution and repository metadata differently, and a fresh repository insulates the developer from strange, hard to find problems. (Since Maven will then have to download the world on the first build, consider doing the first Maven 3 build before you go to lunch or leave work for the day.) 3) Someone with delete privileges on the remote repository (e.g. Nexus, Artifactory) should log into the remote repo, find the artifact(s) in the Snapshots repository and delete the snapshot version during which the Maven 2 to 3 migration occurred. For example, say that the team is working on 2.0-SNAPSHOT, and there's a task to move from Maven 2 to 3 for this version. When the POM changes for the task are complete, the developer logs into the remote repo, finds com.company.some-group:myArtifact(s), and removes the 2.0-SNAPSHOT version entirely. This will remove all snapshots built by Maven 2.
Spring Boot Deployment on Tomcat7 and Log4 issue
I have issues to create a second jar artifact with Maven jar plugin
Maven 3.3 doesn't verify parent artifact version
Maven Goal(s) Failing to Execute
Maven - dynamically creating a map, and referring to it
How to create Maven Jar file when tests contain JUnit #Test annotations and no main class
How to determine when cmds in docker exec complete
Only 1 test class is running and TestNG execution hangs
Zip file empty using maven assembly plugin in pom
Jenkins deploying artifacts to Artifactory. maven-metadata.xml shows incorrect version for release and does not show versions for snapshot
How to restore artifacts in Jenkins multibranch job?
How to get the currently processed dependencys artefactid during process-resources
how do I get maven to tell me what jar it would build without building it?
1.0.0-SNAPSHOT in two Nexus repositories of one group
Failure to find org.jenkins-ci.plugins:plugin:pom:2.11 in https://repo.maven.apache.org/maven2
Cobertura wrong coverage reporting issues