[ http://jira.codehaus.org/browse/MANTRUN-54?page=comments#action_80724 ] Greg Kick commented on MANTRUN-54: ----------------------------------
I was just thinking that this feature would make my life much easier... and it comes with a patch! +1 > Provide ability to register (test) resource roots [patch included!] > ------------------------------------------------------------------- > > Key: MANTRUN-54 > URL: http://jira.codehaus.org/browse/MANTRUN-54 > Project: Maven 2.x Antrun Plugin > Issue Type: Improvement > Affects Versions: 1.2 > Reporter: Andreas Schildbach > > Index: > C:/dev/workspace/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java > =================================================================== > --- > C:/dev/workspace/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java > (revision 416302) > +++ > C:/dev/workspace/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java > (working copy) > @@ -18,6 +18,7 @@ > > import java.io.File; > > +import org.apache.maven.model.Resource; > import org.apache.maven.plugin.MojoExecutionException; > import org.apache.maven.project.MavenProject; > import org.apache.tools.ant.Target; > @@ -75,6 +76,16 @@ > private File testSourceRoot; > > /** > + * @parameter expression="${resourceRoot}" > + */ > + private Resource resourceRoot; > + > + /** > + * @parameter expression="${testResourceRoot}" > + */ > + > + private Resource testResourceRoot; > + /** > */ > public void execute() > throws MojoExecutionException > @@ -93,5 +104,16 @@ > project.addTestCompileSourceRoot( testSourceRoot.toString() ); > } > > + if (resourceRoot != null) > + { > + getLog().info("Registering resource root " + resourceRoot); > + project.addResource(resourceRoot); > + } > + > + if (testResourceRoot != null) > + { > + getLog().info("Registering test resource root " + > testResourceRoot); > + project.addResource(resourceRoot); > + } > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira