You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Gier (JIRA)" <ji...@codehaus.org> on 2010/02/23 20:11:11 UTC

[jira] Commented: (MANTRUN-54) Provide ability to register (test) resource roots [patch included!]

    [ http://jira.codehaus.org/browse/MANTRUN-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=211312#action_211312 ] 

Paul Gier commented on MANTRUN-54:
----------------------------------

I believe this can be done using the [buildhelper-maven-plugin|http://mojo.codehaus.org/build-helper-maven-plugin/].  Unless there is something different about this request, I will close this issue.

> 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