You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gb...@apache.org on 2017/05/30 21:26:32 UTC

svn commit: r1796945 - in /maven/plugins/trunk/maven-antrun-plugin/src: it/ant-1.7-features/ it/antrun-default-test/ it/attach-artifact-test/ it/classpath-ref-test/ it/classpath-test-scope-test/ it/copy-fail-test/ it/custom-task-test/ it/env-var-test/ ...

Author: gboue
Date: Tue May 30 21:26:31 2017
New Revision: 1796945

URL: http://svn.apache.org/viewvc?rev=1796945&view=rev
Log:
[MANTRUN-202] Fail the build when deprecated parameters tasks, sourceRoot or testSourceRoot are used

With the upgrade to Maven 3, deprecated parameters should fail the build when used, in order to prepare their complete removal from the code. The ITs are updated to reflect this.

Modified:
    maven/plugins/trunk/maven-antrun-plugin/src/it/ant-1.7-features/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/antrun-default-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-ref-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-test-scope-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/copy-fail-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/custom-task-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/env-var-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/filesets-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/multiple-phase-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/never-fail-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/plugin-classpath-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/properties-attributes-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/task-encoding-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/it/tasksattributes-test/pom.xml
    maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java
    maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/classpaths.apt.vm
    maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt.vm
    maven/plugins/trunk/maven-antrun-plugin/src/site/apt/usage.apt.vm

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/ant-1.7-features/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/ant-1.7-features/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/ant-1.7-features/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/ant-1.7-features/pom.xml Tue May 30 21:26:31 2017
@@ -37,11 +37,11 @@
           <execution>
             <phase>test</phase>
             <configuration>
-              <tasks>
+              <target>
                 <echoxml file="echo.xml">
                   <test/>
                 </echoxml>
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/antrun-default-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/antrun-default-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/antrun-default-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/antrun-default-test/pom.xml Tue May 30 21:26:31 2017
@@ -45,9 +45,9 @@ under the License.
         <artifactId>maven-antrun-plugin</artifactId>
         <version>@pom.version@</version>
         <configuration>
-          <tasks>
+          <target>
             <echo message="Hello World!"/>
-          </tasks>
+          </target>
         </configuration>
       </plugin>
     </plugins>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test/pom.xml Tue May 30 21:26:31 2017
@@ -44,14 +44,14 @@ under the License.
               <goal>run</goal>
             </goals>
             <configuration>
-              <tasks>
+              <target>
                 <zip destfile="junk.zip"
                      basedir="."
                      includes="*.xml"
                     />
                 <attachartifact file="junk.zip" classifier="foo" type="zip"/>
                 <attachartifact file="junk.zip" type="zip"/>
-              </tasks>
+              </target>
             </configuration>
           </execution>
         </executions>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-ref-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-ref-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-ref-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-ref-test/pom.xml Tue May 30 21:26:31 2017
@@ -49,8 +49,7 @@ under the License.
             <id>compile</id>
             <phase>compile</phase>
             <configuration>
-              <sourceRoot>target/generated/src/main/java</sourceRoot>
-              <tasks>
+              <target>
 
                 <path id="classpath">
                   <path refid="maven.compile.classpath"/>
@@ -67,7 +66,7 @@ under the License.
                   <target name="test"/>
                 </ant>
 
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-test-scope-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-test-scope-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-test-scope-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/classpath-test-scope-test/pom.xml Tue May 30 21:26:31 2017
@@ -48,7 +48,7 @@ under the License.
           <execution>
             <phase>test</phase>
             <configuration>
-              <tasks>
+              <target>
                 <property name="test.classpath" refid="maven.test.classpath"/>
                 <echo>${test.classpath}</echo>
                 <fail message="Test classpath doesn't contain test scoped dependencies">
@@ -58,7 +58,7 @@ under the License.
                     </not>
                   </condition>
                 </fail>
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/copy-fail-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/copy-fail-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/copy-fail-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/copy-fail-test/pom.xml Tue May 30 21:26:31 2017
@@ -37,7 +37,7 @@ under the License.
         <artifactId>maven-antrun-plugin</artifactId>
         <version>@pom.version@</version>
         <configuration>
-          <tasks>
+          <target>
 
             <copy file="${basedir}/pom.xml" tofile="${project.build.directory}/pom-copy.xml" overwrite="true"
                   verbose="true" failonerror="true"/>
@@ -49,7 +49,7 @@ under the License.
             </copy>
             <copy file="${basedir}/pom.xml" tofile="${project.build.directory}/pom-copy2.xml"/>
 
-          </tasks>
+          </target>
         </configuration>
       </plugin>
     </plugins>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/custom-task-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/custom-task-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/custom-task-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/custom-task-test/pom.xml Tue May 30 21:26:31 2017
@@ -47,7 +47,7 @@ under the License.
           <execution>
             <phase>test</phase>
             <configuration>
-              <tasks>
+              <target>
 
                 <echo message="basedir:${basedir}"/>
                 <echo message="sourceDirectory:${project.build.sourceDirectory}"/>
@@ -59,7 +59,7 @@ under the License.
                 </taskdef>
                 <test/>
 
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/env-var-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/env-var-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/env-var-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/env-var-test/pom.xml Tue May 30 21:26:31 2017
@@ -48,7 +48,7 @@ under the License.
           <execution>
             <phase>test</phase>
             <configuration>
-              <tasks>
+              <target>
                 <echo>user.home = ${user.home}</echo>
                 <fail message="user.home is not set">
                   <condition>
@@ -60,7 +60,7 @@ under the License.
                 <ant antfile="${basedir}/build.xml" inheritAll="true" inheritRefs="true">
                   <target name="test"/>
                 </ant>
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/filesets-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/filesets-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/filesets-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/filesets-test/pom.xml Tue May 30 21:26:31 2017
@@ -44,7 +44,7 @@ under the License.
               <goal>run</goal>
             </goals>
             <configuration>
-              <tasks>
+              <target>
 
                 <dependencyfilesets prefix="test."/>
                 <mkdir dir="target/dependencies"/>
@@ -58,7 +58,7 @@ under the License.
                   <fileset refid="test.maven.project.dependencies"/>
                 </copy>
 
-              </tasks>
+              </target>
             </configuration>
           </execution>
         </executions>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/local-repo-prop-test/pom.xml Tue May 30 21:26:31 2017
@@ -45,7 +45,7 @@ under the License.
         <artifactId>maven-antrun-plugin</artifactId>
         <version>@pom.version@</version>
         <configuration>
-          <tasks>
+          <target>
             <echo message="${localRepository}"/>
             <fail message="localRepository property not set">
               <condition>
@@ -62,7 +62,7 @@ under the License.
                 </not>
               </condition>
             </fail>
-          </tasks>
+          </target>
         </configuration>
       </plugin>
     </plugins>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/multiple-phase-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/multiple-phase-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/multiple-phase-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/multiple-phase-test/pom.xml Tue May 30 21:26:31 2017
@@ -43,9 +43,9 @@ under the License.
             </goals>
             <phase>validate</phase>
             <configuration>
-              <tasks>
+              <target>
                 <echo message="validate-phase" file="phase-1.txt"/>
-              </tasks>
+              </target>
             </configuration>
           </execution>
           <execution>
@@ -55,9 +55,9 @@ under the License.
             </goals>
             <phase>generate-resources</phase>
             <configuration>
-              <tasks>
+              <target>
                 <echo message="generate-resources-phase" file="phase-2.txt"/>
-              </tasks>
+              </target>
             </configuration>
           </execution>
         </executions>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/never-fail-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/never-fail-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/never-fail-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/never-fail-test/pom.xml Tue May 30 21:26:31 2017
@@ -38,9 +38,9 @@ under the License.
         <version>@pom.version@</version>
         <configuration>
           <failOnError>false</failOnError>
-          <tasks>
+          <target>
             <fail>This is a failure</fail>
-          </tasks>
+          </target>
         </configuration>
       </plugin>
     </plugins>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/plugin-classpath-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/plugin-classpath-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/plugin-classpath-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/plugin-classpath-test/pom.xml Tue May 30 21:26:31 2017
@@ -44,11 +44,11 @@ under the License.
             <id>compile</id>
             <phase>compile</phase>
             <configuration>
-              <tasks>
+              <target>
                 <ant antfile="${basedir}/build.xml" inheritRefs="true">
                   <target name="test"/>
                 </ant>
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/properties-attributes-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/properties-attributes-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/properties-attributes-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/properties-attributes-test/pom.xml Tue May 30 21:26:31 2017
@@ -46,7 +46,7 @@ under the License.
           <execution>
             <phase>test</phase>
             <configuration>
-              <tasks>
+              <target>
 
                 <ant antfile="${basedir}/build.xml" inheritAll="true" inheritRefs="true">
                   <target name="test"/>
@@ -81,7 +81,7 @@ under the License.
                     </or>
                   </condition>
                 </fail>
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/build.xml Tue May 30 21:26:31 2017
@@ -42,9 +42,6 @@ under the License.
     <!-- Dependency artifact properties -->
     <echo message="junit:junit:jar : ${junit:junit:jar}"/>
     <fail unless="junit:junit:jar" message="Property not set \${junit:junit:jar}"/>
-    <echo message="maven.dependency.junit.junit.jar.path : ${maven.dependency.junit.junit.jar.path}"/>
-    <fail unless="maven.dependency.junit.junit.jar.path"
-          message="Property not set \${maven.dependency.junit.junit.jar.path}"/>
 
     <!-- Check that the build output dir is pointing to the correct location -->
     <property name="outputDir" location="./target/classes"/>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/properties-test/pom.xml Tue May 30 21:26:31 2017
@@ -53,13 +53,13 @@ under the License.
               <goal>run</goal>
             </goals>
             <configuration>
-              <tasks>
+              <target>
 
                 <ant antfile="${basedir}/build.xml" inheritRefs="true">
                   <target name="test"/>
                 </ant>
 
-              </tasks>
+              </target>
             </configuration>
           </execution>
         </executions>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/task-encoding-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/task-encoding-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/task-encoding-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/task-encoding-test/pom.xml Tue May 30 21:26:31 2017
@@ -48,12 +48,12 @@ under the License.
               <goal>run</goal>
             </goals>
             <configuration>
-              <tasks>
+              <target>
                 <!-- non-ASCII chars: ÅÄÖ -->
                 <echo message="non-ASCII chars: ÅÄÖ"/>
                 <!-- escaped characters -->
                 <echo message="Some &quot;strange and mysterious&quot; result"/>
-              </tasks>
+              </target>
             </configuration>
           </execution>
         </executions>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/tasksattributes-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/tasksattributes-test/pom.xml?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/tasksattributes-test/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/tasksattributes-test/pom.xml Tue May 30 21:26:31 2017
@@ -43,9 +43,9 @@ under the License.
             <id>if</id>
             <phase>compile</phase>
             <configuration>
-              <tasks if="maven.test.skip">
+              <target if="maven.test.skip">
                 <echo>[ANTRUN-OUTPUT-MARKER:IF]</echo>
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>
@@ -55,9 +55,9 @@ under the License.
             <id>unless</id>
             <phase>compile</phase>
             <configuration>
-              <tasks unless="maven.test.skip">
+              <target unless="maven.test.skip">
                 <echo>[ANTRUN-OUTPUT-MARKER:UNLESS]</echo>
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>

Modified: maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java Tue May 30 21:26:31 2017
@@ -35,6 +35,7 @@ import org.apache.maven.artifact.Depende
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
@@ -57,7 +58,7 @@ import org.codehaus.plexus.util.StringUt
 /**
  * Maven AntRun Mojo. <br/>
  * This plugin provides the capability of calling Ant tasks from a POM by running the nested Ant tasks inside the
- * &lt;tasks/&gt; parameter. It is encouraged to move the actual tasks to a separate build.xml file and call that file
+ * &lt;target/&gt; parameter. It is encouraged to move the actual tasks to a separate build.xml file and call that file
  * with an &lt;ant/&gt; task.
  *
  * @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
@@ -172,8 +173,10 @@ public class AntRunMojo
      * The XML for the Ant task. You can add anything you can add between &lt;target&gt; and &lt;/target&gt; in a
      * build.xml.
      *
-     * @deprecated Use target instead
+     * @deprecated Use {@link #target} instead. For version 3.0.0, this parameter is only defined to break the build if
+     *             you use it!
      */
+    @Deprecated
     @Parameter
     private PlexusConfiguration tasks;
 
@@ -190,8 +193,10 @@ public class AntRunMojo
      * This folder is added to the list of those folders containing source to be compiled. Use this if your Ant script
      * generates source code.
      *
-     * @deprecated Use the build-helper-maven-plugin to bind source directories
+     * @deprecated Use the <code>build-helper-maven-plugin</code> to bind source directories. For version 3.0.0, this
+     *             parameter is only defined to break the build if you use it!
      */
+    @Deprecated
     @Parameter( property = "sourceRoot" )
     private File sourceRoot;
 
@@ -199,8 +204,10 @@ public class AntRunMojo
      * 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.
      *
-     * @deprecated Use the build-helper-maven-plugin to bind test source directories
+     * @deprecated Use the <code>build-helper-maven-plugin</code> to bind test source directories. For version 3.0.0,
+     *             this parameter is only defined to break the build if you use it!
      */
+    @Deprecated
     @Parameter( property = "testSourceRoot" )
     private File testSourceRoot;
 
@@ -232,8 +239,11 @@ public class AntRunMojo
 
     /** {@inheritDoc} */
     public void execute()
-        throws MojoExecutionException
+        throws MojoExecutionException, MojoFailureException
     {
+        checkDeprecatedParameterUsage( tasks, "tasks", "target" );
+        checkDeprecatedParameterUsage( sourceRoot, "sourceRoot", "the build-helper-maven-plugin" );
+        checkDeprecatedParameterUsage( testSourceRoot, "testSourceRoot", "the build-helper-maven-plugin" );
         if ( skip )
         {
             getLog().info( "Skipping Antrun execution" );
@@ -242,12 +252,6 @@ public class AntRunMojo
 
         MavenProject mavenProject = getMavenProject();
 
-        if ( tasks != null )
-        {
-            getLog().warn( "Parameter tasks is deprecated, use target instead" );
-            target = tasks;
-        }
-
         if ( target == null )
         {
             getLog().info( "No Ant target defined - SKIPPED" );
@@ -362,17 +366,16 @@ public class AntRunMojo
         {
             throw new MojoExecutionException( "Error executing Ant tasks: " + e.getMessage(), e );
         }
+    }
 
-        if ( sourceRoot != null )
-        {
-            getLog().info( "Registering compile source root " + sourceRoot );
-            getMavenProject().addCompileSourceRoot( sourceRoot.toString() );
-        }
-
-        if ( testSourceRoot != null )
+    private void checkDeprecatedParameterUsage( Object parameter, String name, String replacement )
+        throws MojoFailureException
+    {
+        if ( parameter != null )
         {
-            getLog().info( "Registering compile test source root " + testSourceRoot );
-            getMavenProject().addTestCompileSourceRoot( testSourceRoot.toString() );
+            throw new MojoFailureException( "You are using '" + name + "' which has been removed"
+                + " from the maven-antrun-plugin. Please use '" + replacement
+                + "' and refer to the >>Major Version Upgrade to version 3.0.0<< " + "on the plugin site." );
         }
     }
 
@@ -465,15 +468,6 @@ public class AntRunMojo
             versionsBuffer.append( artifact.getVersion() ).append( File.pathSeparator );
         }
         antProject.setProperty( versionsPropertyName, versionsBuffer.toString() );
-
-        // Add properties in deprecated format to depenedency artifacts
-        // This should be removed in future versions of the antrun plugin.
-        for ( Artifact artifact : depArtifacts )
-        {
-            String propName = getDependencyArtifactPropertyName( artifact );
-
-            antProject.setProperty( propName, artifact.getFile().getPath() );
-        }
     }
 
     /**
@@ -509,28 +503,6 @@ public class AntRunMojo
     }
 
     /**
-     * Prefix for legacy property format.
-     *
-     * @deprecated This should only be used for generating the old property format.
-     */
-    public static final String DEPENDENCY_PREFIX = "maven.dependency.";
-
-    /**
-     * Returns a property name for a dependency artifact. The name is in the format
-     * maven.dependency.groupId.artifactId[.classifier].type.path
-     *
-     * @param artifact {@link Artifact}
-     * @return property name
-     * @deprecated The dependency conflict ID should be used as the property name.
-     */
-    public static String getDependencyArtifactPropertyName( Artifact artifact )
-    {
-        return DEPENDENCY_PREFIX + artifact.getGroupId() + "." + artifact.getArtifactId()
-            + ( artifact.getClassifier() != null ? "." + artifact.getClassifier() : "" )
-            + ( artifact.getType() != null ? "." + artifact.getType() : "" ) + ".path";
-    }
-
-    /**
      * Get the current Maven project
      *
      * @return current Maven project
@@ -571,10 +543,6 @@ public class AntRunMojo
 
         StringBuilder antProjectConfig = new StringBuilder( writer.getBuffer() );
 
-        // replace deprecated tasks tag with standard Ant target
-        stringReplace( antProjectConfig, "<tasks", "<target" );
-        stringReplace( antProjectConfig, "</tasks", "</target" );
-
         antTargetName = target.getAttribute( "name" );
 
         if ( antTargetName == null )

Modified: maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/classpaths.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/classpaths.apt.vm?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/classpaths.apt.vm (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/classpaths.apt.vm Tue May 30 21:26:31 2017
@@ -45,8 +45,8 @@ Referencing the Maven Classpaths
 <echo message="${D}{org.apache:common-util:jar:jdk14}"/> 
 ------
  
- <<Note:>> the old format "maven.dependency.groupId.artifactId[.classifier].type.path" has 
- been deprecated and should no longer be used.
+ <<Note:>> the old format "maven.dependency.groupId.artifactId[.classifier].type.path" is not supported as of version 
+ 3.0.0 of the plugin.
  
  You can also use these classpath references:
   

Modified: maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt.vm?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt.vm (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt.vm Tue May 30 21:26:31 2017
@@ -45,6 +45,20 @@ ${project.name}
 
   * {{{./run-mojo.html}antrun:run}} runs Ant tasks for Maven.
 
+* Major Version Upgrade to version 3.0.0
+
+  Please note that the following parameters have been completely removed from the plugin configuration:
+
+   * <<<tasks>>>: use <<<target>>> instead;
+
+   * <<<sourceRoot>>> and <<<testSourceRoot>>>: you can use the 
+   {{{http://www.mojohaus.org/build-helper-maven-plugin/}build-helper-maven-plugin}} instead, with its 
+   {{{http://www.mojohaus.org/build-helper-maven-plugin/add-source-mojo.html}add-source}} and 
+   {{{http://www.mojohaus.org/build-helper-maven-plugin/add-test-source-mojo.html}add-test-source}} goals.
+
+  The format <<<maven.dependency.groupId.artifactId[.classifier].type.path>>> to reference the path of a project
+  dependency as an Ant property has been removed: use <<<groupId:artifactId:type[:classifier]>>> instead.
+
 * Usage
 
   General instructions on how to use the AntRun Plugin can be found on the {{{./usage.html}usage page}}. Some more

Modified: maven/plugins/trunk/maven-antrun-plugin/src/site/apt/usage.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/site/apt/usage.apt.vm?rev=1796945&r1=1796944&r2=1796945&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/site/apt/usage.apt.vm (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/site/apt/usage.apt.vm Tue May 30 21:26:31 2017
@@ -101,8 +101,8 @@ Usage
 
   If your Ant tasks generate additional source code that needs to be added 
   to the build, you can use the 
-  {{{http://mojo.codehaus.org/build-helper-maven-plugin/}build-helper-maven-plugin}}.  
-  The sourceRoot and testSourceRoot options of the antrun plugin have been deprecated.
+  {{{http://www.mojohaus.org/build-helper-maven-plugin/}build-helper-maven-plugin}}.  
+  The <<<sourceRoot>>> and <<<testSourceRoot>>> options of the antrun plugin are removed as of version 3.0.0.
 
 * Using Maven properties