No, that didn't work, but thanks for the tip.

I got it to work on my Linux box, but the server I'm trying to get it to work 
on is an HP Alpha running Tru64.  The versions of Ant and Maven are exactly 
the same and all the other JAR files are exactly the same.  The only 
difference is the Java 1.3.1 version and build.
---- Linux -------
  java version "1.3.1_10"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_10-b03)
  Java HotSpot(TM) Client VM (build 1.3.1_10-b03, mixed mode)
---- Alpha -------
  java version "1.3.1"
  Java(TM) 2 Runtime Environment, Standard Edition
  Fast VM (build 1.3.1-6, native threads, mixed mode, precompiled rt.jar, 
07/14/2003-13:20)

That should not be the problem since HP says "It passes all the tests in Sun's 
Java Compatibility test suite (JCK V1.3a)", and I don't want to be so quick 
to blame it.

So, here's more information that can narrow it down.  The only difference in 
the output generated by maven -X test:test is the second 
maven.dependency.classpath reference.  The Alpha box has ant-optional in that 
line and the Linux box doesn't.  Since the problem is with ant-optional, I 
think the cause of this could be the core of the problem.
---- Linux -------
  [DEBUG] Adding reference: maven.dependency.classpath -> 
/home/jake/.maven/repository/xerces/jars/xercesImpl-2.6.0.jar:/home/jake/.maven/repository/xerces/jars/xmlParserAPIs-2.6.0xerces.jar:/home/jake/.maven/repository/commons-jelly/jars/commons-jelly-tags-log-20030211.142821.jar:/home/jake/.maven/repository/ant/jars/ant-optional-1.5.3-1.jar:/home/jake/.maven/repository/junit/jars/junit-3.8.1.jar
    [available] [VERBOSE] Found: src
    [available] [VERBOSE] Found: test
  [DEBUG] Adding reference: maven-classpath ->
  [DEBUG] Adding reference: maven.compile.src.set ->
  [DEBUG] Adding reference: maven.test.compile.src.set ->
  [DEBUG] Adding reference: maven.dependency.classpath ->
  [DEBUG] Adding reference: maven-classpath ->
  [DEBUG] Adding reference: maven.compile.src.set ->
  [DEBUG] Adding reference: maven.test.compile.src.set ->
  [DEBUG] Adding reference: maven.dependency.classpath -> 
/home/jake/.maven/repository/junit/jars/junit-3.8.1.jar:/home/jake/.maven/repository/xml-apis/jars/xml-apis-1.0.b2.jar:/home/jake/.maven/repository/xerces/jars/xerces-2.4.0.jar
---- Alpha -------
  [DEBUG] Adding reference: maven.dependency.classpath -> 
/home/jake/.maven/repository/xerces/jars/xercesImpl-2.6.0.jar:/home/jake/.maven/repository/xerces/jars/xmlParserAPIs-2.6.0xerces.jar:/home/jake/.maven/repository/commons-jelly/jars/commons-jelly-tags-log-20030211.142821.jar:/home/jake/.maven/repository/ant/jars/ant-optional-1.5.3-1.jar:/home/jake/.maven/repository/junit/jars/junit-3.8.1.jar
    [available] [VERBOSE] Found: src
    [available] [VERBOSE] Found: test
  [DEBUG] Adding reference: maven-classpath ->
  [DEBUG] Adding reference: maven.compile.src.set ->
  [DEBUG] Adding reference: maven.test.compile.src.set ->
  [DEBUG] Adding reference: maven.dependency.classpath ->
  [DEBUG] Adding reference: maven-classpath ->
  [DEBUG] Adding reference: maven.compile.src.set ->
  [DEBUG] Adding reference: maven.test.compile.src.set ->
  [DEBUG] Adding reference: maven.dependency.classpath -> 
/home/jake/.maven/repository/junit/jars/junit-3.8.1.jar:/home/jake/.maven/repository/xml-apis/jars/xml-apis-1.0.b2.jar:/home/jake/.maven/repository/xerces/jars/xerces-2.4.0.jar:/home/jake/.maven/repository/ant/jars/ant-optional-1.5.3-1.jar

The ~/.maven/repository/ant/jars directories are exactly the same.  I even 
deleted the ~/.maven/repository directories and made them pull everything 
fresh from the same repository again.

It seems like the ant-optional on the Alpha box can't be read for some reason, 
and therefore Maven tries to include it again, and then it fails at the end 
because Maven can never read it.

Here are the Ant and Maven versions that are common between boxes:
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT

Apache Ant version 1.5.4 compiled on August 12 2003

Thanks,

Jake



On Tuesday 30 December 2003 02:26 pm, Paul Spencer wrote:
> Jake,
> Try adding the following to project.properties
>
>    maven.junit.fork=yes
>
> Paul Spencer
>
> Jake Ewerdt wrote:
> > Hello,
> >
> > I run maven test:test and I get this error:
> >
> > BUILD FAILED
> > File...... file:/usr/users/jake/.maven/plugins/maven-test-plugin-1.4/
> > Element... junit
> > Line...... 94
> > Column.... 39
> > org/apache/tools/ant/taskdefs/optional/junit/JUnitTask
> > Total time: 11 seconds
> > Finished at: Tue Dec 30 12:24:31 EST 2003
> >
> >
> > I run maven with the -X flag, and it prints out this error (along with
> > thousands of other lines):
> >
> > Root cause
> > java.lang.NoClassDefFoundError:
> > org/apache/tools/ant/taskdefs/optional/junit/JUnitTask
> >
> >
> > I also see this line, which shows ant-optional and junit in the
> > classpath:
> >
> > [DEBUG] Adding reference: maven.dependency.classpath ->
> > ...:/usr/users/jake/.maven/repository/junit/jars/junit-3.8.1.jar:/usr/use
> >rs/jake/.maven/repository/ant/jars/ant-optional-1.5.3-1.jar:...
> >
> >
> > I have ant-optional and junit in my project.xml dependancies:
> >
> >     <dependency>
> >       <groupId>ant</groupId>
> >       <artifactId>ant-optional</artifactId>
> >       <version>1.5.3-1</version>
> >       <url>http://ant.apache.org</url>
> >     </dependency>
> >     <dependency>
> >       <groupId>junit</groupId>
> >       <artifactId>junit</artifactId>
> >       <version>3.8.1</version>
> >       <url>http://www.junit.org</url>
> >     </dependency>
> >
> > and I have also tried adding this line to each of the above, which
> > doesn't work:
> >
> > <properties><classloader>root</classloader></properties>
> >
> >
> > The test:compile successfully completes, and the compiled unittests are
> > in the target/test-classes directory, so it looks like the main problem
> > is ant-optional is not being found.
> >
> > I'm using Maven 1.0-rc1.
> >
> > Thanks,
> >
> > Jake
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to