ant build which invokes maven

My teamcity server is currently running builds using ant. We are converting our projects to maven, which is a slow process, and this has meant we have started calling some maven operations  from our ant build scripts. but doing this on TeamCity fails saying that it can't find the maven executable (m2 variable not defined, etc.)

Is there a way to configure TC so that the ant build can see the maven executable that is already in the build agent or will I have to install another maven seperately on the machine?

thanks in advance

Comment actions Permalink

for now I am going to install maven externally. but it would be nice if teacmcity could setup the standard environment variables so that the various builders can all be used.

Comment actions Permalink


in your build settings (section "Properties and Environment Variables") define environment variable M2_HOME as "%system.agent.home.dir%/plugins/maven".

This should make your build use the bundled Maven.


Please sign in to leave a comment.