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/06/17 14:46:13 UTC

svn commit: r1799014 - in /maven/plugins/trunk/maven-antrun-plugin: ./ src/it/MANTRUN-179/ src/it/attach-artifact-test-with-prefix-unknown/ src/it/attach-artifact-test-with-prefix/ src/it/custom-ant-target-attributes/ src/main/java/org/apache/maven/plu...

Author: gboue
Date: Sat Jun 17 14:46:13 2017
New Revision: 1799014

URL: http://svn.apache.org/viewvc?rev=1799014&view=rev
Log:
[MANTRUN-179] Seems impossible to use combine.* attributes with maven-antrun-plugin configuration

During creation of the temporary Ant file, the Maven combine.children and combine.self attributes of the XML plugin configuration elements should be removed. Also refactoring the code generating the Ant build file, which is only the responsibility of the writer and not the Mojo, to use proper XML serialization instead of string manipulations.

Added:
    maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/
    maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/pom.xml   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/verify.bsh   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/invoker.properties   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/pom.xml   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/test.txt   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/invoker.properties   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/pom.xml   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/test.txt   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/verify.bsh   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/
    maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/pom.xml   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/verify.groovy   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/
    maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/
    maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/
    maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/plugins/
    maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/plugins/antrun/
    maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/
    maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/basic.xml   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/combine-attributes.xml   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/custom-task-prefix.xml   (with props)
    maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/empty-target.xml   (with props)
Modified:
    maven/plugins/trunk/maven-antrun-plugin/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/main/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriter.java

Modified: maven/plugins/trunk/maven-antrun-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/pom.xml?rev=1799014&r1=1799013&r2=1799014&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/pom.xml Sat Jun 17 14:46:13 2017
@@ -91,5 +91,34 @@ under the License.
       <artifactId>ant</artifactId>
       <version>1.9.4</version>
     </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>xmlunit</groupId>
+      <artifactId>xmlunit</artifactId>
+      <version>1.6</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <configuration>
+            <excludes combine.children="append">
+              <exclude>src/test/resources/configuration-writer/*.xml</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
 </project>

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/pom.xml?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/pom.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/pom.xml Sat Jun 17 14:46:13 2017
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<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>MANTRUN-179</artifactId>
+  <packaging>pom</packaging>
+  <version>1.0</version>
+  <url>https://issues.apache.org/jira/browse/MANTRUN-179</url>
+  <description>Checks that combine.* attributes in target do not interfere with Ant execution.</description>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-antrun-plugin</artifactId>
+          <version>@pom.version@</version>
+          <configuration>
+            <target>
+              <echo>From the pluginManagement</echo>
+            </target>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>test</id>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <phase>validate</phase>
+            <configuration>
+              <target name="mytest" combine.children="append">
+                <echo>From the exec config</echo>
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/verify.bsh?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/verify.bsh (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/verify.bsh Sat Jun 17 14:46:13 2017
@@ -0,0 +1,43 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+import org.codehaus.plexus.util.FileUtils;
+
+try
+{
+    File buildLog = new File( basedir, "build.log" );
+    String log = FileUtils.fileRead( buildLog );
+
+    if ( !log.contains( "[echo] From the pluginManagement" ) || 
+         !log.contains( "[echo] From the exec config" ) )
+    {
+        System.err.println( "Generated console output does not contain [echo] output: " + buildLog );
+        return false;
+    }
+}
+catch( Throwable t )
+{
+    t.printStackTrace();
+    return false;
+}
+
+return true;

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/MANTRUN-179/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/invoker.properties?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/invoker.properties (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/invoker.properties Sat Jun 17 14:46:13 2017
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = clean install
+invoker.buildResult = failure

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/pom.xml?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/pom.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/pom.xml Sat Jun 17 14:46:13 2017
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<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/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.antrun</groupId>
+  <artifactId>attach-artifact-test-with-prefix-unknown</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <version>@pom.version@</version>
+        <executions>
+          <execution>
+            <id>call-build</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <customTaskPrefix>mvn</customTaskPrefix>
+              <target>
+                <attachartifact file="test.txt" classifier="cl" />
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/test.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/test.txt?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/test.txt (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/test.txt Sat Jun 17 14:46:13 2017
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix-unknown/test.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/invoker.properties?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/invoker.properties (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/invoker.properties Sat Jun 17 14:46:13 2017
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals=clean install

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/pom.xml?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/pom.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/pom.xml Sat Jun 17 14:46:13 2017
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<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/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.antrun</groupId>
+  <artifactId>attach-artifact-test-with-prefix</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <version>@pom.version@</version>
+        <executions>
+          <execution>
+            <id>call-build</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <customTaskPrefix>mvn</customTaskPrefix>
+              <target>
+                <mvn:attachartifact file="test.txt" classifier="cl" />
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/test.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/test.txt?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/test.txt (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/test.txt Sat Jun 17 14:46:13 2017
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/test.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/verify.bsh?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/verify.bsh (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/verify.bsh Sat Jun 17 14:46:13 2017
@@ -0,0 +1,36 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+
+String[] expectedFiles = {
+    "org/apache/maven/plugins/antrun/attach-artifact-test-with-prefix/1.0/attach-artifact-test-with-prefix-1.0.pom",
+    "org/apache/maven/plugins/antrun/attach-artifact-test-with-prefix/1.0/attach-artifact-test-with-prefix-1.0-cl.txt"
+};
+
+for ( String expectedFile : expectedFiles )
+{
+    File file = new File( localRepositoryPath, expectedFile );
+    System.out.println( "Checking for existence of " + file );
+    if ( !file.isFile() )
+    {
+        throw new Exception( "Missing file " + file );
+    }
+}

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/attach-artifact-test-with-prefix/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/pom.xml?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/pom.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/pom.xml Sat Jun 17 14:46:13 2017
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<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/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.antrun</groupId>
+  <artifactId>custom-ant-target-attributes</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <version>@pom.version@</version>
+        <executions>
+          <execution>
+            <phase>validate</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target name="myname" description="Foo">
+                <echo message="Hello" />
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/verify.groovy?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/verify.groovy (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/verify.groovy Sat Jun 17 14:46:13 2017
@@ -0,0 +1,27 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def antProject = new XmlSlurper().parse(new File(basedir, 'target/antrun/build-myname.xml'))
+
+assert antProject.@default == "myname"
+assert antProject.target.size() == 1
+assert antProject.target[0].@name == "myname"
+assert antProject.target[0].@description == "Foo"
+assert antProject.target[0].attributes().size() == 2

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/verify.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/custom-ant-target-attributes/verify.groovy
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

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=1799014&r1=1799013&r2=1799014&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 Sat Jun 17 14:46:13 2017
@@ -22,7 +22,6 @@ package org.apache.maven.plugins.antrun;
 import java.io.File;
 import java.io.IOException;
 import java.io.LineNumberReader;
-import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Hashtable;
@@ -52,7 +51,6 @@ import org.apache.tools.ant.taskdefs.Typ
 import org.apache.tools.ant.types.Path;
 import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.configuration.PlexusConfigurationException;
-import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.StringUtils;
@@ -109,11 +107,6 @@ public class AntRunMojo
     public static final String UTF_8 = "UTF-8";
 
     /**
-     * The name used for the Ant target
-     */
-    private String antTargetName;
-
-    /**
      * The path to The XML file containing the definition of the Maven tasks.
      */
     public static final String ANTLIB = "org/apache/maven/ant/tasks/antlib.xml";
@@ -272,10 +265,13 @@ public class AntRunMojo
             propertyPrefix = "";
         }
 
+        String antTargetName = target.getAttribute( "name", DEFAULT_ANT_TARGET_NAME );
+        target.setAttribute( "name", antTargetName );
+
         try
         {
             Project antProject = new Project();
-            File antBuildFile = this.writeTargetToProjectFile();
+            File antBuildFile = writeTargetToProjectFile( antTargetName );
             ProjectHelper.configureProject( antProject, antBuildFile );
             antProject.init();
 
@@ -533,7 +529,7 @@ public class AntRunMojo
         Typedef typedef = new Typedef();
         typedef.setProject( antProject );
         typedef.setResource( ANTLIB );
-        if ( !customTaskPrefix.equals( "" ) )
+        if ( !customTaskPrefix.isEmpty() )
         {
             typedef.setURI( TASK_URI );
         }
@@ -543,49 +539,19 @@ public class AntRunMojo
     /**
      * Write the Ant target and surrounding tags to a temporary file
      *
-     * @throws PlexusConfigurationException
+     * @throws IOException
      */
-    private File writeTargetToProjectFile()
-        throws IOException, PlexusConfigurationException
+    private File writeTargetToProjectFile( String targetName )
+        throws IOException
     {
-        // Have to use an XML writer because the PlexusConfig toString() method does not properly escape XML attributes
-        StringWriter writer = new StringWriter();
-        AntrunXmlPlexusConfigurationWriter xmlWriter = new AntrunXmlPlexusConfigurationWriter();
-        xmlWriter.write( target, writer );
-
-        StringBuilder antProjectConfig = new StringBuilder( writer.getBuffer() );
-
-        antTargetName = target.getAttribute( "name" );
-
-        if ( antTargetName == null )
-        {
-            antTargetName = DEFAULT_ANT_TARGET_NAME;
-            stringReplace( antProjectConfig, "<target", "<target name=\"" + DEFAULT_ANT_TARGET_NAME + "\"" );
-        }
-
-        String xmlns = "";
-        if ( !customTaskPrefix.trim().equals( "" ) )
-        {
-            xmlns = "xmlns:" + customTaskPrefix + "=\"" + TASK_URI + "\"";
-        }
-
-        final String xmlHeader = "<?xml version=\"1.0\" encoding=\"" + UTF_8 + "\" ?>\n";
-        antProjectConfig.insert( 0, xmlHeader );
-        final String projectOpen =
-            "<project name=\"maven-antrun-\" default=\"" + antTargetName + "\" " + xmlns + " >\n";
-        int index = antProjectConfig.indexOf( "<target" );
-        antProjectConfig.insert( index, projectOpen );
-
-        final String projectClose = "\n</project>";
-        antProjectConfig.append( projectClose );
-
         // The fileName should probably use the plugin executionId instead of the targetName
-        String fileName = "build-" + antTargetName + ".xml";
-        File buildFile = new File( project.getBuild().getDirectory(), "/antrun/" + fileName );
-
-        //noinspection ResultOfMethodCallIgnored
+        File buildFile = new File( project.getBuild().getDirectory(), "antrun/build-" + targetName + ".xml" );
+        // noinspection ResultOfMethodCallIgnored
         buildFile.getParentFile().mkdirs();
-        FileUtils.fileWrite( buildFile.getAbsolutePath(), UTF_8, antProjectConfig.toString() );
+
+        AntrunXmlPlexusConfigurationWriter xmlWriter = new AntrunXmlPlexusConfigurationWriter();
+        xmlWriter.write( target, buildFile, customTaskPrefix, targetName );
+
         return buildFile;
     }
 

Modified: maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriter.java?rev=1799014&r1=1799013&r2=1799014&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriter.java (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/main/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriter.java Sat Jun 17 14:46:13 2017
@@ -20,82 +20,103 @@ package org.apache.maven.plugins.antrun;
  */
 
 import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
-import org.codehaus.plexus.util.xml.XMLWriter;
-
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.xml.Xpp3DomUtils;
+import org.codehaus.plexus.util.xml.pull.MXSerializer;
+import org.codehaus.plexus.util.xml.pull.XmlSerializer;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.Writer;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
 
 /**
- * Write a plexus configuration to a stream Note: This class was originally copied from plexus-container-default. It is
- * not possible to rely on PlexusConfiguration.toString() because it doesn't properly escape XML attributes.
+ * Write the Ant target Plexus configuration to an XML file.
  */
-public class AntrunXmlPlexusConfigurationWriter
+class AntrunXmlPlexusConfigurationWriter
 {
 
+    private static final Set<String> EXCLUDED_ATTRIBUTES =
+        new HashSet<String>( Arrays.asList( Xpp3DomUtils.CHILDREN_COMBINATION_MODE_ATTRIBUTE,
+                                            Xpp3DomUtils.SELF_COMBINATION_MODE_ATTRIBUTE ) );
+
     /**
      * @param configuration {@link PlexusConfiguration}
-     * @param writer {@link Writer}
+     * @param file File to write the Plexus configuration to.
+     * @param customTaskPrefix Prefix to use for the custom Ant tasks. Empty if no prefix should be used.
+     * @param antTargetName Name of the default Ant target.
      * @throws IOException In case of problems.
      */
-    public void write( PlexusConfiguration configuration, Writer writer )
+    public void write( PlexusConfiguration configuration, File file, String customTaskPrefix, String antTargetName )
         throws IOException
     {
-        final int depth = 0;
-
-        PrettyPrintXMLWriter xmlWriter = new PrettyPrintXMLWriter( writer );
-        write( configuration, xmlWriter, depth );
+        MXSerializer serializer = new MXSerializer();
+        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator",
+                                System.getProperty( "line.separator" ) );
+        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
+        BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream( file ) );
+        try
+        {
+            serializer.setOutput( bos, AntRunMojo.UTF_8 );
+            serializer.startDocument( AntRunMojo.UTF_8, null );
+            if ( !customTaskPrefix.isEmpty() )
+            {
+                serializer.setPrefix( customTaskPrefix, AntRunMojo.TASK_URI );
+            }
+            serializer.startTag( null, "project" );
+            serializer.attribute( null, "name", "maven-antrun-" );
+            serializer.attribute( null, "default", antTargetName );
+            write( configuration, serializer );
+            serializer.endTag( null, "project" );
+            serializer.endDocument();
+        }
+        finally
+        {
+            IOUtil.close( bos );
+        }
     }
 
-    private void write( PlexusConfiguration c, XMLWriter w, int depth )
+    private void write( PlexusConfiguration c, XmlSerializer serializer )
         throws IOException
     {
-        int count = c.getChildCount();
+        serializer.startTag( null, c.getName() );
+        writeAttributes( c, serializer );
 
+        int count = c.getChildCount();
         if ( count == 0 )
         {
-            writeTag( c, w, depth );
+            String value = c.getValue();
+            if ( value != null )
+            {
+                serializer.text( value );
+            }
         }
         else
         {
-            w.startElement( c.getName() );
-            writeAttributes( c, w );
-
             for ( int i = 0; i < count; i++ )
             {
                 PlexusConfiguration child = c.getChild( i );
-
-                write( child, w, depth + 1 );
+                write( child, serializer );
             }
-
-            w.endElement();
         }
-    }
-
-    private void writeTag( PlexusConfiguration c, XMLWriter w, int depth )
-        throws IOException
-    {
-        w.startElement( c.getName() );
 
-        writeAttributes( c, w );
-
-        String value = c.getValue( null );
-        if ( value != null )
-        {
-            w.writeText( value );
-        }
-
-        w.endElement();
+        serializer.endTag( null, c.getName() );
     }
 
-    private void writeAttributes( PlexusConfiguration c, XMLWriter w )
+    private void writeAttributes( PlexusConfiguration c, XmlSerializer serializer )
         throws IOException
     {
         String[] names = c.getAttributeNames();
 
         for ( String name : names )
         {
-            w.addAttribute( name, c.getAttribute( name, null ) );
+            if ( !EXCLUDED_ATTRIBUTES.contains( name ) )
+            {
+                serializer.attribute( null, name, c.getAttribute( name ) );
+            }
         }
     }
 

Added: maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java Sat Jun 17 14:46:13 2017
@@ -0,0 +1,153 @@
+package org.apache.maven.plugins.antrun;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+
+import org.codehaus.plexus.configuration.PlexusConfiguration;
+import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
+import org.codehaus.plexus.util.IOUtil;
+import org.custommonkey.xmlunit.XMLAssert;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+/**
+ * Test class for {@link AntrunXmlPlexusConfigurationWriter}.
+ * @author gboue
+ */
+public class AntrunXmlPlexusConfigurationWriterTest
+{
+
+    private static final String TARGET_NAME = "main";
+
+    private TemporaryFolder folder = new TemporaryFolder();
+
+    private AntrunXmlPlexusConfigurationWriter configurationWriter;
+
+    private PlexusConfiguration configuration;
+
+    private File file;
+
+    @Before
+    public void setUp()
+        throws IOException
+    {
+        configurationWriter = new AntrunXmlPlexusConfigurationWriter();
+        configuration = new XmlPlexusConfiguration( "target" );
+        configuration.setAttribute( "name", TARGET_NAME );
+        file = folder.newFile();
+    }
+
+    /**
+     * Tests that the XML file produced with the writer is pretty printed and that basic attributes are kept.
+     * 
+     * @throws Exception
+     */
+    @Test
+    public void testBasic()
+        throws Exception
+    {
+        configuration.getChild( "echo", true ).setAttribute( "message", "Hello" );
+        configurationWriter.write( configuration, file, "", TARGET_NAME );
+        assertXmlIsExpected( "/configuration-writer/basic.xml", file );
+    }
+
+    /**
+     * Tests that serialization is correct even if Ant target is empty (no children, no attributes except name).
+     * 
+     * @throws Exception
+     */
+    @Test
+    public void testEmptyTarget()
+        throws Exception
+    {
+        configurationWriter.write( configuration, file, "", TARGET_NAME );
+        assertXmlIsExpected( "/configuration-writer/empty-target.xml", file );
+    }
+
+    /**
+     * Tests that setting a custom prefix ends up in the project namespace in the target element with the correct name.
+     * 
+     * @throws Exception
+     */
+    @Test
+    public void testCustomTaskPrefix()
+        throws Exception
+    {
+        PlexusConfiguration child = configuration.getChild( "mvn:foo", true );
+        child.setAttribute( "attr1", "val1" );
+        child.setValue( "The first value." );
+        child = configuration.getChild( "bar", true );
+        child.setAttribute( "attr2", "val2" );
+        child.setValue( "The second value." );
+        configurationWriter.write( configuration, file, "mvn", TARGET_NAME );
+        assertXmlIsExpected( "/configuration-writer/custom-task-prefix.xml", file );
+    }
+
+    /**
+     * Tests that combine.children and combine.self attributes in the XML configuration elements are ignored during
+     * serialization.
+     * 
+     * @throws Exception
+     */
+    @Test
+    public void testCombineAttributes()
+        throws Exception
+    {
+        configuration.setAttribute( "combine.children", "append" );
+        configuration.setAttribute( "description", "foo" );
+        configuration.getChild( "child", true ).setAttribute( "combine.self", "override" );
+        configurationWriter.write( configuration, file, "", TARGET_NAME );
+        assertXmlIsExpected( "/configuration-writer/combine-attributes.xml", file );
+    }
+
+    private void assertXmlIsExpected( String expected, File file )
+        throws Exception
+    {
+        Charset charset = Charset.forName( "UTF-8" );
+        BufferedReader test = new BufferedReader( new InputStreamReader( new FileInputStream( file ), charset ) );
+        BufferedReader control =
+            new BufferedReader( new InputStreamReader( getClass().getResourceAsStream( expected ), charset ) );
+        try
+        {
+            XMLAssert.assertXMLEqual( XMLUnit.compareXML( control, test ), true );
+        }
+        finally
+        {
+            IOUtil.close( test );
+            IOUtil.close( control );
+        }
+    }
+
+    @Rule
+    public TemporaryFolder getFolder()
+    {
+        return folder;
+    }
+
+}

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/basic.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/basic.xml?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/basic.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/basic.xml Sat Jun 17 14:46:13 2017
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="maven-antrun-" default="main">
+  <target name="main">
+    <echo message="Hello" />
+  </target>
+</project>

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/basic.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/basic.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/combine-attributes.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/combine-attributes.xml?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/combine-attributes.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/combine-attributes.xml Sat Jun 17 14:46:13 2017
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="maven-antrun-" default="main">
+  <target name="main" description="foo">
+    <child />
+  </target>
+</project>

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/combine-attributes.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/combine-attributes.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/custom-task-prefix.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/custom-task-prefix.xml?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/custom-task-prefix.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/custom-task-prefix.xml Sat Jun 17 14:46:13 2017
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="maven-antrun-" default="main" xmlns:mvn="antlib:org.apache.maven.ant.tasks">
+  <target name="main">
+    <mvn:foo attr1="val1">The first value.</mvn:foo>
+    <bar attr2="val2">The second value.</bar>
+  </target>
+</project>

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/custom-task-prefix.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/custom-task-prefix.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/empty-target.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/empty-target.xml?rev=1799014&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/empty-target.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/empty-target.xml Sat Jun 17 14:46:13 2017
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="maven-antrun-" default="main">
+  <target name="main" />
+</project>

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/empty-target.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/test/resources/configuration-writer/empty-target.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision