@Jim, Does my suggestion work for you?
@Stephen you statement is confusing, are you suggesting to combine a bunch of mojo executions in one plugin? -D On Wed, Jun 4, 2014 at 12:08 PM, Jim Garrison <[email protected]> wrote: > > -----Original Message----- > > From: Stephen Connolly [mailto:[email protected]] > > Sent: Wednesday, June 04, 2014 9:08 AM > > To: Maven Users List > > Subject: Re: Controlling order of plugin execution > > > > That's usually a sign that you have wandered off The Maven Way™ > > > > There are ways back onto the blessed path... they typically involve > > writing > > a plugin > > > > > > On 4 June 2014 16:47, jhgnwea <[email protected]> wrote: > > > > > Paul Benedict wrote > > > > I agree with Dan. Last I check, IIRC, the order of operations of > > plugins > > > > is > > > > defined by their sequential order in the POM. However, I also find > > this a > > > > bit problematic with inheritance -- I don't know off the top of my > > head > > > > what happens then. > > > > > > Ordering applies only for executions of a single plugin. If you > > need to > > > interleave executions of two or more plugins you're out of luck. > > Say you > > > have two plugins, exec-maven and maven-sql, and want to run > > > > > > exec-maven A1 > > > maven-sql B1 > > > exec-maven A2 > > > maven-sql B2 > > > > > > A1 and A2 will run in that order, and (B1, B2) will be ordered, but > > you > > > can't control which set (A or B) runs first without horribly abusing > > the > > > phase bindings. And, if you have a more complex sequence with 3 > > plugins > > > and multiple executions of each, there aren't enough available > > phases to > > > successfully order everything. > > > > > > It should be possible to bind multiple plugin executions, of > > DIFFERENT > > > plugins, to a single phase and deterministically specify the > > execution > > > order. > > Sorry, I disagree. One alternative is to use antrun, but that seems like > going backwards. I'm really curious why there's a strong philosophical > objection to requesting this enhancement. > > Is it unreasonable to suggest that "The Maven Way" is not perfect and > might need some adjustments to handle common use-cases the original > designers didn't foresee? > > Is my goal of using Maven to automate CI/CD, which can involve configuring > external resources by running various plugins in a specific sequence, > somehow in violation of "the Maven way"? > > Consider the phrase "...you have wandered off The Maven Way™". I can't > tell if you intended this ironically or seriously. If it's the latter, it > seems like you're saying is "Maven is perfect. If Maven doesn't handle your > use-case, then your use-case is invalid". Is that true? >
