简体   繁体   中英

Maven : distribution management configuration in POM file or settings.xml

I would like to know what's the best practice for setting up the distribution management with maven.

We have the nexus repository configured in the maven settings.xml and in the parent pom file. Where as this is not consistent across all projects and we want to make it consistent?

What's the best way? pom file or settings.xml? what's the pros and cons?

We have arguments that it should be in each person's settings.xml , so that they can release it where they want it.

Location and transport protocol settings in the pom.
credentials in ${userhome}/.m2/settings.xml

Releases should be distributed to a consistent place, otherwise what the point of having a centralised repository or even artifact naming conventions.

If you want it in a non standard place for that project, then don't release it, it is obviously not a release.

I think it's appropriate to put things in settings.xml that you would want to repeat for each project you work on on that workstation.

So if all the projects your developers are working on are released to the same repository (which I would assume is what would occur in a corporate setting), then this setting makes sense to centralize.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM