Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is my nexus metadata.xml snapshot version incorrect?

This is my metadata. It's clearly incorrect, but I don't know why, so maven can't update download dependencies in my project.

<metadata modelVersion="1.1.0">
   <groupId>com.test</groupId>
   <artifactId>test-sdk</artifactId>
   <version>1.7.0-SNAPSHOT</version>
   <versioning>
     <snapshot>
       <timestamp>20140130.175110</timestamp>
       <buildNumber>58</buildNumber>
     </snapshot>
     <lastUpdated>20140130175110</lastUpdated>
     <snapshotVersions>
       <snapshotVersion>
         <extension>jar</extension>
         <value>1.7.0-20140130.175109-57</value>
         <updated>20140130175110</updated>
       </snapshotVersion>
       <snapshotVersion>
         <extension>pom</extension>
         <value>1.7.0-20140130.175109-57</value>
         <updated>20140130175110</updated>
       </snapshotVersion>
     </snapshotVersions>
   </versioning>
 </metadata>
like image 815
gavioto Avatar asked Jan 31 '14 11:01

gavioto


3 Answers

I don't know why this happens, but I solved scheduling a Nexus task to "rebuild metadata" in "Scheduled Task" admin option. For now, this is a valid solution for me.

enter image description here

Additional information about how to fix the issue in this answer

like image 199
gavioto Avatar answered Oct 19 '22 10:10

gavioto


I encountered the same problem. You might check your test-sdk's parent pom to see if any extra maven deploy plugin defined in.

like image 37
SunLiWei Avatar answered Oct 19 '22 10:10

SunLiWei


I had this issue when I used the Maven Deploy Plugin and the Nexus Staging Plugin simultaneously. Try skipping the Maven Deploy Plugin:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-deploy-plugin</artifactId>
  <configuration>
    <skip>true</skip>
  </configuration>
</plugin>
like image 1
Wenonah Avatar answered Oct 19 '22 09:10

Wenonah