You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Hans Christian Studt <hc...@post10.tele.dk> on 2004/02/19 20:54:52 UTC

ant test - BUILD FAILED

Hi,

I am a newbee to JaxMe and after successfully building from the source I ge=
t this problem when I try to run the test-target.

------------------------------------------------------
incubated-jaxme-0.2) #ant test
Buildfile: build.xml

test:

init:

compile:

jar:

all:

init:

compile:

jar:

all:

test:

BUILD FAILED
file:/user/home/hcs/Download/Java/jaxme/incubated-jaxme-0.2/buildxs.xml:45:=
 Could not create task or type of type: junit.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'junit'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
   and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and optional.jar is absent
   Fix: look for optional.jar in ANT_HOME/lib, download if needed
 - The task was not built into optional.jar as dependent
   libraries were not found at build time.
   Fix: look in the JAR to verify, then rebuild with the needed
   libraries, or download a release version from apache.org
 - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
 - The task is not an Ant core or optional task
   and needs to be declared using <taskdef>.

Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
classpath

Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.

Total time: 2 seconds
------------------------------------------------------

The buildxs.xml file seems to expect junit to be available same way as mkdir

------------------------------------------------------
43  <target name=3D"test" depends=3D"init,all">
44    <mkdir dir=3D"${build.reports}"/>
45    <junit printsummary=3D"yes" haltonfailure=3D"no">
46      <classpath>
47        <path refid=3D"jaxmexs.class.path"/>
48        <pathelement location=3D"${dist}/jaxmexs.jar"/>
49      </classpath>
50      <formatter type=3D"plain" />
51      <batchtest fork=3D"no" todir=3D"${build.reports}">
52        <fileset dir=3D"${src}" includes=3D"org/apache/ws/jaxme/xs/junit/=
**/*Test.java"/>
53      </batchtest>
54    </junit>
55  </target>
------------------------------------------------------

What am I missing out on ?

Mvh Hans Christian Studt
Private +45 48 79 79 89
Mobile +45 29 23 54 14
Business +45 36 14 54 14
mailto:hc@studt.dk http://hc.studt.dk
Powered by Linux 2.6.1-1.65

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: ant test - BUILD FAILED

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Ias wrote:

> Unfortunately, I have to tell you that my Ant 1.6.1 without junit.jar in lib
> shows failure from running "test" target on the base of the latest CVS HEAD
> of JaxMe for the same reason. 

So we're stuck with that. Damn! :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


RE: ant test - BUILD FAILED

Posted by Ias <ia...@tmax.co.kr>.
> The problem is not that junit.jar isn't part of the Ant 
> distribution. It is a classloader problem internally in Ant: 
> The junit task is not able to load the required classes, 
> unless they are available to Ant's boot classpath. A similar 
> problem is in Ant's "style" task.
> 

Now I see your point. Actually I have felt strange about why junit.jar
should be added to Ant's lib. Thanks for your explanation.

> I have no idea, why this is so: The "jaxme" Ant task 
> demonstrates that it is possible to fix the problem. A 
> relevant bug report exists since ages, also the proposed 
> solution. However, (at least for 1.5.4) it still persists. As 
> Ant 1.6 contains a serious rework of the classloader stuff, I 
> would hope that it is fixed there, but I don't know.

Unfortunately, I have to tell you that my Ant 1.6.1 without junit.jar in lib
shows failure from running "test" target on the base of the latest CVS HEAD
of JaxMe for the same reason. 

Ias


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: ant test - BUILD FAILED

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Ias wrote:

> As far as I'm concerned, Ant 1.6.0 and 1.6.1 also don't contains junit.jar
> in their distributions. Perhaps we need to give notice of the issue to those
> who want to build JaxMe from source base. (Or, make workaround for that. :-)

The problem is not that junit.jar isn't part of the Ant distribution. It
is a classloader problem internally in Ant: The junit task is not able
to load the required classes, unless they are available to Ant's boot
classpath. A similar problem is in Ant's "style" task.

I have no idea, why this is so: The "jaxme" Ant task demonstrates that
it is possible to fix the problem. A relevant bug report exists since
ages, also the proposed solution. However, (at least for 1.5.4) it still
persists. As Ant 1.6 contains a serious rework of the classloader stuff,
I would hope that it is fixed there, but I don't know.


Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


RE: ant test - BUILD FAILED

Posted by Ias <ia...@tmax.co.kr>.
> > 
> file:/user/home/hcs/Download/Java/jaxme/incubated-jaxme-0.2/buildxs.xm
> > l:45:=  Could not create task or type of type: junit.
> 
> You need junit.jar in your Ants lib directory. This is a 
> known problem with Ant 1.5.4 and below. No idea how 1.6 behaves.
As far as I'm concerned, Ant 1.6.0 and 1.6.1 also don't contains junit.jar
in their distributions. Perhaps we need to give notice of the issue to those
who want to build JaxMe from source base. (Or, make workaround for that. :-)

Ias


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: ant test - BUILD FAILED

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Hans Christian Studt wrote:

> file:/user/home/hcs/Download/Java/jaxme/incubated-jaxme-0.2/buildxs.xml:45:=
>  Could not create task or type of type: junit.

You need junit.jar in your Ants lib directory. This is a known problem with 
Ant 1.5.4 and below. No idea how 1.6 behaves.


Jochen

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org