You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Hai Phan <ha...@jpmorgan.com> on 2006/04/24 17:36:44 UTC

how to replace attainGoal in Maven 1 with plugin goal in Maven 2

Dear all,
I am new to Maven 2.  I have a project that written in Maven 1 to build
an EAR, and I would like to migrate it to Maven 2.

Below is my maven.xml.  Could someone help to convert it to plugin
(maven 2 goals) please? Just do 1 or 2 goals would be sufficient

<?xml version="1.0"?>
<project default="iPort2:all" xmlns:j="jelly:core"
xmlns:maven="jelly:maven">

    <goal name="iPort2:allClean" description="Cleans All Project
Tragets">
        <attainGoal name="clean"/>
        <maven:reactor
            basedir="${basedir}"
            includes="main/project.xml,web/project.xml,ear/project.xml"
            goals="clean"
            banner="Cleaning Targets"
            ignoreFailures="false"/>
    </goal>

    <goal name="iPort2:all">
        <maven:reactor
            basedir="${basedir}"
            includes="main/project.xml,web/project.xml,ear/project.xml"
            goals="dist"
            banner="Building iPort2 ALL"
            ignoreFailures="false"/>
    </goal>

    <!--Independent Executions for Better Control from Single Location--
>
    <goal name="iPort2:release">
        <maven:reactor
            basedir="${basedir}"
            includes="main/project.xml"
            goals="clean,jar:install"
            banner="Building iPort2 Main"
            ignoreFailures="false"/>
        <maven:reactor
            basedir="${basedir}"
            includes="web/project.xml"
            goals="clean,war:install"
            banner="Building iPort2 Web"
            ignoreFailures="false"/>

        <maven:reactor
            basedir="${basedir}"
            includes="ear/project.xml"
            goals="clean,ear"
            banner="Building iPort2 EAR"
            ignoreFailures="false"/>
    </goal>
</project>

Best Regards,
Hai Phan





This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: how to replace attainGoal in Maven 1 with plugin goal in Maven 2

Posted by dan tran <da...@gmail.com>.
Hai,

It is best that you read maven book at http://www.mergere.com/products.jsp

It has a comprehensive section on building J2EE artifacts

-D


On 4/24/06, Hai Phan <ha...@jpmorgan.com> wrote:
>
> Dear all,
> I am new to Maven 2.  I have a project that written in Maven 1 to build
> an EAR, and I would like to migrate it to Maven 2.
>
> Below is my maven.xml.  Could someone help to convert it to plugin
> (maven 2 goals) please? Just do 1 or 2 goals would be sufficient
>
> <?xml version="1.0"?>
> <project default="iPort2:all" xmlns:j="jelly:core"
> xmlns:maven="jelly:maven">
>
>    <goal name="iPort2:allClean" description="Cleans All Project
> Tragets">
>        <attainGoal name="clean"/>
>        <maven:reactor
>            basedir="${basedir}"
>            includes="main/project.xml,web/project.xml,ear/project.xml"
>            goals="clean"
>            banner="Cleaning Targets"
>            ignoreFailures="false"/>
>    </goal>
>
>    <goal name="iPort2:all">
>        <maven:reactor
>            basedir="${basedir}"
>            includes="main/project.xml,web/project.xml,ear/project.xml"
>            goals="dist"
>            banner="Building iPort2 ALL"
>            ignoreFailures="false"/>
>    </goal>
>
>    <!--Independent Executions for Better Control from Single Location--
> >
>    <goal name="iPort2:release">
>        <maven:reactor
>            basedir="${basedir}"
>            includes="main/project.xml"
>            goals="clean,jar:install"
>            banner="Building iPort2 Main"
>            ignoreFailures="false"/>
>        <maven:reactor
>            basedir="${basedir}"
>            includes="web/project.xml"
>            goals="clean,war:install"
>            banner="Building iPort2 Web"
>            ignoreFailures="false"/>
>
>        <maven:reactor
>            basedir="${basedir}"
>            includes="ear/project.xml"
>            goals="clean,ear"
>            banner="Building iPort2 EAR"
>            ignoreFailures="false"/>
>    </goal>
> </project>
>
> Best Regards,
> Hai Phan
>
>
>
>
>
> This communication is for informational purposes only. It is not intended
> as an offer or solicitation for the purchase or sale of any financial
> instrument or as an official confirmation of any transaction. All market
> prices,
> data and other information are not warranted as to completeness or
> accuracy and
> are subject to change without notice. Any comments or statements made
> herein
> do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
> and affiliates.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>