Team-City, Maven and maven-release-plugin.

Hello!

Question short description: i want to build my custom app versions after all maven artifacts of my project created by general team-city build configuration.

i have next configuration for build SNAPSHOT versions:
1) maven hierarchical multi module project.
2) target custom applications builds from subset of all artifacts. (used maven profiles)
3) in team-city exists general build configuration which build all artifacts and upload its to apache-archiva.
4) additionally, exists some configurations for build custom versions from subset artifacts from apache-archiva. This configuration has trigger "Finish Build Trigger             " on general build configuration.

however, its not work for build RELEASE versions
i use maven-release-plugin for create RELEASE version app. If i create build configuration and set maven goals "release:prepare release:perform",
so RELEASE artifacts will be uploaded into apache-archiva, but team-city don't create target custom applications,
because maven-release-plugin commit into svn new revision with next development iteration version number.
i.e. maven-release-plugin perform three commit into svn:
1) prepare release
2) create tag
3) prepare for next development iteration

i need to start custom build configurations which base on svn revision after 1 or 2 commit, but before 3 commit.

How i can do it? May be exists another method to build RELEASE version with maven-release-plugin and team-city ?

1 comment

Hello, Sergey

Unfortunately TeamCity doesn't provide release automation for Maven projects.

I'm not quite sure I understand your case well, but probably the suggestions below could help you.

First of all, you can get your general build to produce release artifacts by manually triggering a so-called history build.

Find the latest change you want to be included in you release build (in your case it's the 2) ). The easiest way to do it is using the Change Log tab.
Find the                                icon. When you click on it TeamCity will trigger a build that won't contain any later change. So your release artifacts will be generated.

You can also use the snapshot dependency mechanism in your custom build configurations if they can resolve artifacts using local file system, not remote artifact repository. Please see http://confluence.jetbrains.net/display/TCD5/Dependent+Build for details.
In this case your basic configuration should upload its artifacts to TeamCity. It can be done by configuring artifact publishing rules in the build configuration settings.


Again, I might miss something in your request. So please don't hesitate to contact me if I got it wrong.
You can also email me in russian to teamcity-feedback@jetbrains.com if could ease our communication.

Thank you.

0

Please sign in to leave a comment.