You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dirk Räder <di...@raeder.cc> on 2010/02/12 13:40:24 UTC

Executing a child pom twice, keeping BOTH results

Hi,

I currently have a Maven module that requires some properties on
execution. One of these properties defines (part of) the resulting
file name.

Would it be possible to execute the module twice in a row with
different property values and have the resulting files of both runs
afterwards? The executions have to take place in a parent pom; via
command line would be too easy.

Thanks for your help!

Dirk
dirk@raeder.cc

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


Re: Executing a child pom twice, keeping BOTH results

Posted by Anders Hammar <an...@hammar.net>.
Afraid? I'm preventing you from messing up your project! :-)

/Anders

2010/2/12 Dirk Räder <di...@raeder.cc>

> I was afraid you'd say something like that. Thanks anyways.
>
> 2010/2/12 Anders Hammar <an...@hammar.net>:
> > Pretty much anything is technically possible. However, that doesn't make
> it
> > right. The Maven way for your use case is to have two different
> > modules/projects. Possibly also a third one where you keep things that
> these
> > two projects have in common.
> > The mind set you should have is that you only execute one build and get
> all
> > that you want/need. You shouldn't do two executions (on one project) that
> > produce two different artifacts as they will share the same GAV.
> > (Someone might bring up classifiers now, but I try to stay as far away
> from
> > those as possible... I've seen too much incorrect usage of that.)
> >
> > /Anders
> >
> > 2010/2/12 Dirk Räder <di...@raeder.cc>
> >
> >> Hi,
> >>
> >> I currently have a Maven module that requires some properties on
> >> execution. One of these properties defines (part of) the resulting
> >> file name.
> >>
> >> Would it be possible to execute the module twice in a row with
> >> different property values and have the resulting files of both runs
> >> afterwards? The executions have to take place in a parent pom; via
> >> command line would be too easy.
> >>
> >> Thanks for your help!
> >>
> >> Dirk
> >> dirk@raeder.cc
> >>
> >> ---------------------------------------------------------------------
> >> 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: Executing a child pom twice, keeping BOTH results

Posted by Dirk Räder <di...@raeder.cc>.
I was afraid you'd say something like that. Thanks anyways.

2010/2/12 Anders Hammar <an...@hammar.net>:
> Pretty much anything is technically possible. However, that doesn't make it
> right. The Maven way for your use case is to have two different
> modules/projects. Possibly also a third one where you keep things that these
> two projects have in common.
> The mind set you should have is that you only execute one build and get all
> that you want/need. You shouldn't do two executions (on one project) that
> produce two different artifacts as they will share the same GAV.
> (Someone might bring up classifiers now, but I try to stay as far away from
> those as possible... I've seen too much incorrect usage of that.)
>
> /Anders
>
> 2010/2/12 Dirk Räder <di...@raeder.cc>
>
>> Hi,
>>
>> I currently have a Maven module that requires some properties on
>> execution. One of these properties defines (part of) the resulting
>> file name.
>>
>> Would it be possible to execute the module twice in a row with
>> different property values and have the resulting files of both runs
>> afterwards? The executions have to take place in a parent pom; via
>> command line would be too easy.
>>
>> Thanks for your help!
>>
>> Dirk
>> dirk@raeder.cc
>>
>> ---------------------------------------------------------------------
>> 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: Executing a child pom twice, keeping BOTH results

Posted by Anders Hammar <an...@hammar.net>.
Pretty much anything is technically possible. However, that doesn't make it
right. The Maven way for your use case is to have two different
modules/projects. Possibly also a third one where you keep things that these
two projects have in common.
The mind set you should have is that you only execute one build and get all
that you want/need. You shouldn't do two executions (on one project) that
produce two different artifacts as they will share the same GAV.
(Someone might bring up classifiers now, but I try to stay as far away from
those as possible... I've seen too much incorrect usage of that.)

/Anders

2010/2/12 Dirk Räder <di...@raeder.cc>

> Hi,
>
> I currently have a Maven module that requires some properties on
> execution. One of these properties defines (part of) the resulting
> file name.
>
> Would it be possible to execute the module twice in a row with
> different property values and have the resulting files of both runs
> afterwards? The executions have to take place in a parent pom; via
> command line would be too easy.
>
> Thanks for your help!
>
> Dirk
> dirk@raeder.cc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>