I want to initialize a variable or property just once at the beginning
of a multiproject build and then be able to access that value in any of
the subprojects. Ideally, running a subproject build on it's own would
also initialize the value.
For instance, so far I have something like this in my shared,
common/maven.xml file:
<preGoal name="build:start">
<j:if test="${svnRevision == null}">
<ant:echo>Getting revision...</ant:echo>
<!-- code to get svn revision omitted, but I can post it if anyone
is interested -->
<j:set var="svnRevision" value="XXXXXX"/>
</j:if>
</preGoal>
This doesn't work -- "Getting revision..." is echoed for each subproject
build, which means that svnRevision isn't set in the context of each of
the individual builds. I don't actually think this code should work (it
makes sense that each subproject *would* have it's own independent
instance of the svnRevision variable) -- I am just looking for tips
about what I might change to get it to work. I just don't know where I
can "stash" the value so that it will be available in the subproject
builds.
Thanks,
-Max
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]