BlackEye
BlackEye

Reputation: 777

Maven ssh deployment overrides artifacts in nexus - Can this be prevented?

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?

Upvotes: 2

Views: 681

Answers (1)

Milan Baran
Milan Baran

Reputation: 4232

I would suggest you to use the deploy command or use maven-release-plugin. With the plugin you can prepare your pom.xml to next version and it will commit these changes to your version control (git,svn). Then you can run perform command to build prepared version and deploy it into the nexus.

The point is you can re-deploy your working snapshot version (that ends with -SNAPSHOT) as much as you want. But you can deploy version 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.

Upvotes: 0

Related Questions