You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Daniel Hoffmann <bi...@googlemail.com> on 2010/05/19 15:47:35 UTC

Chaining Maven goals of different Base Directories

Hello,

is there any way to chain goals located in different Base Directories?
For deploying my project ear to my JBoss Application Server I have to
execute two steps:

1.) myproject/makewar clean install
2.) myproject/makeear clean install cargo:deploy

Makewar and makeear are two seperate maven projects. Is there any simple way
of chaining these two steps without adding them to a new Maven project or
changing the 'myproject' Maven project? I can´t execute 'clean install
cargo:deploy' on 'myproject', because it contains more subprojects I don´t
want to deploy (and I don´t want to change this main project).

Best regards,
 Daniel

Re: Chaining Maven goals of different Base Directories

Posted by Jesse Farinacci <ji...@gmail.com>.
Dan,

On Fri, May 28, 2010 at 8:18 AM, Daniel Hoffmann
<bi...@googlemail.com> wrote:
> This works! Thanks a lot!
>
>> define a profile for deploying your app with cargo:deploy bound to the
>> install phase in module A... you can even define defaultGoals in the
>> profile
>> so that all you need to type is
>>
>> mvn -Pmy-deploy-profile
>>

Why didn't you just attach cargo:deploy to the deploy phase within the
WAR module?? I told you this 9 days ago.

-Jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

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


Re: Chaining Maven goals of different Base Directories

Posted by Daniel Hoffmann <bi...@googlemail.com>.
This works! Thanks a lot!

/close

2010/5/27 Stephen Connolly <st...@gmail.com>

> define a profile for deploying your app with cargo:deploy bound to the
> install phase in module A... you can even define defaultGoals in the
> profile
> so that all you need to type is
>
> mvn -Pmy-deploy-profile
>
> -Stephen
>
> On 26 May 2010 17:08, Daniel Hoffmann <bi...@googlemail.com> wrote:
>
> > Defining profiles this way is a good way to group the projects.
> > But the core problem remains:
> > If I call 'clean install cargo:deploy' on this profile, maven executes
> > 'clean install cargo:deploy' on module A and 'clean install cargo:deploy'
> > on
> > module B. But I want it to execute 'clean install' on module A and 'clean
> > install cargo:deploy' on module B.
> > I tried to configure cargo to exclude a file, but I didn´t find a way to
> do
> > this. And Cargo is defined in a grandparent pom I don´t want to change
> > anyway.
> >
> >
> >  Thanks anyway, Daniel
> >
> >
> > 2010/5/25 Peter Bennett <uc...@mailinator.com>
> >
> > >
> > > Profiles to the rescue ;-)
> > >
> > > Define a profile in the top-level pom containing just the the war and
> ear
> > > modules in the <modules/> section.
> > >
> > > -Peter
> > >
> > >
> > > Daniel Hoffmann-6 wrote:
> > > >
> > > > 1.) and 2.) are different projects.
> > > > There are much more projects in 'myproject', so I can´t execute mvn
> on
> > > > 'myproject' (without deleting the other projects from my myproject
> > pom),
> > > > because I don´t want the other projects to be build.
> > > >
> > > > Daniel
> > > >
> > > > P.S.: I don´t think it makes any differences, but I am using m2e.
> > > >
> > > >
> > > >
> > > > 2010/5/19 Jesse Farinacci <ji...@gmail.com>
> > > >
> > > >> Hi Daniel,
> > > >>
> > > >> On Wed, May 19, 2010 at 9:47 AM, Daniel Hoffmann
> > > >> <bi...@googlemail.com> wrote:
> > > >> >
> > > >> > 1.) myproject/makewar clean install
> > > >> > 2.) myproject/makeear clean install cargo:deploy
> > > >> >
> > > >> >  Daniel
> > > >>
> > > >> Why not attach cargo:deploy to the deploy phase and then call mvn
> > clean
> > > >> deploy?
> > > >>
> > > >> -Jesse
> > > >>
> > > >> --
> > > >> There are 10 types of people in this world, those
> > > >> that can read binary and those that can not.
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://old.nabble.com/Chaining-Maven-goals-of-different-Base-Directories-tp28608528p28670270.html
> > > Sent from the Maven - Users mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: Chaining Maven goals of different Base Directories

Posted by Stephen Connolly <st...@gmail.com>.
define a profile for deploying your app with cargo:deploy bound to the
install phase in module A... you can even define defaultGoals in the profile
so that all you need to type is

mvn -Pmy-deploy-profile

-Stephen

On 26 May 2010 17:08, Daniel Hoffmann <bi...@googlemail.com> wrote:

> Defining profiles this way is a good way to group the projects.
> But the core problem remains:
> If I call 'clean install cargo:deploy' on this profile, maven executes
> 'clean install cargo:deploy' on module A and 'clean install cargo:deploy'
> on
> module B. But I want it to execute 'clean install' on module A and 'clean
> install cargo:deploy' on module B.
> I tried to configure cargo to exclude a file, but I didn´t find a way to do
> this. And Cargo is defined in a grandparent pom I don´t want to change
> anyway.
>
>
>  Thanks anyway, Daniel
>
>
> 2010/5/25 Peter Bennett <uc...@mailinator.com>
>
> >
> > Profiles to the rescue ;-)
> >
> > Define a profile in the top-level pom containing just the the war and ear
> > modules in the <modules/> section.
> >
> > -Peter
> >
> >
> > Daniel Hoffmann-6 wrote:
> > >
> > > 1.) and 2.) are different projects.
> > > There are much more projects in 'myproject', so I can´t execute mvn on
> > > 'myproject' (without deleting the other projects from my myproject
> pom),
> > > because I don´t want the other projects to be build.
> > >
> > > Daniel
> > >
> > > P.S.: I don´t think it makes any differences, but I am using m2e.
> > >
> > >
> > >
> > > 2010/5/19 Jesse Farinacci <ji...@gmail.com>
> > >
> > >> Hi Daniel,
> > >>
> > >> On Wed, May 19, 2010 at 9:47 AM, Daniel Hoffmann
> > >> <bi...@googlemail.com> wrote:
> > >> >
> > >> > 1.) myproject/makewar clean install
> > >> > 2.) myproject/makeear clean install cargo:deploy
> > >> >
> > >> >  Daniel
> > >>
> > >> Why not attach cargo:deploy to the deploy phase and then call mvn
> clean
> > >> deploy?
> > >>
> > >> -Jesse
> > >>
> > >> --
> > >> There are 10 types of people in this world, those
> > >> that can read binary and those that can not.
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://old.nabble.com/Chaining-Maven-goals-of-different-Base-Directories-tp28608528p28670270.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: Chaining Maven goals of different Base Directories

Posted by Benson Margulies <bi...@gmail.com>.
On Wed, May 26, 2010 at 12:08 PM, Daniel Hoffmann <
biggibigdan@googlemail.com> wrote:

> Defining profiles this way is a good way to group the projects.
> But the core problem remains:
> If I call 'clean install cargo:deploy' on this profile, maven executes
> 'clean install cargo:deploy' on module A and 'clean install cargo:deploy'
> on
> module B. But I want it to execute 'clean install' on module A and 'clean
> install cargo:deploy' on module B.
> I tried to configure cargo to exclude a file, but I didn´t find a way to do
> this. And Cargo is defined in a grandparent pom I don´t want to change
> anyway.
>

File a JIRA asking Cargo to define the canonical 'skip' configuration
parameter.


>
>
>  Thanks anyway, Daniel
>
>
> 2010/5/25 Peter Bennett <uc...@mailinator.com>
>
> >
> > Profiles to the rescue ;-)
> >
> > Define a profile in the top-level pom containing just the the war and ear
> > modules in the <modules/> section.
> >
> > -Peter
> >
> >
> > Daniel Hoffmann-6 wrote:
> > >
> > > 1.) and 2.) are different projects.
> > > There are much more projects in 'myproject', so I can´t execute mvn on
> > > 'myproject' (without deleting the other projects from my myproject
> pom),
> > > because I don´t want the other projects to be build.
> > >
> > > Daniel
> > >
> > > P.S.: I don´t think it makes any differences, but I am using m2e.
> > >
> > >
> > >
> > > 2010/5/19 Jesse Farinacci <ji...@gmail.com>
> > >
> > >> Hi Daniel,
> > >>
> > >> On Wed, May 19, 2010 at 9:47 AM, Daniel Hoffmann
> > >> <bi...@googlemail.com> wrote:
> > >> >
> > >> > 1.) myproject/makewar clean install
> > >> > 2.) myproject/makeear clean install cargo:deploy
> > >> >
> > >> >  Daniel
> > >>
> > >> Why not attach cargo:deploy to the deploy phase and then call mvn
> clean
> > >> deploy?
> > >>
> > >> -Jesse
> > >>
> > >> --
> > >> There are 10 types of people in this world, those
> > >> that can read binary and those that can not.
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://old.nabble.com/Chaining-Maven-goals-of-different-Base-Directories-tp28608528p28670270.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: Chaining Maven goals of different Base Directories

Posted by Daniel Hoffmann <bi...@googlemail.com>.
Defining profiles this way is a good way to group the projects.
But the core problem remains:
If I call 'clean install cargo:deploy' on this profile, maven executes
'clean install cargo:deploy' on module A and 'clean install cargo:deploy' on
module B. But I want it to execute 'clean install' on module A and 'clean
install cargo:deploy' on module B.
I tried to configure cargo to exclude a file, but I didn´t find a way to do
this. And Cargo is defined in a grandparent pom I don´t want to change
anyway.


 Thanks anyway, Daniel


2010/5/25 Peter Bennett <uc...@mailinator.com>

>
> Profiles to the rescue ;-)
>
> Define a profile in the top-level pom containing just the the war and ear
> modules in the <modules/> section.
>
> -Peter
>
>
> Daniel Hoffmann-6 wrote:
> >
> > 1.) and 2.) are different projects.
> > There are much more projects in 'myproject', so I can´t execute mvn on
> > 'myproject' (without deleting the other projects from my myproject pom),
> > because I don´t want the other projects to be build.
> >
> > Daniel
> >
> > P.S.: I don´t think it makes any differences, but I am using m2e.
> >
> >
> >
> > 2010/5/19 Jesse Farinacci <ji...@gmail.com>
> >
> >> Hi Daniel,
> >>
> >> On Wed, May 19, 2010 at 9:47 AM, Daniel Hoffmann
> >> <bi...@googlemail.com> wrote:
> >> >
> >> > 1.) myproject/makewar clean install
> >> > 2.) myproject/makeear clean install cargo:deploy
> >> >
> >> >  Daniel
> >>
> >> Why not attach cargo:deploy to the deploy phase and then call mvn clean
> >> deploy?
> >>
> >> -Jesse
> >>
> >> --
> >> There are 10 types of people in this world, those
> >> that can read binary and those that can not.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Chaining-Maven-goals-of-different-Base-Directories-tp28608528p28670270.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Chaining Maven goals of different Base Directories

Posted by Peter Bennett <uc...@mailinator.com>.
Profiles to the rescue ;-)

Define a profile in the top-level pom containing just the the war and ear
modules in the <modules/> section.

-Peter


Daniel Hoffmann-6 wrote:
> 
> 1.) and 2.) are different projects.
> There are much more projects in 'myproject', so I can´t execute mvn on
> 'myproject' (without deleting the other projects from my myproject pom),
> because I don´t want the other projects to be build.
> 
> Daniel
> 
> P.S.: I don´t think it makes any differences, but I am using m2e.
> 
> 
> 
> 2010/5/19 Jesse Farinacci <ji...@gmail.com>
> 
>> Hi Daniel,
>>
>> On Wed, May 19, 2010 at 9:47 AM, Daniel Hoffmann
>> <bi...@googlemail.com> wrote:
>> >
>> > 1.) myproject/makewar clean install
>> > 2.) myproject/makeear clean install cargo:deploy
>> >
>> >  Daniel
>>
>> Why not attach cargo:deploy to the deploy phase and then call mvn clean
>> deploy?
>>
>> -Jesse
>>
>> --
>> There are 10 types of people in this world, those
>> that can read binary and those that can not.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Chaining-Maven-goals-of-different-Base-Directories-tp28608528p28670270.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Chaining Maven goals of different Base Directories

Posted by Daniel Hoffmann <bi...@googlemail.com>.
1.) and 2.) are different projects.
There are much more projects in 'myproject', so I can´t execute mvn on
'myproject' (without deleting the other projects from my myproject pom),
because I don´t want the other projects to be build.

Daniel

P.S.: I don´t think it makes any differences, but I am using m2e.



2010/5/19 Jesse Farinacci <ji...@gmail.com>

> Hi Daniel,
>
> On Wed, May 19, 2010 at 9:47 AM, Daniel Hoffmann
> <bi...@googlemail.com> wrote:
> >
> > 1.) myproject/makewar clean install
> > 2.) myproject/makeear clean install cargo:deploy
> >
> >  Daniel
>
> Why not attach cargo:deploy to the deploy phase and then call mvn clean
> deploy?
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Chaining Maven goals of different Base Directories

Posted by Jesse Farinacci <ji...@gmail.com>.
Hi Daniel,

On Wed, May 19, 2010 at 9:47 AM, Daniel Hoffmann
<bi...@googlemail.com> wrote:
>
> 1.) myproject/makewar clean install
> 2.) myproject/makeear clean install cargo:deploy
>
>  Daniel

Why not attach cargo:deploy to the deploy phase and then call mvn clean deploy?

-Jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

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