Maven – How to differentiate between deploying releases vs snapshots

maven

I may be missing something extremely obvious, but I need some clarification regardless. I am about to begin development using maven and archiva. I added both servers + settings to settings.xml, and distributionManagement tags to the maven POM which I want to deploy.

I put references to both my internal snapshot repo, and my internal release repo in the POM. is there a specific maven command or option, which specifies to deploy as a SNAPSHOT, and NOT to both repos? Or if I do deploy, will it automatically push one copy to each repo?

Can someone clarify this?ยด

Best Solution

If your project.version contains SNAPSHOT (f.e., 1.2-SNAPSHOT) and you execute mvn deploy, artifacts will be deployed to your snapshot repository. If it doesn't (f.e., 1.2) - they will be deployed to your release repository.

Related Question