diff --git a/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java b/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java index b0a789b009..07c70fda38 100644 --- a/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java +++ b/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java @@ -63,6 +63,10 @@ public class AntRunMojo */ private File sourceRoot; + /** + * @parameter expression="${testSourceRoot}" + */ + private File testSourceRoot; /** */ @@ -76,5 +80,12 @@ public class AntRunMojo getLog().info( "Registering compile source root " + sourceRoot ); project.addCompileSourceRoot( sourceRoot.toString() ); } + + if ( testSourceRoot != null ) + { + getLog().info( "Registering compile test source root " + testSourceRoot ); + project.addTestCompileSourceRoot( testSourceRoot.toString() ); + } + } }