But I need to use this "custom" task across different projects. Do you
suggest that I create a full separate native maven project where one
of the sub modules specifies the custom task and then use this module
as a dependency in the other projects?



On Tue, Jan 18, 2011 at 10:36 PM, lukewpatterson
<[email protected]> wrote:
>
> if one of your modules _is_ the custom ant task (one of the modules is a
> maven project that codes to ant api and contains the ant task), then you can
> do this:
>
>      <plugin>
>        <artifactId>maven-antrun-plugin</artifactId>
>        <executions>
>          <execution>
>            ...
>            <configuration>
>              <tasks>
>                    <my.task> run special task defined in another
> module</my.task>
>              </tasks>
>            </configuration>
>          </execution>
>        </executions>
>        <dependencies>
>          <dependency>
>            <groupId>my.groupId</groupId>
>            <artifactId>my-ant-task-project</artifactId>
>          </dependency>
>        </dependencies>
>      </plugin>
>
> the only thing I would wonder about is if the reactor inter-dependency logic
> can correctly "see" that the "my-ant-task-project" needs to be built before
> its consumers
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Create-a-common-shared-task-for-the-maven-antrun-plugin-tp3346449p3346860.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to