You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Warner Onstine <sw...@warneronstine.com> on 2006/05/30 01:16:04 UTC

moving a simple task from m1 to m2

I wrote a simple task in maven.xml that moved a completed war file to  
a deployment directory and would like to move this to m2. It isn't  
clear from the documentation what lifecycle phase the war task  
happens in now (especially since everything has changed so drastically).

Here's my snippet and would look for any advice on the easiest way to  
move this (I've started adding in an maven-antrun-plugin to my pom,  
but am not sure what to put in for the <phase> element).

<goal name="deploy-war">
         <attainGoal name="war:war"/>
         <copy file="${maven.build.dir}/helloworld1.war" todir="$ 
{tomcat.install}/webapps" />

     </goal>

the tomcat.install variable is defined in a project.properties file  
that both ant and maven can read.

-warner

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


Re: moving a simple task from m1 to m2

Posted by Wayne Fay <wa...@gmail.com>.
Is there a reason you can't simply write an ant build.xml target and
call out to it using maven-antrun-plugin?

Then you could use it from both M2 and Ant.

Wayne

On 5/29/06, Warner Onstine <sw...@warneronstine.com> wrote:
> Yeah, I had started looking at this, but was hoping for something
> that would work in both ant and maven 2 as I have to have both builds
> for this right now and I don't want to force them to go through
> having to install the maven tools for ant just to get this to work
> properly.
>
> Sorry, forgot to mention that constraint in my original posting.
>
> -warner
>
> On May 29, 2006, at 4:44 PM, Henry S. Isidro wrote:
>
> > On Tuesday 30 May 2006 7:16 am, Warner Onstine wrote:
> >> I wrote a simple task in maven.xml that moved a completed war file to
> >> a deployment directory and would like to move this to m2. It isn't
> >> clear from the documentation what lifecycle phase the war task
> >> happens in now (especially since everything has changed so
> >> drastically).
> >>
> >> Here's my snippet and would look for any advice on the easiest way to
> >> move this (I've started adding in an maven-antrun-plugin to my pom,
> >> but am not sure what to put in for the <phase> element).
> >>
> >> <goal name="deploy-war">
> >>          <attainGoal name="war:war"/>
> >>          <copy file="${maven.build.dir}/helloworld1.war" todir="$
> >> {tomcat.install}/webapps" />
> >>
> >>      </goal>
> >>
> >> the tomcat.install variable is defined in a project.properties file
> >> that both ant and maven can read.
> >>
> >> -warner
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > I think the M2 cargo plugin will help you in this case -->
> > http://cargo.codehaus.org/Maven2+plugin
> >
> > HTH,
> > Henry
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


RE: moving a simple task from m1 to m2

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Warner,

> -----Original Message-----
> From: Warner Onstine [mailto:sw-list@warneronstine.com]
> Sent: mardi 30 mai 2006 02:50
> To: Maven Users List
> Subject: Re: moving a simple task from m1 to m2
> 
> Yeah, I had started looking at this, but was hoping for something
> that would work in both ant and maven 2 as I have to have both builds
> for this right now and I don't want to force them to go through
> having to install the maven tools for ant just to get this to work
> properly.
> 
> Sorry, forgot to mention that constraint in my original posting.

Cargo works both in Ant and in Maven2 (among other options too).

-Vincent

> On May 29, 2006, at 4:44 PM, Henry S. Isidro wrote:
> 
> > On Tuesday 30 May 2006 7:16 am, Warner Onstine wrote:
> >> I wrote a simple task in maven.xml that moved a completed war file to
> >> a deployment directory and would like to move this to m2. It isn't
> >> clear from the documentation what lifecycle phase the war task
> >> happens in now (especially since everything has changed so
> >> drastically).
> >>
> >> Here's my snippet and would look for any advice on the easiest way to
> >> move this (I've started adding in an maven-antrun-plugin to my pom,
> >> but am not sure what to put in for the <phase> element).
> >>
> >> <goal name="deploy-war">
> >>          <attainGoal name="war:war"/>
> >>          <copy file="${maven.build.dir}/helloworld1.war" todir="$
> >> {tomcat.install}/webapps" />
> >>
> >>      </goal>
> >>
> >> the tomcat.install variable is defined in a project.properties file
> >> that both ant and maven can read.
> >>
> >> -warner
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > I think the M2 cargo plugin will help you in this case -->
> > http://cargo.codehaus.org/Maven2+plugin
> >
> > HTH,
> > Henry
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


	

	
		
___________________________________________________________________________ 
Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire.
http://fr.mail.yahoo.com

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


Re: moving a simple task from m1 to m2

Posted by Warner Onstine <sw...@warneronstine.com>.
Yeah, I had started looking at this, but was hoping for something  
that would work in both ant and maven 2 as I have to have both builds  
for this right now and I don't want to force them to go through  
having to install the maven tools for ant just to get this to work  
properly.

Sorry, forgot to mention that constraint in my original posting.

-warner

On May 29, 2006, at 4:44 PM, Henry S. Isidro wrote:

> On Tuesday 30 May 2006 7:16 am, Warner Onstine wrote:
>> I wrote a simple task in maven.xml that moved a completed war file to
>> a deployment directory and would like to move this to m2. It isn't
>> clear from the documentation what lifecycle phase the war task
>> happens in now (especially since everything has changed so  
>> drastically).
>>
>> Here's my snippet and would look for any advice on the easiest way to
>> move this (I've started adding in an maven-antrun-plugin to my pom,
>> but am not sure what to put in for the <phase> element).
>>
>> <goal name="deploy-war">
>>          <attainGoal name="war:war"/>
>>          <copy file="${maven.build.dir}/helloworld1.war" todir="$
>> {tomcat.install}/webapps" />
>>
>>      </goal>
>>
>> the tomcat.install variable is defined in a project.properties file
>> that both ant and maven can read.
>>
>> -warner
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>
>
> I think the M2 cargo plugin will help you in this case -->
> http://cargo.codehaus.org/Maven2+plugin
>
> HTH,
> Henry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


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


Re: moving a simple task from m1 to m2

Posted by "Henry S. Isidro" <hi...@exist.com>.
On Tuesday 30 May 2006 7:16 am, Warner Onstine wrote:
> I wrote a simple task in maven.xml that moved a completed war file to
> a deployment directory and would like to move this to m2. It isn't
> clear from the documentation what lifecycle phase the war task
> happens in now (especially since everything has changed so drastically).
>
> Here's my snippet and would look for any advice on the easiest way to
> move this (I've started adding in an maven-antrun-plugin to my pom,
> but am not sure what to put in for the <phase> element).
>
> <goal name="deploy-war">
>          <attainGoal name="war:war"/>
>          <copy file="${maven.build.dir}/helloworld1.war" todir="$
> {tomcat.install}/webapps" />
>
>      </goal>
>
> the tomcat.install variable is defined in a project.properties file
> that both ant and maven can read.
>
> -warner
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


I think the M2 cargo plugin will help you in this case --> 
http://cargo.codehaus.org/Maven2+plugin

HTH,
Henry

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