You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kevin Tomasek <kt...@d2audio.com> on 2008/01/03 20:38:38 UTC

building ant from source and junit build error

all,


i am trying to build ant from source code on a rhel4 amd 64 bit system.

i get this message:
BUILD FAILED
/tmp/ant/apache-ant-1.7.0/build.xml:1105: The following error occurred 
while executing this line:
/tmp/ant/apache-ant-1.7.0/build.xml:911: We cannot build the test jar 
unless JUnit is present,
      as JUnit is needed to compile the test classes.

the apache web site provides two solutions to the problem..
1. add the junit.jar to the classpath
2. remove the dependancy from the build.xml file

the second one works, of course.

the first one doesn't...  i have done the following:
setenv  CLASSPATH /tmp/jars
setenv  CLASSPATH /tmp/jars/junit.jar

where junit.jar is 'ln -s /tmp/jars/junit-4.4-src.jar junit.jar' . 
/tmp/jars/junit-4.4-src.jar is readable by all.

i have put the  junit.jar in the following directories: 
~/.ant/lib 
/tmp/ant/apache-ant-1.7.0 
/tmp/ant/apache-ant-1.7.0/lib 
/tmp/ant/apache-ant-1.7.0/lib/optional

setenv ANTHOME /tmp/ant/apache-ant-1.7.0 is set

it still fails..
does any one have any idea what little thing that i am missing?  i don't

know what the ant commands/scripts are supposed to look like.  i have 
basic java understood.  i have succesfully used netbeans to 
write/build/compile java programs.

thanks kevin


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: building ant from source and junit build error

Posted by Ja...@rzf.fin-nrw.de.
1. Have a clean Ant-src directory ( /tmp/ant/apache-ant-1.7.0 ), means:
   - no "build"
   - no "bootstrap"
   - no "dist"

   On windows I use a small batch file:
	@echo off
	rd /Q/S bootstrap build dist
	del *.log
	del TEST-*.*

2. Build Ant and provide the path to additional libraries
   build -lib path-to-dir-containing-junitjar


But speaking for JUnit: it is part of the source: http://svn.apache.org/repos/asf/ant/core/trunk/lib/optional/


Jan



> -----Ursprüngliche Nachricht-----
> Von: Kevin Tomasek [mailto:ktomasek@d2audio.com] 
> Gesendet: Donnerstag, 3. Januar 2008 20:39
> An: user@ant.apache.org
> Betreff: building ant from source and junit build error
> 
> all,
> 
> 
> i am trying to build ant from source code on a rhel4 amd 64 
> bit system.
> 
> i get this message:
> BUILD FAILED
> /tmp/ant/apache-ant-1.7.0/build.xml:1105: The following error 
> occurred 
> while executing this line:
> /tmp/ant/apache-ant-1.7.0/build.xml:911: We cannot build the test jar 
> unless JUnit is present,
>       as JUnit is needed to compile the test classes.
> 
> the apache web site provides two solutions to the problem..
> 1. add the junit.jar to the classpath
> 2. remove the dependancy from the build.xml file
> 
> the second one works, of course.
> 
> the first one doesn't...  i have done the following:
> setenv  CLASSPATH /tmp/jars
> setenv  CLASSPATH /tmp/jars/junit.jar
> 
> where junit.jar is 'ln -s /tmp/jars/junit-4.4-src.jar junit.jar' . 
> /tmp/jars/junit-4.4-src.jar is readable by all.
> 
> i have put the  junit.jar in the following directories: 
> ~/.ant/lib 
> /tmp/ant/apache-ant-1.7.0 
> /tmp/ant/apache-ant-1.7.0/lib 
> /tmp/ant/apache-ant-1.7.0/lib/optional
> 
> setenv ANTHOME /tmp/ant/apache-ant-1.7.0 is set
> 
> it still fails..
> does any one have any idea what little thing that i am 
> missing?  i don't
> 
> know what the ant commands/scripts are supposed to look like.  i have 
> basic java understood.  i have succesfully used netbeans to 
> write/build/compile java programs.
> 
> thanks kevin
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: building ant from source and junit build error

Posted by Ja...@rzf.fin-nrw.de.
http://ant.apache.org/manual/install.html#optionalTasks 


Jan

> -----Ursprüngliche Nachricht-----
> Von: qbnronin [mailto:gil@zen.zzn.com] 
> Gesendet: Samstag, 8. März 2008 03:46
> An: user@ant.apache.org
> Betreff: Re: building ant from source and junit build error
> 
> 
> I was having the same issue. I fixed it by adding the 
> JUnit.jar (version 3.8)
> to the Ant-Install\lib\optional directory. Yes, the optional 
> directory seems
> to be the place where Ant looks for dependencies. 
> 
> Good luck!
> 
> 
> 
> Kevin Tomasek wrote:
> > 
> > all,
> > 
> > 
> > i am trying to build ant from source code on a rhel4 amd 64 
> bit system.
> > 
> > i get this message:
> > BUILD FAILED
> > /tmp/ant/apache-ant-1.7.0/build.xml:1105: The following 
> error occurred 
> > while executing this line:
> > /tmp/ant/apache-ant-1.7.0/build.xml:911: We cannot build 
> the test jar 
> > unless JUnit is present,
> >       as JUnit is needed to compile the test classes.
> > 
> > the apache web site provides two solutions to the problem..
> > 1. add the junit.jar to the classpath
> > 2. remove the dependancy from the build.xml file
> > 
> > the second one works, of course.
> > 
> > the first one doesn't...  i have done the following:
> > setenv  CLASSPATH /tmp/jars
> > setenv  CLASSPATH /tmp/jars/junit.jar
> > 
> > where junit.jar is 'ln -s /tmp/jars/junit-4.4-src.jar junit.jar' . 
> > /tmp/jars/junit-4.4-src.jar is readable by all.
> > 
> > i have put the  junit.jar in the following directories: 
> > ~/.ant/lib 
> > /tmp/ant/apache-ant-1.7.0 
> > /tmp/ant/apache-ant-1.7.0/lib 
> > /tmp/ant/apache-ant-1.7.0/lib/optional
> > 
> > setenv ANTHOME /tmp/ant/apache-ant-1.7.0 is set
> > 
> > it still fails..
> > does any one have any idea what little thing that i am 
> missing?  i don't
> > 
> > know what the ant commands/scripts are supposed to look 
> like.  i have 
> > basic java understood.  i have succesfully used netbeans to 
> > write/build/compile java programs.
> > 
> > thanks kevin
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/building-ant-from-source-and-junit-build
> -error-tp14603916p15910578.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: building ant from source and junit build error

Posted by qbnronin <gi...@zen.zzn.com>.
I was having the same issue. I fixed it by adding the JUnit.jar (version 3.8)
to the Ant-Install\lib\optional directory. Yes, the optional directory seems
to be the place where Ant looks for dependencies. 

Good luck!



Kevin Tomasek wrote:
> 
> all,
> 
> 
> i am trying to build ant from source code on a rhel4 amd 64 bit system.
> 
> i get this message:
> BUILD FAILED
> /tmp/ant/apache-ant-1.7.0/build.xml:1105: The following error occurred 
> while executing this line:
> /tmp/ant/apache-ant-1.7.0/build.xml:911: We cannot build the test jar 
> unless JUnit is present,
>       as JUnit is needed to compile the test classes.
> 
> the apache web site provides two solutions to the problem..
> 1. add the junit.jar to the classpath
> 2. remove the dependancy from the build.xml file
> 
> the second one works, of course.
> 
> the first one doesn't...  i have done the following:
> setenv  CLASSPATH /tmp/jars
> setenv  CLASSPATH /tmp/jars/junit.jar
> 
> where junit.jar is 'ln -s /tmp/jars/junit-4.4-src.jar junit.jar' . 
> /tmp/jars/junit-4.4-src.jar is readable by all.
> 
> i have put the  junit.jar in the following directories: 
> ~/.ant/lib 
> /tmp/ant/apache-ant-1.7.0 
> /tmp/ant/apache-ant-1.7.0/lib 
> /tmp/ant/apache-ant-1.7.0/lib/optional
> 
> setenv ANTHOME /tmp/ant/apache-ant-1.7.0 is set
> 
> it still fails..
> does any one have any idea what little thing that i am missing?  i don't
> 
> know what the ant commands/scripts are supposed to look like.  i have 
> basic java understood.  i have succesfully used netbeans to 
> write/build/compile java programs.
> 
> thanks kevin
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/building-ant-from-source-and-junit-build-error-tp14603916p15910578.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org