Hi all,

I am building a M2 plugin to handle my special artifacts.
For this purpose I have defined a custom lifecycle and bound my mojos and additional mojos to it.

One of the additional mojos is the maven-dependencies-plugin:unpack-dependencies. This mojo has an outputDirectory parameter which is set by default to ${project.build.directory}/dependencies. I need it to point to a different directory.

I thought about wrapping this mojo with my own mojo and this way passing the "right" parameters to it. Something like this:

<pluginMetadata>
  <mojos>

    <mojo>
      <phase>compile</phase>
      <goal>bring-dependencies</goal>

<call>org.apache.maven.plugins:maven-dependency-plugin::unpack-dependencies</call>

...
      <parameters>

        <parameter>
          <name>outputDirectory</name>
          <property>outputDirectory</property>
...
          <defaultValue>${project.build.outputDirectory}</defaultValue>
...
</pluginMetadata>

However, when executed this fails with:

[INFO] Failed to execute: Executing Ant script: /com/acme/builder.build.xml [org.apache.maven.plugins:maven-dependency-plugin::unpack-depende
ncies]: Failed to execute.

Target `org.apache.maven.plugins:maven-dependency-plugin::unpack-dependencies' d
oes not exist in this project.


How do I access other mojos from my own ANT-based mojo?

Adrian.


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

Reply via email to