I'm sure the answer to this will be "don't do it like that", but here
goes...
I have a base project (call it A) whose maven.xml contains the following:
<goal name="all">
<m:reactor basedir="${basedir}" includes="*/project.xml"
goals="${maven.all.goals}" ignoreFailures="false"/>
</goal>
<goal name="all:build">
<j:set var="maven.all.goals">tcw:build</j:set>
<attainGoal name="all"/>
</goal>
Then I have a project (B) which extends A and whose maven.xml contains this:
<goal name="tcw:integrationbuild">
<j:set var="maven.tcw.envs">dev,test</j:set>
<attainGoal name="all:build"/>
</goal>
Finally I have a sub-project [C] which extends B and contains this:
<goal name="tcw:build">
<j:if test="${context.getVariable('maven.tcw.envs') ==
null}">
<j:set var="maven.tcw.envs">dev</j:set>
<echo>No maven.tcw.envs parameter set - defaulting
to ${maven.tcw.envs}</echo>
</j:if>
</goal>
Now the intent is that when I try and run the tcw:integrationbuild goal on B
it will set the property, fire up the reactor via the goals in A which will
in turn run the tcw:build goal on all the sub-projects (of which C is one).
And indeed this all works fine and dandy.
The problem I have is that when I get to the check in C on the property
value it says it's not set, despite me thinking I have in the B maven.xml.
NB: The test does work when the value is supplied on the command line via -D
So am I:
a). Doing the set wrong in B?
b). Doing the test wrong in C?
c). Doing it all wrong? :(
The reason for the projects A B & C being broken up as they are is too
complex to go into here, but basically changing that aspect would be
non-trivial for me, so solutions that involve the content of what's in the
maven.xml would be much preferred!
thanks
James
------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.
Internet communications are not secure and therefore the Barclays
Group does not accept legal responsibility for the contents of this
message. Although the Barclays Group operates anti-virus programmes,
it does not accept responsibility for any damage whatsoever that is
caused by viruses being passed. Any views or opinions presented are
solely those of the author and do not necessarily represent those of the
Barclays Group. Replies to this email may be monitored by the Barclays
Group for operational or business reasons.
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]