A prereq is always only called once in a build cycle. This is by design, since you usually don't want the same goal to be executed again if it has been executed once already. If you want to make sure it gets executed, you should use <attainGoal> in your sub-projects, ie

<goal name="petstore:build">
  <attainGoal name="ejb:install"/>
</goal>


HTH,
Lukas


Manisha Sur wrote:
Hi ,

i have a goal defined in the root's maven.xml as follows:

 <goal name="petstore:build">
    <j:set var="goal" value="clean,petstore:build"/>
    <attainGoal name="multiproject:goal"/>
  </goal>

the intent is to run clean for each of the subprojects and then run the
custom 'petstore:build' goal for each subproject.
each of the subproject defines the petstore:build goal in the maven.xml ,
with there respective install like :

<goal name="petstore:build" prereqs="ejb:install"/>

when i run the petstore:build goal from the root, only the clean goal gets
executed. no ejb:install is called for the subproject.
But If i run "maven multiproject:goal -Dgoal=clean,petstore:build" from the
root, it does both the clean and install.
so why its not working in the first case ? how to tackle this problem ?

--
Warm Regards
Manisha Sur


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to