Working directory has no affect in Maven build?

I have a Maven build step, executing a build against a multi-module Maven project. One of the modules is for doing an assembly using the maven-assembly-plugin. Since this is the only module with the assembly configuration, I need to run Maven from that module. Fundamentally I need to do the equivalent of

% cd assembly-module

% mvn assembly:single

assuming of course I'm in the source root.

So in TeamCity I have a Maven build step. In the 'Working directory' field I enter 'assembly-module' and in the goal field I have assembly:single.

But the build fails. In the build log I see

Starting: /usr/local/jdk1.6.0_25/bin/java ... ...

in directory: /vol1/TeamCity/buildAgent/work/6eac58e1aff60971/assembly-module

But Maven is still apparently executed from /vol1/TeamCity/buildAgent/work/6eac58e1aff60971.

Is this a bug? As far as I can tell I have configured TeamCity correctly.

1 comment
Comment actions Permalink

the workaround I forgot to mention is to put '-pl assembly-module' in the 'Additional Maven command line parameters' field.


Please sign in to leave a comment.