ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kenneth Litwak" <klit...@apu.edu>
Subject RE: Basic syntax problem
Date Wed, 12 May 2004 00:01:11 GMT
Thanks Jack and Peter.  That fixed that problem.  

   Now how about this.  In the process of developing a project, I have
code that I want to test, and code that is in development, i.e., it
isn't done and doesn't compile.  I still want to run my test.  What do I
do in my script to tell Ant to compile what it can and run the test?
This would of course only be relevant for the unit tests I'm trying to
run.  Thanks.


Ken

-----Original Message-----
From: Peter Davison [mailto:peterdavison@tfnet.ca] 
Sent: Tuesday, May 11, 2004 4:31 PM
To: Ant Users List
Subject: Re: Basic syntax problem

Hi Kenneth.

If your code snippet is straight out of your build script (and it's not
just a
typo in your email) you have a double quote '"' in the wrong place.
Replace:

<java fork="true" dir="${build.dir}"/test/classes

with 

<java fork="true" dir="${build.dir}/test/classes"

Not sure if that's the only problem, :-)  but it would definitely be the
cause
of the mentioned error.

Hope that helps.

Pete. 

On Tue, 11 May 2004 16:19:24 -0700
"Kenneth Litwak" <klitwak@apu.edu> wrote:

>    In spite of reading a book on Ant, I'm still having significant
> problems in understanding the pieces, particularly frustrating given
> what else I've done as a programmer (not meant as a boast, but if you
> can code a CMP EJB,a scripting language shouldn't be hard).  My team
ha
> a big Ant build script.  I added a task that is supposed to run from a
> basedir, apu-reg, and use the test.class file in
> Basedir/build/test/classes/edu/apu/directory/test.class
> And when running be able to refer to classes in
> basedir/build/classes/edu/apu/directory/*.class
> as well as
> basedir/build/classes/edu/apu/registration/*.class
> 
> I already have a compile task for the Test.java, written by someone
> else.
> I copied it and modified it to write this:
> 	<echo message="Running Test ${class} ${args}"/>
> 		<java fork="true" dir="${build.dir}"/test/classes
> classname="${class}">
> 			<arg line="${args}"/>
> 			<classpath>
> 				<pathelement
> path="${build.dir}/test/classes"/>
>                         <pathelement path="${build.dir}/classes"/>
> 				<fileset dir="${lib.dir}">
> 					<include name="*.jar"/>
> 				</fileset>
> 			</classpath>
> 		</java>
> 	</target>
> 
> When I run ant test-run, I get an error for this task:
> 
> Buildfile: build.xml
> 
> BUILD FAILED
> C:\cvsfolder\javalib\apu-reg\build.xml:207: Element type "java" must
be
> followed
>  by either attribute specifications, ">" or "/>".
> 
> Total time: 0 seconds
> 
> 
> So what am I missing?  I could sure use something to read that gives a
> detailed explanation of pathelements and filesets.  The book I have is
> not nearly detailed enough for my purposes.  I have no idea if I've
got
> this specified correctly.  Thanks.
> 
> Ken  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


-- 
Peter Davison
peterdavison@tfnet.ca
h: 416 699 2964
c: 416 566 8461

---------------------------------------------------------------------
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


Mime
View raw message