I have a Nexus 3 which I deploy some artifacts from Jenkins with "mvn deploy". I have A LOT of modules 500+. The build looks kind of like this:
mvn clean package -DskipTests -DskipITs -T C1
mvn install -DskipTests -DskipITs -T C1
mvn deploy --quiet -DskipTests -DskipITs -Dmaven.validate.skip=true -Dmaven.compile.skip=true -Dmaven.test.skip=true -Dmaven.package.skip=true -Dmaven.integration-test.skip=true -Dmaven.verify.skip=true -T C1
The problem is that from time to time my artifacts have a timestamp while the metadata has a different timestamp. 1 second difference usually.
This is what I see in nexus at https://mynexus.com/repository/snapshots/com/company/my-artifact/1.0.0-SNAPSHOT/maven-metadata.xml
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>com.company</groupId>
<artifactId>my-artifact</artifactId>
<version>1.0.0-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20170613.140447</timestamp>
<buildNumber>1</buildNumber>
</snapshot>
<lastUpdated>20170613140447</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>war</extension>
<value>1.0.0-20170613.140447-1</value>
<updated>20170613140447</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>1.0.0-20170613.140447-1</value>
<updated>20170613140447</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>
Judging the maven-metadata.xml, the artifact URL should be this:
But it is not. Instead, the artifact is at this location:
mvn --version OpenJDK 64-Bit Server VM Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00) Maven home: /usr/local/apache-maven Java version: 1.8.0_131, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.4.0-64-generic", arch: "amd64", family: "unix"
The version of maven-deploy-plugin is 2.8.2
What am I doing wrong? How can I fix this? Thank you!
mvn clean deploy -DskipTests -DskipITs -T C1
cause the install part is done as part of the life cycle ? Apart from that I don't really understand your problem? – khmarbaise~/.m2/repository
) with different maven builds that will not work nor has it ever been designed for it. Each job has to have it's own cache for running. Furthermore about what doestakes forever
means? How long minutes, hours? How many modules? How many tests? – khmarbaise