File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Servlet compilation from ant Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Servlet compilation from ant" Watch "Servlet compilation from ant" New topic
Author

Servlet compilation from ant

Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 155
Hello Everybody,

I have made a simple servlet known as TestServlet1.java in tomcat
c:\Tomcat 4.1\webapps\jasbir\web-inf\classes\TestServlet1.java
well this servlet is running perfectly as I configured web.xml file but I want to comiple this servlet through ant and I have installed ant and build.xml file resides here c:\Tomcat 4.1\webapps\jasbir\web-inf\build.xml

but when I give the command ant.compile well no earror and no compilation
could u please tell me where Iam wrong in configuring Buil.xml file so this is a build.xml file.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project []>
<project name="jasbir" default="compile" basedir=".">

<target name="init">
<property name="src" value="${basedir}/src" />
<property name="classes" value="${basedir}/classes" />
</target>

<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${classes}" debug="on">
<classpath>


<fileset dir="../../WEB-INF/lib">
<include name= "..common/lib/servlet.jar"/>
</fileset>
</classpath>
</javac>
</target>

</project>
Please just tell me where Iam wrong as I think Iam making a silly mistakes.

Thanks.
Jasbir


jasmine kaur
Daniel Mayer
Ranch Hand

Joined: Sep 09, 2004
Posts: 103
Ant does only compile "dirty" files - if your class files are uptodate, nothing will happen.

Run ant with -verbose to see what's happening.
Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 155
Hi,
Thanks for helping me ,I have solved my problem .
Thanks Daniel .Thanks alot.

 
jQuery in Action, 2nd edition
 
subject: Servlet compilation from ant
 
Threads others viewed
Struts2:NoClassDefFoundError for pdf parsing using itext
J2EE Deployment using ANT
Warning Message When I Ran My ANT build.xml File
ant tomcat dist -wrong file structure specified
struts/jboss/tomcat application not working
developer file tools