You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/20 09:27:09 UTC

[maven-antrun-plugin] annotated tag maven-antrun-plugin-1.1 created (now b0fa5bd)

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a change to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git.


      at b0fa5bd  (tag)
 tagging 8c3236ba6cadf609ad5df89a029457a2ea1047a7 (commit)
      by Carlos Sanchez Gonzalez
      on Wed Jan 4 16:12:16 2006 +0000

- Log -----------------------------------------------------------------
maven-antrun-plugin-1.1
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 38b6397  Donating maven-antrun-plugin to the Maven2 project, as discussed with Brett.
     new 5f268c4  Moved execution code to abstract base class, so other ant-enabled plugins may use this more easily.
     new 4748a47  Set project's basedir on the ant Target so relative paths work.
     new d5c4163  ignores
     new 860012a  update dependency and parent versions
     new 45a5aeb  Fixing MNG-777: no output from ant tasks. I set the logger level to INFO so <echo> messages will appear.
     new 8eabfa1  [maven-release-plugin] prepare release maven-antrun-plugin-2.0-beta-1
     new 937b15b  [maven-release-plugin] prepare for next development iteration
     new 8125d9b  ignore release.properties and more
     new 5a0911d  add path references: - maven.dependency.classpath (compile) - maven.compile.classpath (compile) - maven.runtime.classpath (runtime) - maven.test.classpath (test)
     new 6b344ae  remove unneeded plexus dep
     new 3d4f547  setting up version
     new 4658cf8  [maven-release-plugin] prepare release maven-antrun-plugin-1.0-rc1
     new bc7ed48  bump version
     new f034b2f  remove left over from release
     new 0efb9d4  Added support for registering a new sourceroot using a <sourceRoot> tag; very useful for scripts that generate sources.
     new dcbf4aa  PR: MNG-122 exception clean up phase 1
     new 51eeab5  update plexus container
     new c7d683e  update versions in plugins
     new c336016  [maven-release-plugin] prepare release maven-antrun-plugin-1.0
     new 4349184  [maven-release-plugin] prepare for next development iteration
     new fb5ff0d  Added testSourceRoot too as suggested by Piotr Burdylo on IRC.
     new f189086  ignore
     new 5fa6fd0  cleanup some unused fields
     new dc6d6c3  move plugins
     new b8e0622  convert docs to APT
     new 4afedf8  -modified maven.dependency.classpath to get all the dependencies PR: MNG-1292
     new 0f20142  Added docs
     new 207451c  Improved docs Submitted by: Lee Meador PR: MNG-1660
     new 22569fb  Refactor
     new d43fa78  Added maven.plugin.classpath reference PR: MNG-1702
     new a27bd60  Added integration test
     new cdf606a  fix to use inherit refs, not inherit all
     new f6c48d5  Moved classpath to pom
     new 96b4ba8  Updating poms to change dependencies on 2.0.1-SNAPSHOT info to 2.0.1 (parent-poms, and a couple references to maven-archiver).
     new 992e1bb  maven.test.classpath doesn't contain test scope dependencies PR: MANTRUN-28 Submitted By: Gilles Scokart
     new 1e96030  Added test for maven.test.classpath PR: MANTRUN-28
     new ab61909  Fixed project header
     new f32d6e0  Moved test to src/it
     new b529bdc  Added integration tests
     new 224ea52  StringIndexOutOfBoundsException in custom ant task referencing 'basedir' PR: MANTRUN-34 Submitted By: Marcel Schutte
     new f9a6de8  Added test for MANTRUN-36
     new e862c96  Added log guards
     new af7725d  Try to get properties through a expression evaluator first, delegating to ant after. PR: MANTRUN-36 Submitted By: Gilles Scokart
     new 8c3236b  [maven-scm] copy for tag maven-antrun-plugin-1.1

The 45 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@maven.apache.org" <co...@maven.apache.org>'].

[maven-antrun-plugin] 03/26: Added testSourceRoot too as suggested by Piotr Burdylo on IRC.

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit fb5ff0d6f7f61230688aab817075d13e7a4c5b14
Author: Kenney Westerhof <ke...@apache.org>
AuthorDate: Thu Oct 20 10:24:22 2005 +0000

    Added testSourceRoot too as suggested by Piotr Burdylo on IRC.
    
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk/maven-plugins/maven-antrun-plugin@326879 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java b/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
index b0a789b..07c70fd 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
+++ b/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() );
+        }
+
     }
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 05/26: cleanup some unused fields

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 5fa6fd0ef0c94be92a479b4d2624ec71b83c7d89
Author: Brett Leslie Porter <br...@apache.org>
AuthorDate: Sun Oct 23 23:28:42 2005 +0000

    cleanup some unused fields
    
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk/maven-plugins/maven-antrun-plugin@327882 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java b/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
index 07c70fd..56a829c 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
@@ -16,15 +16,12 @@ package org.apache.maven.plugin.antrun;
  * limitations under the License.
  */
 
-import org.apache.maven.plugin.AbstractMojo;
+import java.io.File;
+
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
-import org.apache.tools.ant.DefaultLogger;
-import org.apache.tools.ant.PropertyHelper;
 import org.apache.tools.ant.Target;
 
-import java.io.File;
-
 /**
  * Maven AntRun Mojo.
  *

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 25/26: Try to get properties through a expression evaluator first, delegating to ant after. PR: MANTRUN-36 Submitted By: Gilles Scokart

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit af7725d9fae280f8a3c4f3dca2afa0284ed4aced
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sun Jan 1 20:31:00 2006 +0000

    Try to get properties through a expression evaluator first, delegating to ant after.
    PR: MANTRUN-36
    Submitted By: Gilles Scokart
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@360548 13f79535-47bb-0310-9956-ffa450edef68
---
 .../maven/plugin/antrun/AbstractAntMojo.java       |  7 ++-
 .../maven/plugin/antrun/AntPropertyHelper.java     | 57 ++++++++++++++++++++++
 .../antrun/components/AntTargetConverter.java      | 23 +++------
 3 files changed, 70 insertions(+), 17 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java b/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
index 9efd3e9..5aaeef1 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
@@ -25,12 +25,14 @@ import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.DependencyResolutionRequiredException;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.antrun.components.AntTargetConverter;
 import org.apache.maven.project.MavenProject;
 import org.apache.tools.ant.DefaultLogger;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.PropertyHelper;
 import org.apache.tools.ant.Target;
 import org.apache.tools.ant.types.Path;
+import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
 import org.codehaus.plexus.util.StringUtils;
 
 /**
@@ -54,11 +56,14 @@ public abstract class AbstractAntMojo
     {
         try
         {
+            //TODO refactor - place the manipulation of the expressionEvaluator into a separated class.
+            ExpressionEvaluator exprEvaluator = (ExpressionEvaluator) antTasks.getProject().getReference(AntTargetConverter.MAVEN_EXPRESSION_EVALUATOR_ID);
+
             Project antProject = antTasks.getProject();
 
             PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper( antProject );
 
-            propertyHelper.setNext( new AntPropertyHelper( mavenProject, getLog() ) );
+            propertyHelper.setNext( new AntPropertyHelper( exprEvaluator, getLog() ) );
 
             DefaultLogger antLogger = new DefaultLogger();
             antLogger.setOutputPrintStream( System.out );
diff --git a/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java b/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
index b76ae41..00f098e 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
@@ -19,6 +19,8 @@ package org.apache.maven.plugin.antrun;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.project.MavenProject;
 import org.apache.tools.ant.PropertyHelper;
+import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
+import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
 import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
 
 /**
@@ -30,14 +32,27 @@ public class AntPropertyHelper
     extends PropertyHelper
 {
     private Log log;
+    private ExpressionEvaluator exprEvaluator;
     private MavenProject mavenProject;
 
+    /**
+     * @deprecated use the other constructor
+     * @param project
+     * @param l
+     */
     public AntPropertyHelper( MavenProject project, Log l )
     {
         mavenProject = project;
         log = l;
     }
 
+    public AntPropertyHelper( ExpressionEvaluator exprEvaluator, Log l )
+    {
+        this.mavenProject = null;
+        this.exprEvaluator = exprEvaluator;
+        this.log = l;
+    }
+
     public synchronized Object getPropertyHook( String ns, String name, boolean user )
     {
         if ( log.isDebugEnabled() )
@@ -45,6 +60,47 @@ public class AntPropertyHelper
             log.debug( "getProperty(ns="+ns+", name="+name+", user="+user+")" );
         }
 
+        /* keep old behaviour */
+        if ( mavenProject != null )
+        {
+            return getPropertyHook( ns, name, user, mavenProject );
+        }
+        
+        Object val = null;
+        try 
+        {
+            val = exprEvaluator.evaluate( "${" + name + "}" );
+        }
+        catch (ExpressionEvaluationException e) 
+        {
+            if ( log.isErrorEnabled() )
+            {
+                log.error("Failed to evaluate expression" , e);
+            }
+        }
+        if ( val == null )
+        {
+            val = super.getPropertyHook( ns, name, user );
+
+            if ( val == null )
+            {
+                val = System.getProperty( name.toString() );
+            }
+        }
+
+        return val;
+    }
+
+    /**
+     * @deprecated added to keep backwards compatibility
+     * @param ns
+     * @param name
+     * @param user
+     * @param mavenProject
+     * @return
+     */
+    private Object getPropertyHook( String ns, String name, boolean user, MavenProject mavenProject )
+    {
         Object val = null;
         try
         {
@@ -85,4 +141,5 @@ public class AntPropertyHelper
 
         return val;
     }
+
 }
diff --git a/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java b/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java
index a0ce274..a17e219 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java
@@ -27,7 +27,6 @@ import org.codehaus.plexus.component.configurator.ConfigurationListener;
 import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter;
 import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter;
 import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup;
-import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
 import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.configuration.PlexusConfigurationException;
@@ -40,6 +39,8 @@ import org.codehaus.plexus.configuration.PlexusConfigurationException;
 public class AntTargetConverter
     extends AbstractConfigurationConverter
 {
+    public static final String MAVEN_EXPRESSION_EVALUATOR_ID = "maven.expressionEvaluator";
+
     public static final String ROLE = ConfigurationConverter.class.getName();
 
     public boolean canConvert( Class type )
@@ -79,14 +80,16 @@ public class AntTargetConverter
         target.setProject( project );
         project.addTarget( target );
 
+        project.addReference(MAVEN_EXPRESSION_EVALUATOR_ID , expressionEvaluator);
+        
         initDefinitions( project, target );
 
-        processConfiguration( null, project, target, configuration, expressionEvaluator );
+        processConfiguration( null, project, target, configuration );
     }
 
 
     private void processConfiguration( RuntimeConfigurable parentWrapper, Project project, Target target,
-                                       PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator )
+                                       PlexusConfiguration configuration )
         throws ComponentConfigurationException
     {
         int items = configuration.getChildCount();
@@ -136,18 +139,6 @@ public class AntTargetConverter
                 try
                 {
                     String v = childConfiguration.getAttribute( attrNames[a] );
-
-                    try
-                    {
-                        Object evaluatedExpr = expressionEvaluator.evaluate( v );
-                        v = evaluatedExpr == null ? v : evaluatedExpr.toString();
-                    }
-                    catch ( ExpressionEvaluationException e )
-                    {
-                        throw new ComponentConfigurationException( "Error evaluating value '" + v + "' of attribute '" +
-                            attrNames[a] + "' of tag '" + childConfiguration.getName() + "'", e );
-                    }
-
                     wrapper.setAttribute( attrNames[a], v );
                 }
                 catch ( PlexusConfigurationException e )
@@ -163,7 +154,7 @@ public class AntTargetConverter
                 parentWrapper.addChild( wrapper );
             }
 
-            processConfiguration( wrapper, project, target, childConfiguration, expressionEvaluator );
+            processConfiguration( wrapper, project, target, childConfiguration );
         }
     }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 01/26: [maven-release-plugin] prepare release maven-antrun-plugin-1.0

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit c33601639ac12dcb2fdff24d76a032b3bf0aa397
Author: Brett Leslie Porter <br...@apache.org>
AuthorDate: Sat Oct 15 17:14:03 2005 +0000

    [maven-release-plugin] prepare release maven-antrun-plugin-1.0
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk/maven-plugins/maven-antrun-plugin@321382 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 911c8cc..d21adbb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,11 +8,8 @@
   <artifactId>maven-antrun-plugin</artifactId>
   <packaging>maven-plugin</packaging>
   <name>Maven AntRun Plugin</name>
-  <version>1.0-rc2-SNAPSHOT</version>
+  <version>1.0</version>
   <description>Runs ant scripts embedded in the POM</description>
-  <prerequisites>
-    <maven>2.0</maven>
-  </prerequisites>
   <developers>
     <developer>
       <id>kenney</id>
@@ -37,4 +34,4 @@
       <version>1.6.5</version>
     </dependency>
   </dependencies>
-</project>
+</project>
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 02/26: [maven-release-plugin] prepare for next development iteration

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 43491846364c4cf77ad8cce2ba48a57f78ba3ede
Author: Brett Leslie Porter <br...@apache.org>
AuthorDate: Sat Oct 15 17:14:19 2005 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk/maven-plugins/maven-antrun-plugin@321384 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index d21adbb..bb0a6a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
   <artifactId>maven-antrun-plugin</artifactId>
   <packaging>maven-plugin</packaging>
   <name>Maven AntRun Plugin</name>
-  <version>1.0</version>
+  <version>1.1-SNAPSHOT</version>
   <description>Runs ant scripts embedded in the POM</description>
   <developers>
     <developer>

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 23/26: Added test for MANTRUN-36

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit f9a6de8c6ac0313d253a0513d85ccaf8d1eb9929
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sat Dec 31 19:17:30 2005 +0000

    Added test for MANTRUN-36
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@360421 13f79535-47bb-0310-9956-ffa450edef68
---
 src/it/test4/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/it/test4/pom.xml b/src/it/test4/pom.xml
index 63d3b15..34036fd 100644
--- a/src/it/test4/pom.xml
+++ b/src/it/test4/pom.xml
@@ -7,7 +7,7 @@
   <groupId>org.apache.maven.plugins.antrun</groupId>
   <artifactId>test4</artifactId>
   <version>1.0-SNAPSHOT</version>
-  <name>Test for MANTRUN-29</name>
+  <name>Test for MANTRUN-36</name>
   <description>properties not resolved in attributes</description>
 
   <dependencies>

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 06/26: move plugins

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit dc6d6c393055b951ff5c6d95f75322e802886356
Author: Brett Leslie Porter <br...@apache.org>
AuthorDate: Wed Nov 16 13:24:46 2005 +0000

    move plugins
    
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@345007 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 19/26: Fixed project header

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit ab61909297b58d087b8d5e3859a5804bcb464723
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sat Dec 31 16:50:36 2005 +0000

    Fixed project header
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@360327 13f79535-47bb-0310-9956-ffa450edef68
---
 src/test/projects/test1/pom.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/test/projects/test1/pom.xml b/src/test/projects/test1/pom.xml
index 0a39790..1fe94b1 100644
--- a/src/test/projects/test1/pom.xml
+++ b/src/test/projects/test1/pom.xml
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/home/jdcasey/xml-schemas/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   
   <groupId>org.apache.maven.plugins.antrun</groupId>

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 04/26: ignore

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit f18908677512332b1021631d79d5b607aba0dbb2
Author: Brett Leslie Porter <br...@apache.org>
AuthorDate: Sun Oct 23 22:10:56 2005 +0000

    ignore
    
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk/maven-plugins/maven-antrun-plugin@327866 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 21/26: Added integration tests

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit b529bdc42fbbe08871c4457ec2cb698bd37c44db
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sat Dec 31 18:13:48 2005 +0000

    Added integration tests
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@360383 13f79535-47bb-0310-9956-ffa450edef68
---
 src/it/test1/pom.xml                     |  2 +
 src/it/test2/pom.xml                     |  2 +
 src/it/test3/build.xml                   | 17 ++++++++
 src/it/{test2 => test3}/pom.xml          | 14 +++---
 src/it/test4/build.xml                   | 31 +++++++++++++
 src/it/test4/pom.xml                     | 74 ++++++++++++++++++++++++++++++++
 src/it/test5/build.xml                   | 31 +++++++++++++
 src/it/{test2 => test5}/pom.xml          | 31 ++++++-------
 src/it/test5/src/main/java/TestTask.java | 14 ++++++
 9 files changed, 196 insertions(+), 20 deletions(-)

diff --git a/src/it/test1/pom.xml b/src/it/test1/pom.xml
index 1fe94b1..d764e7a 100644
--- a/src/it/test1/pom.xml
+++ b/src/it/test1/pom.xml
@@ -7,6 +7,8 @@
   <groupId>org.apache.maven.plugins.antrun</groupId>
   <artifactId>test1</artifactId>
   <version>1.0-SNAPSHOT</version>
+  <name>Test for compile and plugin classpath references</name>
+  <description>Ensure that maven.compile.classpath and maven.plugin.classpath referencies are set</description>
  
   <dependencies>
   </dependencies>
diff --git a/src/it/test2/pom.xml b/src/it/test2/pom.xml
index 637ae7c..5e0ca7a 100644
--- a/src/it/test2/pom.xml
+++ b/src/it/test2/pom.xml
@@ -7,6 +7,8 @@
   <groupId>org.apache.maven.plugins.antrun</groupId>
   <artifactId>test2</artifactId>
   <version>1.0-SNAPSHOT</version>
+  <name>Test for MANTRUN-28</name>
+  <description>maven.test.classpath doesn't contain test scope dependancies</description>
 
   <dependencies>
     <dependency>
diff --git a/src/it/test3/build.xml b/src/it/test3/build.xml
new file mode 100644
index 0000000..b1d50ff
--- /dev/null
+++ b/src/it/test3/build.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<project name="test1">
+
+    <target name="test">
+
+        <echo>user.home = ${user.home}</echo>
+        <fail message="user.home is not set">
+          <condition>
+            <not>
+              <isset property="user.home"/>
+            </not>
+          </condition>
+        </fail>
+
+    </target>
+
+</project>
diff --git a/src/it/test2/pom.xml b/src/it/test3/pom.xml
similarity index 71%
copy from src/it/test2/pom.xml
copy to src/it/test3/pom.xml
index 637ae7c..ab7760c 100644
--- a/src/it/test2/pom.xml
+++ b/src/it/test3/pom.xml
@@ -5,8 +5,10 @@
   <modelVersion>4.0.0</modelVersion>
   
   <groupId>org.apache.maven.plugins.antrun</groupId>
-  <artifactId>test2</artifactId>
+  <artifactId>test3</artifactId>
   <version>1.0-SNAPSHOT</version>
+  <name>Test for MANTRUN-32</name>
+  <description>ant tasks don't use correct environment in antrun plugin</description>
 
   <dependencies>
     <dependency>
@@ -26,15 +28,17 @@
             <phase>test</phase>
             <configuration>
               <tasks>
-                <property name="test.classpath" refid="maven.test.classpath"/>
-                <echo>${test.classpath}</echo>
-                <fail message="Test classpath doesn't contain test scoped dependencies">
+                <echo>user.home = ${user.home}</echo>
+                <fail message="user.home is not set">
                   <condition>
                     <not>
-                      <contains string="${test.classpath}" substring="junit" casesensitive="no"/>
+                      <isset property="user.home"/>
                     </not>
                   </condition>
                 </fail>
+                <ant antfile="${basedir}/build.xml" inheritAll="true" inheritRefs="true">
+                  <target name="test"/>
+                </ant>
               </tasks>
             </configuration>
             <goals>
diff --git a/src/it/test4/build.xml b/src/it/test4/build.xml
new file mode 100644
index 0000000..6c726fc
--- /dev/null
+++ b/src/it/test4/build.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<project name="test1">
+
+    <target name="test">
+
+        <property name="property1" value="value"/>
+        <property name="property2" value="${property1}"/>
+        <property name="property3" value="prefix ${property1}"/>
+        <echo>P1: ${property1}</echo>
+        <echo>P2: ${property2}</echo>
+        <echo>P3: ${property3}</echo>
+        <echo message="P1: ${property1}"/>
+        <echo message="P2: ${property2}"/>
+        <echo message="P3: ${property3}"/>
+        <echo message="${property1}"/>
+        <echo message="${property2}"/>
+        <echo message="${property3}"/>
+
+        <fail message="Some property contains null in build.xml">
+          <condition>
+            <or>
+              <contains string="${property1}" substring="null" casesensitive="no"/>
+              <contains string="${property2}" substring="null" casesensitive="no"/>
+              <contains string="${property3}" substring="null" casesensitive="no"/>
+            </or>
+          </condition>
+        </fail>
+
+    </target>
+
+</project>
diff --git a/src/it/test4/pom.xml b/src/it/test4/pom.xml
new file mode 100644
index 0000000..63d3b15
--- /dev/null
+++ b/src/it/test4/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  
+  <groupId>org.apache.maven.plugins.antrun</groupId>
+  <artifactId>test4</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for MANTRUN-29</name>
+  <description>properties not resolved in attributes</description>
+
+  <dependencies>
+  </dependencies>
+  
+  <properties>
+    <mavenProperty>xyz</mavenProperty>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>test</phase>
+            <configuration>
+              <tasks>
+
+                <ant antfile="${basedir}/build.xml" inheritAll="true" inheritRefs="true">
+                  <target name="test"/>
+                </ant>
+
+                <echo/>
+                <echo>Embedded tasks:</echo>
+
+                <property name="property1" value="value"/>
+                <property name="property2" value="${property1}"/>
+                <property name="property3" value="prefix ${property1}"/>
+                <echo>P1: ${property1}</echo>
+                <echo>P2: ${property2}</echo>
+                <echo>P3: ${property3}</echo>
+                <echo>mavenProperty: ${mavenProperty}</echo>
+                <echo message="P1: ${property1}"/>
+                <echo message="P2: ${property2}"/>
+                <echo message="P3: ${property3}"/>
+                <echo message="mavenProperty: ${mavenProperty}"/>
+                <echo message="${property1}"/>
+                <echo message="${property2}"/>
+                <echo message="${property3}"/>
+                <echo message="${mavenProperty}"/>
+
+                <fail message="Some property contains null in embedded tasks">
+                  <condition>
+                    <or>
+                      <contains string="${property1}" substring="null" casesensitive="no"/>
+                      <contains string="${property2}" substring="null" casesensitive="no"/>
+                      <contains string="${property3}" substring="null" casesensitive="no"/>
+                      <contains string="${mavenProperty}" substring="null" casesensitive="no"/>
+                    </or>
+                  </condition>
+                </fail>
+              </tasks>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/src/it/test5/build.xml b/src/it/test5/build.xml
new file mode 100644
index 0000000..6c726fc
--- /dev/null
+++ b/src/it/test5/build.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<project name="test1">
+
+    <target name="test">
+
+        <property name="property1" value="value"/>
+        <property name="property2" value="${property1}"/>
+        <property name="property3" value="prefix ${property1}"/>
+        <echo>P1: ${property1}</echo>
+        <echo>P2: ${property2}</echo>
+        <echo>P3: ${property3}</echo>
+        <echo message="P1: ${property1}"/>
+        <echo message="P2: ${property2}"/>
+        <echo message="P3: ${property3}"/>
+        <echo message="${property1}"/>
+        <echo message="${property2}"/>
+        <echo message="${property3}"/>
+
+        <fail message="Some property contains null in build.xml">
+          <condition>
+            <or>
+              <contains string="${property1}" substring="null" casesensitive="no"/>
+              <contains string="${property2}" substring="null" casesensitive="no"/>
+              <contains string="${property3}" substring="null" casesensitive="no"/>
+            </or>
+          </condition>
+        </fail>
+
+    </target>
+
+</project>
diff --git a/src/it/test2/pom.xml b/src/it/test5/pom.xml
similarity index 59%
copy from src/it/test2/pom.xml
copy to src/it/test5/pom.xml
index 637ae7c..760211c 100644
--- a/src/it/test2/pom.xml
+++ b/src/it/test5/pom.xml
@@ -5,18 +5,19 @@
   <modelVersion>4.0.0</modelVersion>
   
   <groupId>org.apache.maven.plugins.antrun</groupId>
-  <artifactId>test2</artifactId>
+  <artifactId>test5</artifactId>
   <version>1.0-SNAPSHOT</version>
+  <name>Test for MANTRUN-34</name>
+  <description>StringIndexOutOfBoundsException in custom ant task referencing 'basedir'</description>
 
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
+      <artifactId>ant</artifactId>
+      <groupId>ant</groupId>
+      <version>1.6.5</version>
     </dependency>
   </dependencies>
-
+  
   <build>
     <plugins>
       <plugin>
@@ -26,15 +27,15 @@
             <phase>test</phase>
             <configuration>
               <tasks>
-                <property name="test.classpath" refid="maven.test.classpath"/>
-                <echo>${test.classpath}</echo>
-                <fail message="Test classpath doesn't contain test scoped dependencies">
-                  <condition>
-                    <not>
-                      <contains string="${test.classpath}" substring="junit" casesensitive="no"/>
-                    </not>
-                  </condition>
-                </fail>
+
+                <echo message="basedir:${basedir}" />
+                <echo message="sourceDirectory:${project.build.sourceDirectory}" />
+
+                <taskdef name="test" classname="TestTask">
+                  <classpath refid="maven.compile.classpath"/>
+                </taskdef>
+                <test/>
+
               </tasks>
             </configuration>
             <goals>
diff --git a/src/it/test5/src/main/java/TestTask.java b/src/it/test5/src/main/java/TestTask.java
new file mode 100644
index 0000000..6b7adc4
--- /dev/null
+++ b/src/it/test5/src/main/java/TestTask.java
@@ -0,0 +1,14 @@
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+
+public class TestTask extends Task {
+
+    public void execute() throws BuildException {
+        Project p = this.getProject();
+        System.out.println("sourceDirectory:" + p.getProperty("project.build.sourceDirectory"));
+        System.out.println("project.cmdline:" + p.getProperty("project.cmdline"));
+        System.out.println("basedir:" + p.getProperty("basedir"));
+    }
+
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 20/26: Moved test to src/it

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit f32d6e06fe277622ffe081ce5031514fafb19668
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sat Dec 31 16:53:17 2005 +0000

    Moved test to src/it
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@360332 13f79535-47bb-0310-9956-ffa450edef68
---
 src/{test/projects => it}/test1/build.xml               | 0
 src/{test/projects => it}/test1/pom.xml                 | 0
 src/{test/projects => it}/test1/src/main/java/Test.java | 0
 src/{test/projects => it}/test2/pom.xml                 | 0
 4 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/src/test/projects/test1/build.xml b/src/it/test1/build.xml
similarity index 100%
rename from src/test/projects/test1/build.xml
rename to src/it/test1/build.xml
diff --git a/src/test/projects/test1/pom.xml b/src/it/test1/pom.xml
similarity index 100%
rename from src/test/projects/test1/pom.xml
rename to src/it/test1/pom.xml
diff --git a/src/test/projects/test1/src/main/java/Test.java b/src/it/test1/src/main/java/Test.java
similarity index 100%
rename from src/test/projects/test1/src/main/java/Test.java
rename to src/it/test1/src/main/java/Test.java
diff --git a/src/test/projects/test2/pom.xml b/src/it/test2/pom.xml
similarity index 100%
rename from src/test/projects/test2/pom.xml
rename to src/it/test2/pom.xml

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 15/26: Moved classpath to pom

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit f6c48d58f50de52ae693bebf6c387469b4e7d571
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sun Dec 11 04:53:09 2005 +0000

    Moved classpath to pom
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@355907 13f79535-47bb-0310-9956-ffa450edef68
---
 src/test/projects/test1/build.xml |  9 +--------
 src/test/projects/test1/pom.xml   | 10 +++++++---
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/test/projects/test1/build.xml b/src/test/projects/test1/build.xml
index 67a0fe8..e3d9a1f 100644
--- a/src/test/projects/test1/build.xml
+++ b/src/test/projects/test1/build.xml
@@ -3,15 +3,8 @@
 
     <target name="test">
 
-        <path id="classpath">
-            <path refid="maven.dependency.classpath"/>
-            <path refid="maven.compile.classpath"/>
-        	<path refid="maven.runtime.classpath"/>
-        	<path refid="maven.test.classpath"/>
-            <path refid="maven.plugin.classpath"/>
-        </path>
         <java failonerror="true" classname="Test" fork="true" newenvironment="true">
-        	<classpath refid="classpath"/>
+            <classpath refid="classpath"/>
         </java>
 
     </target>
diff --git a/src/test/projects/test1/pom.xml b/src/test/projects/test1/pom.xml
index 641400c..0a39790 100644
--- a/src/test/projects/test1/pom.xml
+++ b/src/test/projects/test1/pom.xml
@@ -16,12 +16,16 @@
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
-            <id>generate-sources</id>
-            <phase>generate-sources</phase>
+            <id>compile</id>
+            <phase>compile</phase>
             <configuration>
               <sourceRoot>target/generated/src/main/java</sourceRoot>
               <tasks>
-                <ant antfile="${basedir}/build.xml" inheritrefs="true">
+                <path id="classpath">
+                  <path refid="maven.compile.classpath"/>
+                  <path refid="maven.plugin.classpath"/>
+                </path>
+                <ant antfile="${basedir}/build.xml" inheritRefs="true">
                   <target name="test"/>
                 </ant>
               </tasks>

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 16/26: Updating poms to change dependencies on 2.0.1-SNAPSHOT info to 2.0.1 (parent-poms, and a couple references to maven-archiver).

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 96b4ba8c530a324a81f59c2c970a4026ce690d32
Author: John Dennis Casey <jd...@apache.org>
AuthorDate: Thu Dec 15 00:27:27 2005 +0000

    Updating poms to change dependencies on 2.0.1-SNAPSHOT info to 2.0.1 (parent-poms, and a couple references to maven-archiver).
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@356959 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index bb0a6a9..3813d22 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
   <parent>
     <artifactId>maven-plugin-parent</artifactId>
     <groupId>org.apache.maven.plugins</groupId>
-    <version>2.0</version>
+    <version>2.0.1</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>maven-antrun-plugin</artifactId>
@@ -34,4 +34,4 @@
       <version>1.6.5</version>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 12/26: Added maven.plugin.classpath reference PR: MNG-1702

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit d43fa78eebb4c097084f3119bcd36a78edf87700
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Wed Nov 30 02:29:20 2005 +0000

    Added maven.plugin.classpath reference
    PR: MNG-1702
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@349863 13f79535-47bb-0310-9956-ffa450edef68
---
 .../maven/plugin/antrun/AbstractAntMojo.java       | 36 ++++++++++++++++++++--
 src/site/apt/usage.apt                             | 12 ++++++++
 2 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java b/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
index cc5a29f..9efd3e9 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
@@ -16,6 +16,13 @@ package org.apache.maven.plugin.antrun;
  * limitations under the License.
  */
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.DependencyResolutionRequiredException;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
@@ -26,14 +33,22 @@ import org.apache.tools.ant.Target;
 import org.apache.tools.ant.types.Path;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.File;
-
 /**
  * @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
  */
 public abstract class AbstractAntMojo
     extends AbstractMojo
 {
+    
+    /**
+     * The plugin dependencies.
+     *
+     * @parameter expression="${plugin.artifacts}"
+     * @required
+     * @readonly
+     */
+    private List artifacts;
+    
     protected void executeTasks( Target antTasks, MavenProject mavenProject )
         throws MojoExecutionException
     {
@@ -66,6 +81,23 @@ public abstract class AbstractAntMojo
             p.setPath( StringUtils.join( mavenProject.getTestClasspathElements().iterator(), File.pathSeparator ) );
             antProject.addReference( "maven.test.classpath", p );
 
+            /* set maven.plugin.classpath with plugin dependencies */
+            List list = new ArrayList( artifacts.size() );
+
+            for ( Iterator i = artifacts.iterator(); i.hasNext(); )
+            {
+                Artifact a = (Artifact) i.next();
+                File file = a.getFile();
+                if ( file == null )
+                {
+                    throw new DependencyResolutionRequiredException( a );
+                }
+                list.add( file.getPath() );
+            }
+            p = new Path( antProject );
+            p.setPath( StringUtils.join( list.iterator(), File.pathSeparator ) );
+            antProject.addReference( "maven.plugin.classpath", p );
+
             getLog().info( "Executing tasks" );
 
             antTasks.execute();
diff --git a/src/site/apt/usage.apt b/src/site/apt/usage.apt
index d505e03..502b725 100644
--- a/src/site/apt/usage.apt
+++ b/src/site/apt/usage.apt
@@ -52,7 +52,19 @@ Usage
   lifecycle phase. You can add a script to each lifecycle phase,
   by duplicating the <<<\<execution/\>>>> section and specifying
   a new phase.
+
+  
+  You can use these classpath references:
   
+  * <<<maven.dependency.classpath>>>
+
+  * <<<maven.compile.classpath>>>
+
+  * <<<maven.runtime.classpath>>>
+
+  * <<<maven.test.classpath>>>
+
+  * <<<maven.plugin.classpath>>>
   
   Below you can see how to indicate that ant has generated some more java
   source that needs to be included in the compilation phase. Note that the

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 18/26: Added test for maven.test.classpath PR: MANTRUN-28

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 1e9603016ccec78d63450c8dbdb30ce17e27e6b9
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sat Dec 31 16:50:12 2005 +0000

    Added test for maven.test.classpath
    PR: MANTRUN-28
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@360325 13f79535-47bb-0310-9956-ffa450edef68
---
 src/test/projects/test2/pom.xml | 49 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/src/test/projects/test2/pom.xml b/src/test/projects/test2/pom.xml
new file mode 100644
index 0000000..637ae7c
--- /dev/null
+++ b/src/test/projects/test2/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  
+  <groupId>org.apache.maven.plugins.antrun</groupId>
+  <artifactId>test2</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>test</phase>
+            <configuration>
+              <tasks>
+                <property name="test.classpath" refid="maven.test.classpath"/>
+                <echo>${test.classpath}</echo>
+                <fail message="Test classpath doesn't contain test scoped dependencies">
+                  <condition>
+                    <not>
+                      <contains string="${test.classpath}" substring="junit" casesensitive="no"/>
+                    </not>
+                  </condition>
+                </fail>
+              </tasks>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 24/26: Added log guards

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit e862c967e6fbaad76cdffcd6503c3fb7818b4b14
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sun Jan 1 17:36:46 2006 +0000

    Added log guards
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@360502 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/maven/plugin/antrun/AntPropertyHelper.java  | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java b/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
index 82b487b..b76ae41 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
@@ -38,11 +38,12 @@ public class AntPropertyHelper
         log = l;
     }
 
-    public synchronized Object getPropertyHook( String ns, String name,
-        boolean user
-    )
+    public synchronized Object getPropertyHook( String ns, String name, boolean user )
     {
-        log.debug( "getProperty(ns="+ns+", name="+name+", user="+user+")" );
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( "getProperty(ns="+ns+", name="+name+", user="+user+")" );
+        }
 
         Object val = null;
         try
@@ -66,7 +67,10 @@ public class AntPropertyHelper
         }
         catch ( Exception e )
         {
-            log.warn( "Error evaluating expression '" + name + "'", e );
+            if ( log.isWarnEnabled() )
+            {
+                log.warn( "Error evaluating expression '" + name + "'", e );
+            }
             e.printStackTrace();
         }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 14/26: fix to use inherit refs, not inherit all

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit cdf606a46c60263af23c9c642638b12461481eee
Author: Brett Leslie Porter <br...@apache.org>
AuthorDate: Sun Dec 11 04:16:32 2005 +0000

    fix to use inherit refs, not inherit all
    
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@355897 13f79535-47bb-0310-9956-ffa450edef68
---
 src/test/projects/test1/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/projects/test1/pom.xml b/src/test/projects/test1/pom.xml
index 3f3fe18..641400c 100644
--- a/src/test/projects/test1/pom.xml
+++ b/src/test/projects/test1/pom.xml
@@ -21,7 +21,7 @@
             <configuration>
               <sourceRoot>target/generated/src/main/java</sourceRoot>
               <tasks>
-                <ant antfile="${basedir}/build.xml" inheritall="true">
+                <ant antfile="${basedir}/build.xml" inheritrefs="true">
                   <target name="test"/>
                 </ant>
               </tasks>

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 08/26: -modified maven.dependency.classpath to get all the dependencies PR: MNG-1292

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 4afedf8dec9de92cdd8cca64514f91ab789d9247
Author: Allan Q. Ramirez <ar...@apache.org>
AuthorDate: Fri Nov 25 06:59:51 2005 +0000

    -modified maven.dependency.classpath to get all the dependencies
    PR: MNG-1292
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@348901 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java b/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
index e4cc6de..88513c7 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
@@ -56,8 +56,9 @@ public abstract class AbstractAntMojo
             antTasks.getProject().setBaseDir( mavenProject.getBasedir() );
 
             Path p = new Path( antTasks.getProject() );
-            p.setPath( StringUtils.join( mavenProject.getCompileClasspathElements().iterator(), File.pathSeparator ) );
+            p.setPath( StringUtils.join( mavenProject.getArtifacts().iterator(), File.pathSeparator ) );
             antTasks.getProject().addReference( "maven.dependency.classpath", p );
+            p.setPath( StringUtils.join( mavenProject.getCompileClasspathElements().iterator(), File.pathSeparator ) );
             antTasks.getProject().addReference( "maven.compile.classpath", p );
             p = new Path( antTasks.getProject() );
             p.setPath( StringUtils.join( mavenProject.getRuntimeClasspathElements().iterator(), File.pathSeparator ) );

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 07/26: convert docs to APT

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit b8e06225f046513fd57e665ac2f0e9957f91406c
Author: Brett Leslie Porter <br...@apache.org>
AuthorDate: Thu Nov 17 21:47:27 2005 +0000

    convert docs to APT
    
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@345336 13f79535-47bb-0310-9956-ffa450edef68
---
 src/site/apt/introduction.apt              | 27 +++++++++++++++++++
 src/site/{xdoc/usage.xml => apt/usage.apt} | 43 +++++++++++-------------------
 src/site/xdoc/introduction.xml             | 39 ---------------------------
 3 files changed, 43 insertions(+), 66 deletions(-)

diff --git a/src/site/apt/introduction.apt b/src/site/apt/introduction.apt
new file mode 100644
index 0000000..a91a99e
--- /dev/null
+++ b/src/site/apt/introduction.apt
@@ -0,0 +1,27 @@
+ -----
+Introduction
+ -----
+Kenney Westerhof
+ -----
+10 August 2005
+ -----
+
+Introduction
+
+  This plugin provides the ability to run Ant tasks from
+  within Maven2. You can even embed your ant scripts in the POM!
+
+  It is <not> the intention of this plugin to provide a means
+  of polluting the POM, so it's encouraged to move all your
+  Ant tasks to a build.xml file and just call it from the POM
+  using Ant's {{{http://ant.apache.org/manual/CoreTasks/ant.html}\<ant/\> task}}.
+
+  One of the main goals of this plugin is to ease the migration from 
+  Ant based projects to Maven 2. A lot of projects are currently unable
+  to migrate simply because they depend on some custom build functionality
+  that Maven2 doesn't provide yet.
+      
+  Even with plugins widely available there will always be simple, small
+  tasks that can be done using one or two lines of Ant script (like
+  deploying an EAR), until ofcourse a plugin comes available that does
+  the job.
diff --git a/src/site/xdoc/usage.xml b/src/site/apt/usage.apt
similarity index 55%
rename from src/site/xdoc/usage.xml
rename to src/site/apt/usage.apt
index 7c930dc..87b0fac 100644
--- a/src/site/xdoc/usage.xml
+++ b/src/site/apt/usage.apt
@@ -1,19 +1,16 @@
-<?xml version="1.0"?>
+ ----
+Usage
+ ----
+Kenney Westerhof
+ ----
+10 August 2005
+ ----
 
-<document>
-  <properties>
-    <author email="kenney@apache.org">Kenney Westerhof</author>
-    <title>Introduction</title>
-  </properties>
-  <head/>
-  <body>
-    <section name="Usage">
-      <p>
-        For those of you unfamiliar with configuring a plugin see the example
-        below:
+Usage
 
-        <source>
-<![CDATA[
+  For those of you unfamiliar with configuring a plugin see the example below:
+
+------
 <project>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>my-test-app</artifactId>
@@ -49,17 +46,9 @@
     </plugins>
   </build>
 </project>
-]]>
-        </source>
-      </p>
-
-      <p>
-        The example above illustrates how to bind an ant script to a
-        lifecycle phase. You can add a script to each lifecycle phase,
-        by duplicating the <![CDATA[<execution/>]]> section and specifying
-        a new phase.
-      </p>
-    </section>
+------
 
-  </body>
-</document>
+  The example above illustrates how to bind an ant script to a
+  lifecycle phase. You can add a script to each lifecycle phase,
+  by duplicating the <<<\<execution/\>>>> section and specifying
+  a new phase.
diff --git a/src/site/xdoc/introduction.xml b/src/site/xdoc/introduction.xml
deleted file mode 100644
index 5434221..0000000
--- a/src/site/xdoc/introduction.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-
-<document>
-  <properties>
-    <author email="kenney@apache.org">Kenney Westerhof</author>
-    <title>Introduction</title>
-  </properties>
-  <head/>
-  <body>
-    <section name="Introduction">
-      <p>
-        This plugin provides the ability to run Ant tasks from
-        within Maven2. You can even embed your ant scripts in the POM!
-      </p>
-
-      <p>
-        It is <emph>not</emph> the intention of this plugin to provide a means
-        of polluting the POM, so it's encouraged to move all your
-        Ant tasks to a build.xml file and just call it from the POM
-        using Ant's <a href="http://ant.apache.org/manual/CoreTasks/ant.html">&lt;ant/&gt; task</a>.
-      </p>
-
-      <p>
-        One of the main goals of this plugin is to ease the migration from 
-        Ant based projects to Maven 2. A lot of projects are currently unable
-        to migrate simply because they depend on some custom build functionality
-        that Maven2 doesn't provide yet.
-      </p>
-      
-      <p>
-        Even with plugins widely available there will always be simple, small
-        tasks that can be done using one or two lines of Ant script (like
-        deploying an EAR), until ofcourse a plugin comes available that does
-        the job.
-      </p>
-
-    </section>
-  </body>
-</document>

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 22/26: StringIndexOutOfBoundsException in custom ant task referencing 'basedir' PR: MANTRUN-34 Submitted By: Marcel Schutte

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 224ea526d91f1f423c57cd020193d4f1e50b4c2e
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sat Dec 31 18:18:11 2005 +0000

    StringIndexOutOfBoundsException in custom ant task referencing 'basedir'
    PR: MANTRUN-34
    Submitted By: Marcel Schutte
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@360386 13f79535-47bb-0310-9956-ffa450edef68
---
 .../maven/plugin/antrun/AntPropertyHelper.java     | 31 +++++++++++++---------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java b/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
index 02abfde..82b487b 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
@@ -44,19 +44,24 @@ public class AntPropertyHelper
     {
         log.debug( "getProperty(ns="+ns+", name="+name+", user="+user+")" );
 
+        Object val = null;
         try
         {
-            if ( name.startsWith( "project." ) || name.equals( "basedir" ) )
+            if ( name.startsWith( "project." ) )
             {
-                Object val = ReflectionValueExtractor.evaluate(
-                    name.substring( "project.".length() ),
-                    mavenProject
+                val = ReflectionValueExtractor.evaluate(
+                    name,
+                    mavenProject,
+                    true
+                );
+            }
+            else if ( name.equals("basedir") )
+            {
+                val = ReflectionValueExtractor.evaluate(
+                    "basedir.path",
+                    mavenProject,
+                    false
                 );
-
-                if ( val != null )
-                {
-                    return val;
-                }
             }
         }
         catch ( Exception e )
@@ -65,11 +70,13 @@ public class AntPropertyHelper
             e.printStackTrace();
         }
 
-        Object val = super.getPropertyHook( ns, name, user );
-
         if ( val == null )
         {
-            val = System.getProperty( name.toString() );
+            val = super.getPropertyHook( ns, name, user );
+            if ( val == null )
+            {
+                val = System.getProperty( name.toString() );
+            }
         }
 
         return val;

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 10/26: Improved docs Submitted by: Lee Meador PR: MNG-1660

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 207451cbcc78254756deccbed734fd5ccd9f1051
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Tue Nov 29 02:56:51 2005 +0000

    Improved docs
    Submitted by: Lee Meador
    PR: MNG-1660
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@349599 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/maven/plugin/antrun/AntRunMojo.java | 13 +++--
 src/site/apt/usage.apt                             | 55 ++++++++++++++++++++++
 2 files changed, 65 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java b/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
index be93efa..408e24a 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
@@ -51,19 +51,26 @@ public class AntRunMojo
     private MavenProject project;
 
     /**
-     * Any ant task. You can add anything you can add between &lt;target> and &lt;/target> in a build.xml.
+     * The XML for the Ant task. You can add anything you can add 
+     * between &lt;target> and &lt;/target> in a build.xml.
      * @parameter expression="${tasks}"
      */
     private Target tasks;
 
     /**
-     * If you generate sources set this property to the target dir so they are available for compilation
+     * This folder is added to the list of those folders
+     * containing source to be compiled. Use this if your
+     * ant script generates source code.
+     *
      * @parameter expression="${sourceRoot}"
      */
     private File sourceRoot;
 
     /**
-     * If you generate test sources set this property to the target dir so they are available for compilation
+     * This folder is added to the list of those folders
+     * containing source to be compiled for testing. Use this if your
+     * ant script generates test source code.
+     *
      * @parameter expression="${testSourceRoot}"
      */
     private File testSourceRoot;
diff --git a/src/site/apt/usage.apt b/src/site/apt/usage.apt
index 87b0fac..d505e03 100644
--- a/src/site/apt/usage.apt
+++ b/src/site/apt/usage.apt
@@ -52,3 +52,58 @@ Usage
   lifecycle phase. You can add a script to each lifecycle phase,
   by duplicating the <<<\<execution/\>>>> section and specifying
   a new phase.
+  
+  
+  Below you can see how to indicate that ant has generated some more java
+  source that needs to be included in the compilation phase. Note that the
+  compile phase follows the generate-sources phase in the lifecycle.
+
+------
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>my-test-app</artifactId>
+  <groupId>my-test-group</groupId>
+  <version>1.0-SNAPSHOT</version>
+
+  <build>
+    <plugins>
+
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <configuration>
+              <tasks>
+
+                <!--
+                  Place any ant task here. You can add anything
+                  you can add between <target> and </target> in a
+                  build.xml.
+                -->
+
+              </tasks>
+              <sourceRoot>${project.build.directory}/generated-sources/main/java</sourceRoot>
+              <testSourceRoot>${project.build.directory}/generated-sources/test/java</testSourceRoot>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+  </build>
+</project>
+------
+
+  Of course, you can put whatever folder you prefer. The folders in the example above are
+  handy because they are deleted when you "clean" since they are in the build directory
+  (which is, by default, "target"). 
+
+  <<<\<sourceRoot/\>>>> adds a single folder to the
+  list of folders that get compiled with the program source code (compile).
+
+  <<<\<testSourceRoot/\>>>> adds a single folder to the
+  list of folders that get compiled with the test source code (test-compile).

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 26/26: [maven-scm] copy for tag maven-antrun-plugin-1.1

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 8c3236ba6cadf609ad5df89a029457a2ea1047a7
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Wed Jan 4 16:12:16 2006 +0000

    [maven-scm] copy for tag maven-antrun-plugin-1.1
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/tags/maven-antrun-plugin-1.1@365930 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3813d22..37c4fee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,4 @@
-<project>
+<?xml version="1.0" encoding="UTF-8"?><project>
   <parent>
     <artifactId>maven-plugin-parent</artifactId>
     <groupId>org.apache.maven.plugins</groupId>
@@ -8,7 +8,7 @@
   <artifactId>maven-antrun-plugin</artifactId>
   <packaging>maven-plugin</packaging>
   <name>Maven AntRun Plugin</name>
-  <version>1.1-SNAPSHOT</version>
+  <version>1.1</version>
   <description>Runs ant scripts embedded in the POM</description>
   <developers>
     <developer>
@@ -34,4 +34,4 @@
       <version>1.6.5</version>
     </dependency>
   </dependencies>
-</project>
+</project>
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 17/26: maven.test.classpath doesn't contain test scope dependencies PR: MANTRUN-28 Submitted By: Gilles Scokart

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 992e1bbf213686bc92de4b50bc563b1ca640fcb1
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Fri Dec 30 19:06:26 2005 +0000

    maven.test.classpath doesn't contain test scope dependencies
    PR: MANTRUN-28
    Submitted By: Gilles Scokart
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@360146 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java b/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
index 408e24a..b2154fd 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
@@ -38,7 +38,7 @@ import org.apache.tools.ant.Target;
  * 
  * @description Runs the nested ant tasks
  * 
- * @requiresDependencyResolution
+ * @requiresDependencyResolution test
  */
 public class AntRunMojo
     extends AbstractAntMojo

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 09/26: Added docs

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 0f20142b5e675fd28609762fbfbc9a96813f45d6
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Tue Nov 29 00:29:10 2005 +0000

    Added docs
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@349562 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java b/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
index 56a829c..be93efa 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
@@ -51,16 +51,19 @@ public class AntRunMojo
     private MavenProject project;
 
     /**
+     * Any ant task. You can add anything you can add between &lt;target> and &lt;/target> in a build.xml.
      * @parameter expression="${tasks}"
      */
     private Target tasks;
 
     /**
+     * If you generate sources set this property to the target dir so they are available for compilation
      * @parameter expression="${sourceRoot}"
      */
     private File sourceRoot;
 
     /**
+     * If you generate test sources set this property to the target dir so they are available for compilation
      * @parameter expression="${testSourceRoot}"
      */
     private File testSourceRoot;

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 11/26: Refactor

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit 22569fb63985e61f56458ff8f4cb6d9c217bbb23
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Wed Nov 30 00:06:30 2005 +0000

    Refactor
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@349847 13f79535-47bb-0310-9956-ffa450edef68
---
 .../maven/plugin/antrun/AbstractAntMojo.java       | 31 +++++++++++-----------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java b/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
index 88513c7..cc5a29f 100644
--- a/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
+++ b/src/main/java/org/apache/maven/plugin/antrun/AbstractAntMojo.java
@@ -37,35 +37,34 @@ public abstract class AbstractAntMojo
     protected void executeTasks( Target antTasks, MavenProject mavenProject )
         throws MojoExecutionException
     {
-    	try
+        try
         {
-            PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(
-                antTasks.getProject()
-            );
+            Project antProject = antTasks.getProject();
 
-            propertyHelper.setNext(
-                new AntPropertyHelper( mavenProject, getLog() )
-            );
+            PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper( antProject );
+
+            propertyHelper.setNext( new AntPropertyHelper( mavenProject, getLog() ) );
 
             DefaultLogger antLogger = new DefaultLogger();
             antLogger.setOutputPrintStream( System.out );
             antLogger.setErrorPrintStream( System.err );
             antLogger.setMessageOutputLevel( Project.MSG_INFO );
 
-            antTasks.getProject().addBuildListener( antLogger );
-            antTasks.getProject().setBaseDir( mavenProject.getBasedir() );
+            antProject.addBuildListener( antLogger );
+            antProject.setBaseDir( mavenProject.getBasedir() );
 
-            Path p = new Path( antTasks.getProject() );
+            Path p = new Path( antProject );
             p.setPath( StringUtils.join( mavenProject.getArtifacts().iterator(), File.pathSeparator ) );
-            antTasks.getProject().addReference( "maven.dependency.classpath", p );
+            antProject.addReference( "maven.dependency.classpath", p );
+            p = new Path( antProject );
             p.setPath( StringUtils.join( mavenProject.getCompileClasspathElements().iterator(), File.pathSeparator ) );
-            antTasks.getProject().addReference( "maven.compile.classpath", p );
-            p = new Path( antTasks.getProject() );
+            antProject.addReference( "maven.compile.classpath", p );
+            p = new Path( antProject );
             p.setPath( StringUtils.join( mavenProject.getRuntimeClasspathElements().iterator(), File.pathSeparator ) );
-            antTasks.getProject().addReference( "maven.runtime.classpath", p );
-            p = new Path( antTasks.getProject() );
+            antProject.addReference( "maven.runtime.classpath", p );
+            p = new Path( antProject );
             p.setPath( StringUtils.join( mavenProject.getTestClasspathElements().iterator(), File.pathSeparator ) );
-            antTasks.getProject().addReference( "maven.test.classpath", p );
+            antProject.addReference( "maven.test.classpath", p );
 
             getLog().info( "Executing tasks" );
 

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.

[maven-antrun-plugin] 13/26: Added integration test

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-antrun-plugin-1.1
in repository https://gitbox.apache.org/repos/asf/maven-antrun-plugin.git

commit a27bd60c54ad6f744e2b1d8cd50d7b49277aa29d
Author: Carlos Sanchez Gonzalez <ca...@apache.org>
AuthorDate: Sun Dec 11 02:03:58 2005 +0000

    Added integration test
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin@355869 13f79535-47bb-0310-9956-ffa450edef68
---
 src/test/projects/test1/build.xml               | 19 +++++++++++++
 src/test/projects/test1/pom.xml                 | 38 +++++++++++++++++++++++++
 src/test/projects/test1/src/main/java/Test.java |  7 +++++
 3 files changed, 64 insertions(+)

diff --git a/src/test/projects/test1/build.xml b/src/test/projects/test1/build.xml
new file mode 100644
index 0000000..67a0fe8
--- /dev/null
+++ b/src/test/projects/test1/build.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<project name="test1">
+
+    <target name="test">
+
+        <path id="classpath">
+            <path refid="maven.dependency.classpath"/>
+            <path refid="maven.compile.classpath"/>
+        	<path refid="maven.runtime.classpath"/>
+        	<path refid="maven.test.classpath"/>
+            <path refid="maven.plugin.classpath"/>
+        </path>
+        <java failonerror="true" classname="Test" fork="true" newenvironment="true">
+        	<classpath refid="classpath"/>
+        </java>
+
+    </target>
+
+</project>
diff --git a/src/test/projects/test1/pom.xml b/src/test/projects/test1/pom.xml
new file mode 100644
index 0000000..3f3fe18
--- /dev/null
+++ b/src/test/projects/test1/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/home/jdcasey/xml-schemas/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  
+  <groupId>org.apache.maven.plugins.antrun</groupId>
+  <artifactId>test1</artifactId>
+  <version>1.0-SNAPSHOT</version>
+ 
+  <dependencies>
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>generate-sources</id>
+            <phase>generate-sources</phase>
+            <configuration>
+              <sourceRoot>target/generated/src/main/java</sourceRoot>
+              <tasks>
+                <ant antfile="${basedir}/build.xml" inheritall="true">
+                  <target name="test"/>
+                </ant>
+              </tasks>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/src/test/projects/test1/src/main/java/Test.java b/src/test/projects/test1/src/main/java/Test.java
new file mode 100644
index 0000000..6a610af
--- /dev/null
+++ b/src/test/projects/test1/src/main/java/Test.java
@@ -0,0 +1,7 @@
+public class Test {
+
+    public static void main(String args[]) {
+        System.out.println("done");
+    }
+
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.