Problem with maven build configuration TeamCity 7.1.2

Answered

Hello to all,

I recently strugled with some problem with maven build configuration.
I have configuration with 2 step. The first step is multi-module maven build (clean install goal) with enabled "incremental building" feature.
The second step is a call of "org.codehaus.mojo:tomcat-maven-plugin:1.1:redeploy" plugin on one of the war maven module (not multi-module).
The first step is successfully executed but after publishing artifacts execution TeamCity performs "Purging installed artifacts". This goal deleted
recently builded artifacts from "/root/.m2/repository". The second step failed because of missing some artifacts that was previously cleared by step 1.
How can I prevent "Purging installed artifacts"?

4 comments
Comment actions Permalink

Dimitry,

Currently, it is not possible to  prevent purging of installed artifacts. TeamCity maven incremental build purges modules that were built during preparation phase to avoid interferience with subsequent builds (of possibly different build configurations). Only modules, affected by changes are not purged.

In general, we do not recommend using incremental configurations for delivery or deployment builds, as they are somewhat less reliable. For more information, please, see this blog post: http://blogs.jetbrains.com/teamcity/2012/03/14/incremental-building-with-maven-and-teamcity/

0
Comment actions Permalink

Nikita, thank you for clarification. It's poorly thing that I cannot use incremental build in this 2 step configuration (the project have a lot of modules). Also I can't merge two steps into one single because "org.codehaus.mojo:tomcat-maven-plugin:1.1:redeploy" try to executes on several web application modules which is exists in project. But I need to deploy only one web application. Probably have to use non incremental build....

0
Comment actions Permalink

I'm facing similar problem and it is interesting is there any progress since version 7.1.2? Is it possible to prevent "Purging installed artifacts" on version 9.1.7 or higher?

Thanks in advance

0
Comment actions Permalink

Hello,

This feature still works as described above

0

Please sign in to leave a comment.