Thank you for your answer.

I had use the same "classpath lib" and "javac" to build the source without Junit testcase. And I had generated the war file successfully, the Tomcat server can find class file from the
war file.

But when I try to generate the war file with Junit testcase java file,
the Tomcat server can't find any class file from the generated war file.

The parameter is same when I try to generate war file either with testcase file or without testcase file.

----- Original Message ----- From: "Kamal Chandana Mettananda" <lka...@gmail.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Monday, January 19, 2009 1:01 PM
Subject: Re: question about built project(war file)


Just to confirm again, I guess you have added the junit.jar file into the
generated war file's WEB-INF/lib folder.

If so, can you try as follows?

<path id="classpath.lib">
   <pathelement path="${lib.dir}/antlr-2.7.6.jar}" />
   <pathelement path="${lib.dir}/junit.jar}" />
</path>

<javac srcdir="${temp.dir}" destdir="${temp.web.inf.dir}/classes" debug="on"
   <classpath refid="classpath.lib">
           </classpath>
</javac>


HTH.

Kamal
---------------------------------------

http://lkamal.blogspot.com



On Mon, Jan 19, 2009 at 9:10 AM, xiadanhua <xiadan...@chojo.co.jp> wrote:

Yes, I have.
Below is part of my build.xml's content.
Please check it.

<property name="classpath.lib" value="${lib.dir}/antlr-2.7.6.jar;
                   ${lib.dir}/junit.jar;


    <javac srcdir="${temp.dir}" destdir="${temp.web.inf.dir}/classes"
classpath="${classpath.lib}" debug="on" />



----- Original Message ----- From: "Kamal Chandana Mettananda" <
lka...@gmail.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Monday, January 19, 2009 12:28 PM
Subject: Re: question about built project(war file)



Have you added the junit.jar file into the lib folder of the war file?


Kamal
---------------------------------------

http://lkamal.blogspot.com


On Mon, Jan 19, 2009 at 8:51 AM, xiadanhua <xiadan...@chojo.co.jp> wrote:

 I have a question about built project(war file).



At first time, I used ant's build.xml to deploy the source to Tomcat
server.

This time I had built a correct war file.



At second time, I wrote some Junit source, and want to build them to the
Tomcat server.

Sources are same, but this time built war file was can't run.

The reason was that Tomcat server can't find the built class files.

But the built class files are in the same place.

Why can't the Tomcat server find the class files?



Please help me…




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




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

Reply via email to