ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lothar Krenzien <lkrenz...@web.de>
Subject Re: running junit from ant
Date Thu, 12 Jan 2006 14:37:25 GMT
Here's an extract of the diagnostic output (ant -diagnostic) :

------- Ant diagnostics report -------
Apache Ant version 1.6.5 compiled on June 2 2005

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.5
optional tasks : 1.6.5

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: D:\prog\ant-1.6.5

.....

-------------------------------------------
 Tasks availability
-------------------------------------------
image : Missing dependency com.sun.media.jai.codec.FileSeekableStream
sshexec : Missing dependency com.jcraft.jsch.UserInfo
scp : Missing dependency com.jcraft.jsch.UserInfo
jdepend : Missing dependency jdepend.xmlui.JDepend
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

What does it mean ? Do I need some missing libraries ?

-------------------------------------------
 XML Parser information
-------------------------------------------
XML Parser : org.apache.xerces.jaxp.SAXParserImpl
XML Parser Location: D:\prog\ant-1.6.5\lib\xercesImpl.jar

-------------------------------------------
 System properties
-------------------------------------------
java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path : C:\Programme\Java\jdk1.5.0_05\jre\bin
java.vm.version : 1.5.0_05-b05
ant.library.dir : D:\prog\ant-1.6.5\lib
java.vm.vendor : Sun Microsystems Inc.
java.vendor.url : http://java.sun.com/
path.separator : ;
java.vm.name : Java HotSpot(TM) Client VM
file.encoding.pkg : sun.io
user.country : DE
sun.os.patch.level : Service Pack 2
java.vm.specification.name : Java Virtual Machine Specification
user.dir : W:\application\webapp\deploy
java.runtime.version : 1.5.0_05-b05
java.awt.graphicsenv : sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs : C:\Programme\Java\jdk1.5.0_05\jre\lib\endorsed
os.arch : x86

.....

The debug output (ant -debug) :

	<target name="test" time="0 seconds">
		<task location="W:\application\webapp\deploy\build.xml:76: " name="exec" time="0 seconds">
                       ....
			<message priority="info"><![CDATA[]]></message>
			<message priority="info"><![CDATA[W:\application\webapp\bin>set JAVA_HOME=C:\Programme\Java\jdk1.5.0_05
]]></message>
			<message priority="info"><![CDATA[]]></message>
			<message priority="info"><![CDATA[W:\application\webapp\bin>set CAYENNE_HOME=D:\prog\cayenne-1.2M10
]]></message>
			<message priority="info"><![CDATA[]]></message>
			<message priority="info"><![CDATA[W:\application\webapp\bin>set CATALINA_HOME=d:\prog\jakarta-tomcat-5.5.4
]]></message>
		</task>
		<message priority="debug"><![CDATA[Found D:\prog\ant-1.6.5\lib\junit.jar]]></message>
		<message priority="debug"><![CDATA[Found D:\prog\ant-1.6.5\lib\ant-launcher.jar]]></message>
		<message priority="debug"><![CDATA[Found D:\prog\ant-1.6.5\lib\ant.jar]]></message>
		<message priority="debug"><![CDATA[Found D:\prog\ant-1.6.5\lib\ant-junit.jar]]></message>
		<message priority="debug"><![CDATA[Found D:\prog\ant-1.6.5\lib\junit.jar]]></message>
		<message priority="debug"><![CDATA[Found D:\prog\ant-1.6.5\lib\ant-launcher.jar]]></message>
		<message priority="debug"><![CDATA[Found D:\prog\ant-1.6.5\lib\ant.jar]]></message>
		<message priority="debug"><![CDATA[Found D:\prog\ant-1.6.5\lib\ant-junit.jar]]></message>
		<task location="W:\application\webapp\deploy\build.xml:89: " name="junit" time="0 seconds"></task>
	</target>


I've just tried using the Ant XMLLogger (-logger org.apache.tools.ant.XmlLogger ) and got
the following output:

	<target name="test" time="0 seconds">
		<task location="W:\application\webapp\deploy\build.xml:76: " name="exec" time="0 seconds">
			.....
		</task>
		<task location="W:\application\webapp\deploy\build.xml:89: " name="junit" time="0 seconds"></task>
	</target>


And my target looks like:

    <target name="test" depends="compile">  
	 <exec dir="./bin" executable="cmd">
		<arg line="/c setenv.bat"/>
	 </exec>		

       <junit haltonerror="true" haltonfailure="true" printsummary="true">
         <classpath refid="class.path" />

         	<formatter type="plain" usefile="true"/>         	
         	<batchtest todir="${bin.dir}" fork="true">
	   	  <fileset dir="${out.dir}/WEB-INF/classes/sr2/test/">	   	  
	   		  <filename name="**/TestRunner"/>
  	   	  </fileset>
  	   	</batchtest>
  	   	
       </junit>
  </target>

The class TestRunner start either the SwingGUI or the TextGUI depending on on command line
switch. But not a single test but a test suite. 
Is it a problem that I created the Testclasses with Eclipse ? Or that I use Log4J ?

Thanks Lothar

"Ant Users List" <user@ant.apache.org> schrieb am 12.01.06 06:21:11:
> 
> On Wed, 11 Jan 2006, Lothar Krenzien <lkrenzien@web.de> wrote:
> 
> > of course I've tried different formatters, with and without
> > "usefile". But I don't get any output.
> 
> Strange.  It should work, and it does for many people, including
> myself.
> 
> Can you run ant -debug to see what is going on in your case?
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


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


Mime
View raw message