I am having a little trouble with nesting a <property> tag inside an <ant>
tag. Specifically I am currently dealing with the fact that I can't find a
ready made build of the torque plugin, so I have this entry in my
maven.xml:
<tagdef name="execTorque">
<j:set var="torque.buildfile" value="build-torque.xml"/>
<u:tokenize var="targets" delim=" ">${targets}</u:tokenize>
<j:forEach items="${targets}" var="target">
<echo>Executing ${target} from on ${torque.buildfile} for ${project}</echo>
<ant antfile="${torque.buildfile}" target="${target}">
<property file="${torque.src.dir}/${project}_schema/build.properties"/>
<property file="${torque.src.dir}/schema.build.properties"/>
</ant>
</j:forEach>
</tagdef>
If I comment out the nested <property> tags then it will run (and fail for
lack of a config.) If I leave them then it won't run complaining:
"You must specify value, location or refid with the name attribute"
This restriction is true for the property tag; except for the fact that I
haven't specified the name attribute. (And the restriction does not hold
for the file attribute.)
If I try a modified (and I am assuming equivalent) version:
<j:scope>
<property file="${torque.src.dir}/${project}_schema/build.properties"/>
<property file="${torque.src.dir}/schema.build.properties"/>
<j:forEach items="${targets}" var="target">
<echo>Executing ${target} from on ${torque.buildfile} for ${project}</echo>
<ant antfile="${torque.buildfile}" target="${target}"></ant>
</j:forEach>
</j:scope>
It will succeed. This looks like a bug to me, but I am very new to maven
and mostly making my way by sifting through other code, so I may be
missing something.
If anyone has an answer please cc me personally on the reply as I am not
currently a subscriber to the list.
Thanks
Will
P.S. I'm assuming it just changed, but your mailing list address is wrong
on the webpage.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]