maven-metadata.xml file in snapshot repository

1,985 views
Skip to first unread message

Alex K

unread,
Aug 23, 2018, 5:44:34 AM8/23/18
to Nexus Users
Nexus OSS 2.14.*
When I deploy artifact to snapshot repository by maven deploy command with key -DgeneratePom=false
mvn deploy:deploy-file -s settings_deploy.xml -DgroupId=group -DartifactId=artifact -Dversion=1-SNAPSHOT -DgeneratePom=false -Dpackaging=jar -DrepositoryId=snapshot.repo -Durl=http://nexus_URL/nexus/content/repositories/Test_snapshot -Dfile=file.jar

And then Run RebuildMetadataScheduler on Nexus server the maven-metadata.xml file in artifact folder disappear

Is it normaly?

msu...@sonatype.com

unread,
Aug 23, 2018, 7:22:54 AM8/23/18
to Nexus Users
Hi Alex,

Why do you need to rebuild the metadata? 

"mvn deploy:deploy-file" will update/create the maven-metadata.xml files.

Regards,
Mahendra

Alex K

unread,
Aug 23, 2018, 10:08:04 AM8/23/18
to Nexus Users
We have two Nexus instances that do not have direct network visibility. We transfer artifacts between them, and then make rebuild metadata

четверг, 23 августа 2018 г., 14:22:54 UTC+3 пользователь msu...@sonatype.com написал:

msu...@sonatype.com

unread,
Aug 23, 2018, 10:28:22 AM8/23/18
to Nexus Users
Hi Alex,

If I understand correctly , you are running the "Rebuild Maven Metadata Files" task. This will recreate the maven-metadata files. Check the nexus.log file for any errors during the time the task is run.

Regards,
Mahendra

Alex K

unread,
Aug 27, 2018, 6:03:46 AM8/27/18
to Nexus Users
Hi Mahendra
Yes, I run the "Rebuild Maven Metadata Files" task and only version, that I deploy with key -DgeneratePom=true is in the  maven-metadata.xml file.
And there is no error on nexus.log

четверг, 23 августа 2018 г., 17:28:22 UTC+3 пользователь msu...@sonatype.com написал:

Peter Lynch

unread,
Aug 27, 2018, 8:16:52 AM8/27/18
to Alex K, Nexus Users
On Mon, Aug 27, 2018 at 7:03 AM Alex K <sanch...@gmail.com> wrote:
Hi Mahendra
Yes, I run the "Rebuild Maven Metadata Files" task and only version, that I deploy with key -DgeneratePom=true is in the  maven-metadata.xml file.
And there is no error on nexus.log

A pom file is required for any jar file to be considered as properly deployed. The Nexus Rebuild Maven Metadata Task will only recreate/update maven-metadata.xml for artifacts with pom files.

Therefore if you deploy with -DgeneratePom=true, a pom gets created - rebuild maven metadata works.

If you deploy with -DgeneratePom=false, a pom does not get created - rebuild maven metadata ignores your orphaned jar as expected.

четверг, 23 августа 2018 г., 17:28:22 UTC+3 пользователь msu...@sonatype.com написал:
Hi Alex,

If I understand correctly , you are running the "Rebuild Maven Metadata Files" task. This will recreate the maven-metadata files. Check the nexus.log file for any errors during the time the task is run.

Regards,
Mahendra

On Thursday, August 23, 2018 at 3:08:04 PM UTC+1, Alex K wrote:
We have two Nexus instances that do not have direct network visibility. We transfer artifacts between them, and then make rebuild metadata

четверг, 23 августа 2018 г., 14:22:54 UTC+3 пользователь msu...@sonatype.com написал:
Hi Alex,

Why do you need to rebuild the metadata? 

"mvn deploy:deploy-file" will update/create the maven-metadata.xml files.

Regards,
Mahendra

On Thursday, August 23, 2018 at 10:44:34 AM UTC+1, Alex K wrote:
Nexus OSS 2.14.*
When I deploy artifact to snapshot repository by maven deploy command with key -DgeneratePom=false
mvn deploy:deploy-file -s settings_deploy.xml -DgroupId=group -DartifactId=artifact -Dversion=1-SNAPSHOT -DgeneratePom=false -Dpackaging=jar -DrepositoryId=snapshot.repo -Durl=http://nexus_URL/nexus/content/repositories/Test_snapshot -Dfile=file.jar

And then Run RebuildMetadataScheduler on Nexus server the maven-metadata.xml file in artifact folder disappear

Is it normaly?

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/1d032435-ff32-4764-b593-cbdf8c7f2a55%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Alex K

unread,
Aug 27, 2018, 8:41:29 AM8/27/18
to Nexus Users, sanch...@gmail.com
Thank you, Peter

понедельник, 27 августа 2018 г., 15:16:52 UTC+3 пользователь Peter Lynch написал:
Reply all
Reply to author
Forward
0 new messages