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 co开发者_运维问答nsistent?
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.
精彩评论