Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I have written an Ant task that can configure a JMeter task for a specific environment. It is invoked like this from an ant build.xml file:
<configurejmeter
basedir="${basedir}/tests"
destdir="${current.build.dir}"
includes="*.jmx"
>
<property file="${environment.properties}" />
<property name="nr_threads" value="${test.nr.threads}" />
<property name="nr_iterations" value="${test.nr.iterations}" />
</configurejmeter>
The <property file="..."/> element specifies a file containing properties to be inserted into the JMeter task, while the <property name=".." value="..."/> tags specify specific properties.
However, when I put this fragment in a maven.xml file, it doesn't work. It seems the setName() of all the objects created for the nested <property> elements is invoked with the value "property". The first <property> element won't work because of that because it doesn't expect setName() to be invoked when setFile() is invoked too.
I've isolated the problem to line 261 in org.apache.commons.jelly.tags.ant.AntTag:
http://jakarta.apache.org/commons/jelly/libs/ant/xref/org/apache/commons/jelly/tags/ant/AntTag.html#260
Why is that line of code there? It seems strange to me, also because the exception is masked. When I commented out those lines, the problem disappeared.
BTW, I am using Maven 1.0rc1, which includes commons-jelly-tags-ant-20030625.032346.jar.