Return-Path: X-Original-To: apmail-maven-commits-archive@www.apache.org Delivered-To: apmail-maven-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0097C6ED for ; Mon, 29 Jul 2013 09:09:20 +0000 (UTC) Received: (qmail 87649 invoked by uid 500); 29 Jul 2013 09:09:20 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 87145 invoked by uid 500); 29 Jul 2013 09:09:12 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 87125 invoked by uid 99); 29 Jul 2013 09:09:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jul 2013 09:09:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jul 2013 09:09:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1394A2388860; Mon, 29 Jul 2013 09:08:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1507978 - /maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java Date: Mon, 29 Jul 2013 09:08:48 -0000 To: commits@maven.apache.org From: dennisl@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130729090849.1394A2388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dennisl Date: Mon Jul 29 09:08:48 2013 New Revision: 1507978 URL: http://svn.apache.org/r1507978 Log: [MRRESOURCES-61] processed resources are added to main and test resources Modified: maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java Modified: maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java?rev=1507978&r1=1507977&r2=1507978&view=diff ============================================================================== --- maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java (original) +++ maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java Mon Jul 29 09:08:48 2013 @@ -265,14 +265,34 @@ public class ProcessRemoteResourcesMojo private boolean skip; /** - * Attaches the resource to the project as a resource directory + * Attaches the resources to the project as a resource directory. * * @since 1.0-beta-1 + * @deprecated Please use {@link #attachToMain} and {@link #attachToTest} instead. */ + @Deprecated @Parameter( defaultValue = "true" ) private boolean attached = true; /** + * Attaches the resources to the main build of the project as a resource + * directory. + * + * @since 1.5 + */ + @Parameter( defaultValue = "true", property = "attachToMain" ) + private boolean attachToMain; + + /** + * Attaches the resources to the test build of the project as a resource + * directory. + * + * @since 1.5 + */ + @Parameter( defaultValue = "true", property = "attachToTest" ) + private boolean attachToTest; + + /** * Additional properties to be passed to velocity. *

* Several properties are automatically added:
@@ -507,12 +527,15 @@ public class ProcessRemoteResourcesMojo // Push our newly generated resources directory into the MavenProject so that // these resources can be picked up by the process-resources phase. // ---------------------------------------------------------------------------- - if ( attached ) + Resource resource = new Resource(); + resource.setDirectory( outputDirectory.getAbsolutePath() ); + // MRRESOURCES-61 handle main and test resources separately + if ( attached && attachToMain ) { - Resource resource = new Resource(); - resource.setDirectory( outputDirectory.getAbsolutePath() ); - project.getResources().add( resource ); + } + if ( attached && attachToTest ) + { project.getTestResources().add( resource ); }