we are using the Maven Wagon SSH and Wagon SSH External plugins to deploy to our nexus repository. This way artifacts in the nexus can be overridden.
Is there a way to prevent this on the maven side? Or do we have to change either the wagon or the file system permissions for the artifacts?
I would suggest you to use the
deploycommand or use maven-release-plugin. With the plugin you canprepareyour pom.xml to next version and it will commit these changes to your version control (git,svn). Then you can runperformcommand to build prepared version and deploy it into the nexus.The point is you can re-
deployyour working snapshot version (that ends with -SNAPSHOT) as much as you want. But you candeployversion WITHOUT snapshot only once. That ensures you the release version wont be overridden this way!The problem is you have to update your version manually or you will use that mentioned plugin.