The goal works fine when executed on a specific subproject but fails when invoked on the same project via the reactor.
<goal name="junitejb:init">
<available
property="junitejbSourcesPresent"
file="${maven.junitejb.src}"
/>
</goal> <goal name="junitejb:test"
description="execute junitejb tests"
prereqs="junitejb:init"><j:if test="${junitejbSourcesPresent}">
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
<junit printSummary="yes"
failureProperty="maven.test.failure"
fork="${maven.junit.fork}"
dir="${maven.junit.dir}"><sysproperty key="basedir" value="${basedir}"/>
<util:tokenize var="listOfProperties" delim=" ">${maven.junit.sysproperties}</util:tokenize>
<j:forEach var="someProperty" items="${listOfProperties}">
<sysproperty key="${someProperty}" value="${context.getVariable(someProperty)}"/>
</j:forEach>
<util:tokenize var="listOfJvmArgs" delim=" ">${maven.junit.jvmargs}</util:tokenize>
<j:forEach var="somejvmarg" items="${listOfJvmArgs}">
<jvmarg value="${somejvmarg}"/>
</j:forEach>
<formatter type="xml"/>
<formatter type="plain" usefile="${maven.junit.usefile}"/>
<classpath>
<path refid="maven.dependency.classpath"/>
<pathelement location="${maven.build.dir}/junitejb"/>
<pathelement location="${maven.build.dest}"/>
<pathelement path="${plugin.getDependencyPath('junit')}"/>
<pathelement path="${plugin.getDependencyPath('junitejb')}"/>
</classpath>
<batchtest todir="${maven.test.reportsDirectory}">
<fileset dir="src/junitejb/java">
<j:forEach var="pat" items="${pom.build.unitTest.includes}">
<include name="${pat}"/>
</j:forEach>
<j:forEach var="pat" items="${pom.build.unitTest.excludes}">
<exclude name="${pat}"/>
</j:forEach>
<exclude name="**/*AbstractTestCase.java"/>
</fileset>
</batchtest>
</junit> <j:if test="${maven.test.failure}">
<j:set var="ignore__" value="${maven.test.failure.ignore}X"/>
<j:if test="${ignore__ == 'X'}">
<fail message="There were test failures."/>
</j:if>
</j:if>
</j:if> <j:if test="${!junitejbSourcesPresent}">
<echo>No tests to run.</echo>
</j:if></goal>
Brett Porter wrote:
The maven.log sample given isn't what the problem is.
Where is junitejb:test defined? I haven't ever seen it before.
- Brett
-----Original Message-----
From: Nathan Coast [mailto:[EMAIL PROTECTED] Sent: Monday, 29 September 2003 3:18 PM
To: Maven Users
Subject: unknown goal - reactor problem
Hi,
I'm getting an "Unknown goal" error message when using the reactor. The goal is successfully executed for a couple of the sub-projects but fails on one of the later ones.
this is my jellyscript <maven:reactor basedir="${basedir}" postProcessing="true" includes="*/project.xml" goals="junitejb:test" banner="Executing junitejb tests" ignoreFailures="false"/>
The maven.log contains around a dozen exceptions like this
java.lang.NumberFormatException: For input string: "includes"
at java.lang.NumberFormatException.forInputString(NumberFormatExc
eption.java:48)
at java.lang.Integer.parseInt(Integer.java:426)
at java.lang.Integer.valueOf(Integer.java:532)
at org.apache.commons.jexl.util.Coercion.coerceInteger(Coercion.java:95)
at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(AST
ArrayAccess.java:177)
at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdenti
fier.java:104)
at org.apache.commons.jexl.parser.ASTReference.execute(ASTReferen
ce.java:106)
at org.apache.commons.jexl.parser.ASTReference.value(ASTReference
.java:88)
at org.apache.commons.jexl.parser.ASTNotNode.value(ASTNotNode.java:88)
at at com.werken.forehead.Forehead.main(Forehead.java:573)
...................... .....................
any ideas? I'm guessing the unkown goal message is a side effect of something going wrong in the execution of the goal on one of the sub-projects but I don't know where to look for the underlying error.
cheers Nathan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
