Release artifact process from ‘SNAPSHOT’to Production release



 

Our maven java project version is defined as 1.0-SNAPSHOT in the pom. Our goal is, without changing the source code, we want to release it to Archiva production repo as ‘1.0’ and tag it to SVN.   Also we don’t want to have any SCM, Distribution management information in our POMs. We want them to be configured in the CI.  We are trying to see the best way to achieve this artifact release to Archiva thru TeamCity.

 

(We have configured the SCMs, Label information in the TeamCity project and updated the Settings.xml files with Archiva Snapshots and Internal repos and so on... so easy!)

 

What we tried:  By using the clean install deploy:deployfile – We have successfully deployed the artifact to Archiva and the tag was created in the SVN. So cool!!

 

But few issues, in fact what we need:

 

1)      We need the version name in the pom to be updated from 1.0-SNAPSHOT’ to ‘1.0’  (So that in the Archiva it refers to ‘1.0’).

2)      Even the pom in the svn tag also referes the same. So we want to change version 1.0-SNAPSHOT’ to ‘1.0’  in the pom before the tag creation.

 

How can we achieve this in TeamCity?  Is not the common way of releasing the artifacts from SNAPSHOT to production?  Or are we going in the wrong path?

Any help would be appreciated!

Thanks

-ks

Please sign in to leave a comment.