I am using ant version 1.9.6 and maven 3.3.9. The following ant task runs with maven 3.3.9. It works fine with maven 3.2.5.
<artifact:mvn pom="modules/pom.xml" mavenHome="${env.MAVEN_HOME}" fork="true" failonerror="true"> <arg value="install" /> </artifact:mvn>
Error message: [artifact:mvn] -Dmaven.multiModuleProjectDirectory system property is not set.
I managed to find a workaround (and would like to share it with you):
<artifact:mvn pom="modules/pom.xml" mavenHome="${env.MAVEN_HOME}" fork="true" failonerror="true"> <jvmarg value="-Dmaven.multiModuleProjectDirectory" /> <arg value="install" /> </artifact:mvn>
As you can see, adding a jvmarg element to set the maven.multiModuleProjectDirectory system property (without any specific value) solves the problem.
Questions : what is this system property? I have not indicated a value for this system property, should I? (to take advantage of some new features in maven 3.3.x)
source share