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

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

0
Comment actions Permalink

Hello,

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.

0

Please sign in to leave a comment.