Re: Running antrun plugin twice in same phase with another plugin in between?

2010-07-15 Thread Wim Deblauwe
I do not think this really a big improvement. In my usecase, I need to do 4
things in a defined order in the after-package, so you are just moving the
problem. A real ordering of plugin execution during the phases is what I
really need. I admit that I just recently had a need for it after using
Maven 2 for more then 2 years on various (big) projects, so it is rare I
think that you need it, but if you do, you *really* need it.

2010/7/14 Gorham-Engard, Frank frank_gorham-eng...@cable.comcast.com

 Hello users,
 I have an alternate suggestion to the phase/goal ordering issues that are
 often raised here.
 Allow for the specification of phase to include a 'before-' or 'after-'
 prefix.
 Users could specify the phase for a plugin execution to be, for example,
 'before-deploy' or 'after-package'. This wouldn't break the life-cycle model
 while permitting a constrained method for expanding it.
 Also, any 'after-' phases should be executed when the phase is the target.
 For example, if I specified a plugin for 'after-deploy' it would be executed
 (at the end) when the command line was 'mvn deploy'.
 Perhaps even 'before-before-test' should be allowed as well? But not
 'before-after-test', let's not go there!

 !-- Frank Gorham-Engard →
 Be kinder than necessary.
   Everyone you work with is fighting some kind of battle.

 -Original Message-
 From: Wim Deblauwe [mailto:wim.debla...@gmail.com]
 Sent: Tuesday, July 13, 2010 5:10 AM
 To: Maven Users List
 Subject: Running antrun plugin twice in same phase with another plugin in
 between?

 Hi,

 I need to run the antrun plugin twice in the packaging phase. I found this
 on the wiki:
 http://docs.codehaus.org/display/MAVENUSER/MiniGuide-AntMultiPhase

 However, it speaks of different lifecycle phases. I tried with the same
 phase and that works, however, I need to run another plugin in between. Is
 this possible?

 I was hoping that all plugins' executions would be sorted by their id. That
 way, i could use id's like 'step-1-do-something',
 'step-2-do-something-else', to force a certain order of plugin execution.

 regards,

 Wim



Re: Running antrun plugin twice in same phase with another plugin in between?

2010-07-15 Thread Ron Wheeler

 Can't you order the tasks inside Ant?

Ron
On 15/07/2010 2:31 AM, Wim Deblauwe wrote:

I do not think this really a big improvement. In my usecase, I need to do 4
things in a defined order in the after-package, so you are just moving the
problem. A real ordering of plugin execution during the phases is what I
really need. I admit that I just recently had a need for it after using
Maven 2 for more then 2 years on various (big) projects, so it is rare I
think that you need it, but if you do, you *really* need it.

2010/7/14 Gorham-Engard, Frankfrank_gorham-eng...@cable.comcast.com


Hello users,
I have an alternate suggestion to the phase/goal ordering issues that are
often raised here.
Allow for the specification ofphase  to include a 'before-' or 'after-'
prefix.
Users could specify thephase  for a plugin execution to be, for example,
'before-deploy' or 'after-package'. This wouldn't break the life-cycle model
while permitting a constrained method for expanding it.
Also, any 'after-' phases should be executed when the phase is the target.
For example, if I specified a plugin for 'after-deploy' it would be executed
(at the end) when the command line was 'mvn deploy'.
Perhaps even 'before-before-test' should be allowed as well? But not
'before-after-test', let's not go there!

!-- Frank Gorham-Engard →
Be kinder than necessary.
   Everyone you work with is fighting some kind of battle.

-Original Message-
From: Wim Deblauwe [mailto:wim.debla...@gmail.com]
Sent: Tuesday, July 13, 2010 5:10 AM
To: Maven Users List
Subject: Running antrun plugin twice in same phase with another plugin in
between?

Hi,

I need to run the antrun plugin twice in the packaging phase. I found this
on the wiki:
http://docs.codehaus.org/display/MAVENUSER/MiniGuide-AntMultiPhase

However, it speaks of different lifecycle phases. I tried with the same
phase and that works, however, I need to run another plugin in between. Is
this possible?

I was hoping that all plugins' executions would be sorted by their id. That
way, i could use id's like 'step-1-do-something',
'step-2-do-something-else', to force a certain order of plugin execution.

regards,

Wim




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



Re: Running antrun plugin twice in same phase with another plugin in between?

2010-07-15 Thread Wim Deblauwe
That would mean I would have to call maven plugins from inside the maven
antrun plugin. Seems odd and no idea if that is even possible?

2010/7/15 Ron Wheeler rwhee...@artifact-software.com

  Can't you order the tasks inside Ant?

 Ron

 On 15/07/2010 2:31 AM, Wim Deblauwe wrote:

 I do not think this really a big improvement. In my usecase, I need to do
 4
 things in a defined order in the after-package, so you are just moving the
 problem. A real ordering of plugin execution during the phases is what I
 really need. I admit that I just recently had a need for it after using
 Maven 2 for more then 2 years on various (big) projects, so it is rare I
 think that you need it, but if you do, you *really* need it.

 2010/7/14 Gorham-Engard, Frankfrank_gorham-eng...@cable.comcast.com

  Hello users,
 I have an alternate suggestion to the phase/goal ordering issues that are
 often raised here.
 Allow for the specification ofphase  to include a 'before-' or 'after-'
 prefix.
 Users could specify thephase  for a plugin execution to be, for
 example,
 'before-deploy' or 'after-package'. This wouldn't break the life-cycle
 model
 while permitting a constrained method for expanding it.
 Also, any 'after-' phases should be executed when the phase is the
 target.
 For example, if I specified a plugin for 'after-deploy' it would be
 executed
 (at the end) when the command line was 'mvn deploy'.
 Perhaps even 'before-before-test' should be allowed as well? But not
 'before-after-test', let's not go there!

 !-- Frank Gorham-Engard →
 Be kinder than necessary.
   Everyone you work with is fighting some kind of battle.

 -Original Message-
 From: Wim Deblauwe [mailto:wim.debla...@gmail.com]
 Sent: Tuesday, July 13, 2010 5:10 AM
 To: Maven Users List
 Subject: Running antrun plugin twice in same phase with another plugin in
 between?

 Hi,

 I need to run the antrun plugin twice in the packaging phase. I found
 this
 on the wiki:
 http://docs.codehaus.org/display/MAVENUSER/MiniGuide-AntMultiPhase

 However, it speaks of different lifecycle phases. I tried with the same
 phase and that works, however, I need to run another plugin in between.
 Is
 this possible?

 I was hoping that all plugins' executions would be sorted by their id.
 That
 way, i could use id's like 'step-1-do-something',
 'step-2-do-something-else', to force a certain order of plugin execution.

 regards,

 Wim



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




RE: Running antrun plugin twice in same phase with another plugin in between?

2010-07-14 Thread Gorham-Engard, Frank
Hello users,
I have an alternate suggestion to the phase/goal ordering issues that are often 
raised here.
Allow for the specification of phase to include a 'before-' or 'after-' 
prefix.
Users could specify the phase for a plugin execution to be, for example, 
'before-deploy' or 'after-package'. This wouldn't break the life-cycle model 
while permitting a constrained method for expanding it.
Also, any 'after-' phases should be executed when the phase is the target. For 
example, if I specified a plugin for 'after-deploy' it would be executed (at 
the end) when the command line was 'mvn deploy'.
Perhaps even 'before-before-test' should be allowed as well? But not 
'before-after-test', let's not go there!
 
!-- Frank Gorham-Engard →
Be kinder than necessary. 
  Everyone you work with is fighting some kind of battle.

-Original Message-
From: Wim Deblauwe [mailto:wim.debla...@gmail.com] 
Sent: Tuesday, July 13, 2010 5:10 AM
To: Maven Users List
Subject: Running antrun plugin twice in same phase with another plugin in 
between?

Hi,

I need to run the antrun plugin twice in the packaging phase. I found this
on the wiki:
http://docs.codehaus.org/display/MAVENUSER/MiniGuide-AntMultiPhase

However, it speaks of different lifecycle phases. I tried with the same
phase and that works, however, I need to run another plugin in between. Is
this possible?

I was hoping that all plugins' executions would be sorted by their id. That
way, i could use id's like 'step-1-do-something',
'step-2-do-something-else', to force a certain order of plugin execution.

regards,

Wim


Running antrun plugin twice in same phase with another plugin in between?

2010-07-13 Thread Wim Deblauwe
Hi,

I need to run the antrun plugin twice in the packaging phase. I found this
on the wiki:
http://docs.codehaus.org/display/MAVENUSER/MiniGuide-AntMultiPhase

However, it speaks of different lifecycle phases. I tried with the same
phase and that works, however, I need to run another plugin in between. Is
this possible?

I was hoping that all plugins' executions would be sorted by their id. That
way, i could use id's like 'step-1-do-something',
'step-2-do-something-else', to force a certain order of plugin execution.

regards,

Wim


Re : Running antrun plugin twice in same phase with another plugin in between?

2010-07-13 Thread Julien HENRY
Hi,

Have you tried the following configuration?

build
plugins
  plugin
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
idtask1/id
phaseyourphase/phase
configuration
  tasks
!-- Some task --
  /tasks
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
  /plugin
  plugin
artifactIdyour middle plugin/artifactId
executions
  execution
idtask2/id
phaseyourphase/phase
configuration
   ...
/configuration
goals
  ...
/goals
  /execution
/executions
  /plugin
  plugin
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
idtask3/id
phaseyourphase/phase
configuration
  tasks
!-- Some other task --
  /tasks
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
  /plugin
/plugins
  /build
I have not tested so I'm not sure it will work.

Regards,

Julien



- Message d'origine 
 De : Wim Deblauwe wim.debla...@gmail.com
 À : Maven Users List users@maven.apache.org
 Envoyé le : Mar 13 juillet 2010, 11h 09min 36s
 Objet : Running antrun plugin twice in same phase with another plugin in  
between?
 
 Hi,
 
 I need to run the antrun plugin twice in the packaging phase. I found  this
 on the wiki:
 http://docs.codehaus.org/display/MAVENUSER/MiniGuide-AntMultiPhase
 
 However,  it speaks of different lifecycle phases. I tried with the same
 phase and  that works, however, I need to run another plugin in between. Is
 this  possible?
 
 I was hoping that all plugins' executions would be sorted by  their id. That
 way, i could use id's like  'step-1-do-something',
 'step-2-do-something-else', to force a certain order  of plugin execution.
 
 regards,
 
 Wim
 


 

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



Re: Re : Running antrun plugin twice in same phase with another plugin in between?

2010-07-13 Thread Wim Deblauwe
Hi Julien,

yes, I tried that too and it does not work. task1 does not get executed :(

regards,

Wim

2010/7/13 Julien HENRY henr...@yahoo.fr

 Hi,

 Have you tried the following configuration?

 build
plugins
  plugin
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
idtask1/id
phaseyourphase/phase
configuration
  tasks
!-- Some task --
  /tasks
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
  /plugin
  plugin
artifactIdyour middle plugin/artifactId
executions
  execution
idtask2/id
phaseyourphase/phase
configuration
   ...
/configuration
goals
  ...
/goals
  /execution
/executions
  /plugin
  plugin
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
idtask3/id
phaseyourphase/phase
configuration
  tasks
!-- Some other task --
  /tasks
/configuration
goals
  goalrun/goal
/goals
  /execution
/executions
  /plugin
/plugins
  /build
 I have not tested so I'm not sure it will work.

 Regards,

 Julien



 - Message d'origine 
  De : Wim Deblauwe wim.debla...@gmail.com
  À : Maven Users List users@maven.apache.org
  Envoyé le : Mar 13 juillet 2010, 11h 09min 36s
  Objet : Running antrun plugin twice in same phase with another plugin in
 between?
 
  Hi,
 
  I need to run the antrun plugin twice in the packaging phase. I found
  this
  on the wiki:
  http://docs.codehaus.org/display/MAVENUSER/MiniGuide-AntMultiPhase
 
  However,  it speaks of different lifecycle phases. I tried with the same
  phase and  that works, however, I need to run another plugin in between.
 Is
  this  possible?
 
  I was hoping that all plugins' executions would be sorted by  their id.
 That
  way, i could use id's like  'step-1-do-something',
  'step-2-do-something-else', to force a certain order  of plugin
 execution.
 
  regards,
 
  Wim
 




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




Re: Running antrun plugin twice in same phase with another plugin in between?

2010-07-13 Thread Justin Edelson
You can't do this.

On 7/13/10 5:09 AM, Wim Deblauwe wrote:
 Hi,
 
 I need to run the antrun plugin twice in the packaging phase. I found this
 on the wiki:
 http://docs.codehaus.org/display/MAVENUSER/MiniGuide-AntMultiPhase
 
 However, it speaks of different lifecycle phases. I tried with the same
 phase and that works, however, I need to run another plugin in between. Is
 this possible?
 
 I was hoping that all plugins' executions would be sorted by their id. That
 way, i could use id's like 'step-1-do-something',
 'step-2-do-something-else', to force a certain order of plugin execution.
 
 regards,
 
 Wim
 


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



Re: Running antrun plugin twice in same phase with another plugin in between?

2010-07-13 Thread Wayne Fay
 However, it speaks of different lifecycle phases. I tried with the same
 phase and that works, however, I need to run another plugin in between. Is
 this possible?

You could:
release the maven-antrun-plugin under your own artifactId, say wim-antrun-plugin
then use (in order): m-antrun-p, plugin2, w-antrun-p in your pom

But this seems like a lot of extra work to me.

Wayne

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



Re: Running antrun plugin twice in same phase with another plugin in between?

2010-07-13 Thread Wim Deblauwe
I had a look at the maven 2.2.x code and I created a small patch that does
it. See http://jira.codehaus.org/browse/MNG-4727
All the patch does is sorting the 'MojoExecution' classes based on their id.
It is very few lines of code really.

It is a bit hackish as you need to use step- in your id/ declaration,
but it works perfectly. I hope the maven devs will pick it up under some
form or another.

regards,

Wim

2010/7/13 Wayne Fay wayne...@gmail.com

  However, it speaks of different lifecycle phases. I tried with the same
  phase and that works, however, I need to run another plugin in between.
 Is
  this possible?

 You could:
 release the maven-antrun-plugin under your own artifactId, say
 wim-antrun-plugin
 then use (in order): m-antrun-p, plugin2, w-antrun-p in your pom

 But this seems like a lot of extra work to me.

 Wayne

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