Turn off building of required dependency modules for Maven?

Due to the size and complexity of our Maven build our build times are still excessive even using the incremental building feature. On change TeamCity determines the following:

  • Directly affected modules
  • All affected modules
  • Required dependency modules

For us the "Required dependency module" results in our builds taking far too long.


  • Module C depends on B, which depends on A
  • I make a change to module B
  • TeamCity determines
    • Directly affected modules: B
    • All affected modules: B and C
    • Required dependency module: A
  • TeamCity builds A, B then C

In our large Maven build "Required dependency module" can result in a lot of modules being built that don't need to be; how can we turn off the "Required dependency module" phase?


Comment actions Permalink

If the required modules are not rebuild, you will face issues when local repository contains outdated versions of dependencies' jars. This may lead to compilation or test failures and result in inconsistent artifacts being produced.

So there is no option to disable building required dependency modules.

Comment actions Permalink

Yep, I agree that could be the case but I believe in our case we could turn off the required dependency modules and suffer no ill effects. We only ever deploy from TeamCity and our builds are always sequential therefore, in our use case, I believe we don't need the required dependency modules to be built. Is the option to turn off required dependency modules something we could get TeamCity to do? Thx

Comment actions Permalink

I have created an issue in our tracker for you: http://youtrack.jetbrains.com/issue/TW-31395

Please watch/vote for it.
Comment actions Permalink

Great, thx.

In terms of making progress on this what's the usual process?

Comment actions Permalink

This feature is currently scheduled for next release (8.x). It is unlikely it will be implemented in 8.0.x bugfix releases


Please sign in to leave a comment.