Problem with maven build configuration TeamCity 7.1.2


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"?



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:


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....


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



This feature still works as described above


Please sign in to leave a comment.