You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eric Black <eb...@concord.org> on 2005/02/10 20:39:31 UTC
maven:set doesn't seem to be exported in pregoal
Hi,
Below is a pregoal code snippet that is supposed to set the
maven.multiproject.includes property. When I run it, it echos the correct
value but doesn't get passed to the multiproject plugin. If I set the
property on the command line with the -D switch it works fine. Anyone have
any idea what the problem may be?
Thanks, Eric
<preGoal name="multiproject:goal">
<attainGoal name="init-multiproject-path" />
</preGoal>
<goal name="init-multiproject-path">
<j:set var="run" value="${maven.ccmultiproject.run}" />
<j:if test="${empty(run)}">
<ant:echo message="Running CC multiproject pregoal to set
maven.multiproject.includes." />
<ant:echo message="To disable, set maven.ccmultiproject.run property
to non-empty." />
<maven:paramCheck fail="no" value="${maven.multiproject.basedir}"
message="WARNING: maven.multiproject.basedir is not set.
Assumming current directory."/>
<j:if test="${maven.multiproject.includes == '*/project.xml'}">
<ant:fail message="Do not use maven.multiproject.includes property
to add paths, use maven.ccmultiproject.includes instead." />
</j:if>
<j:set var="includes" value="${maven.ccmultiproject.includes}" />
<!-- Build the classpath from the pom dependency cc.path properties
-->
<j:forEach var="externJar" items="${pom.artifacts}">
<j:set var="ccPath"
value="${externJar.dependency.getProperty('cc.path')}" />
<j:if test="${!empty(ccPath)}">
<j:set var="projpath"
value="${maven.multiproject.basedir}/${ccPath}/../project.xml" />
<ant:available file="${projpath}" property="fileExists" />
<j:if test="${fileExists}">
<j:if test="${empty(includes)}">
<j:set var="includes" value="${ccPath}/../project.xml" />
</j:if>
<j:if test="${!empty(includes)}">
<j:set var="includes"
value="${includes},${ccPath}/../project.xml" />
</j:if>
</j:if>
</j:if>
</j:forEach>
<ant:echo message="maven.multiproject.includes=${includes}" />
<maven:set plugin="maven-multiproject-plugin"
property="maven.multiproject.includes" value="${includes}" />
</j:if>
</goal>
Re: maven:set doesn't seem to be exported in pregoal
Posted by Eric Black <eb...@concord.org>.
I found the problem. It was the lib/../project.xml part. for some reason
that doesn't work.
Eric