Hi Ian, You're right but that's the desired behaviour, not a bug. You may do something like this in your parent: <preGoal xxx> <attainGoal name="myGoal"/> </preGoal xxx> Where the actual code is in myGoal. Then in the subproject you can override de myGoal to do nothing.
Regards Carlos Sanchez A Coru�a, Spain http://www.jroller.com/page/carlossg/Weblog Oness Project http://oness.sourceforge.net > -----Original Message----- > From: Springer, Ian P. [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 21, 2004 3:41 PM > To: Maven Users List > Subject: parent project's preGoals and postGoals being run > > I'm trying to set up a subproject of my main project. > Unfortunately, it's not working, because Maven is executing > the preGoals and postGoals from the parent project's > maven.xml in addition to those in the subproject's maven.xml. > I added some echos to see in what order the pre/postGoals > were executing and here's what I see: > > java:compile: > [echo] subProject java:compile preGoal > [echo] mainProject java:compile preGoal > [echo] Compiling to C:\Projects\HP\ws-rp\axis-types/target/classes > [echo] subProject java:compile postGoal > [echo] mainProject java:compile postGoal > > So for any goal I run from within the subproject, Maven first > executes the subproject's pre/postGoal, then executes the > parent project's pre/postGoal. I see this behavior w/ Maven > 1.0, as well as Maven 1.1 top-of-tree. > > This seems to be a major bug to me. Stuff in the parent > project maven.xml should only be executed when you're running > maven on the parent project. Has anyone else had this issue? > Does anyone know of a workaround? > > Thanks, > Ian > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
