Apologies if this is a duplicate, I think I posted this yesterday but it doesn't seem to have reached the list.
I'm having problems using ant:available within a loop.
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
<j:set var="junitejb.test.jar"
value="foo.bar.${dep.getArtifactId()}.jar"/> <ant:available property="junitejb.test.jar.available"
file="${junitejb.test.jar}"/> <j:if test="${junitejb.test.jar.available}">
..... do something
</j:if>
<j:set var="junitejb.test.jar.available" value=""/>
</j:forEach>If the available test fails to locate the file, the value of the property is unchanged. So when a file is located, all subsequent loops the property junitejb.test.jar.available is true.
I tried resetting the property to "" but then the var doesn't seem to get set to true if a file is located in subsequent loops.
cheers Nathan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
