I am observing weird behaviour when using maven-antrun-plugin 1.1 with
Maven 2.0.3. Given the following POM fragment:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-antrun-plugin</artifactId>
  <executions>
    <execution>
      <phase>install</phase>
      <goals>
        <goal>run</goal>
      </goals>
      <configuration>
        <tasks>
          <taskdef resource="net/sf/antcontrib/antcontrib.properties">
            <classpath refid="maven.plugin.classpath"/>
          </taskdef>
         
          <property name="ant.regexp.regexpimpl"
value="org.apache.tools.ant.util.regexp.JakartaRegexpRegexp" />
          
          <propertyregex property="strippedLocalRepository"
input="${localRepository}" regexp="^\[local\] -> file:\/\/" replace=""
/>
          
          <copy
file="${project.build.directory}/${project.build.finalName}.sar"
tofile="${strippedLocalRepository}\com\logibar\framework\${artifactId}\$
{version}\${project.build.finalName}.jar" />
        </tasks>
      </configuration>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>ant-contrib</groupId>
      <artifactId>ant-contrib</artifactId>
      <version>1.0b2</version>
    </dependency>
    <dependency>
      <groupId>ant</groupId>
      <artifactId>ant-apache-regexp</artifactId>
      <version>1.6.5</version>
    </dependency>
    <dependency>
      <groupId>jakarta-regexp</groupId>
      <artifactId>jakarta-regexp</artifactId>
      <version>1.4</version>
    </dependency>
  </dependencies>
</plugin>


Observed behaviour:

- The above fragment works when building the child POM standalone.

- The above fragment does not work when invoked from a reactor build.
The message given is:

[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
  [taskdef] Could not load definitions from resource
net/sf/antcontrib/antcontrib.properties. It could not be found.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks

- I checked the ant-conrib-1.0b2 jar in my repository and
net/sf/antcontrib/antcontrib.properties is in there.


What causes this? Is the maven.plugin.classpath somehow resolved
differently in a reactor build?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to