Uploaded image for project: 'Maven Antrun Plugin'
  1. Maven Antrun Plugin
  2. MANTRUN-199

Impossible to use combine.* attributes with maven-antrun-plugin configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.8
    • None
    • None

    Description

      Duplicating MANTRUN-179 for 1.8, also raising priority to "Major" as no workaround seems to be present (in comparison to "Minor" bugs). Original text:

      It appears that reusing configurations with the maven-antrun-plugin is impossible. I cannot figure a workaround. See the following simple example:
      ...
      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <artifactId>maven-antrun-plugin</artifactId>
      <version>1.7</version>
      <configuration>
      <target>
      <echo>From the pluginManagement</echo>
      </target>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      ...
      <plugins>
      <plugin>
      <artifactId>maven-antrun-plugin</artifactId>
      <executions>
      <execution>
      <id>test1</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>
      The combined configuration looks correct in the effective-pom:
      <target combine.children="append" name="mytest">
      <echo>From the pluginManagement</echo>
      <echo>From the exec config</echo>
      </target>
      But, executing this fails because Ant does not support the attribute:
      [INFO] An Ant BuildException has occured: Unexpected attribute "combine.children"
      around Ant part ...<target combine.children="append" name="mytest">... @ 3:49 in ...\target\antrun\build-mytest.xml
      It would seem appropriate to remove the POM combine.* attributes when writing out the build-mytest.xml file.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kriskra Kristian Kraljic
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: