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 Deployment problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Deployment problem" Watch "Deployment problem" New topic
Author

Deployment problem

Prasad Prabha
Greenhorn

Joined: Nov 26, 2008
Posts: 8
hii all

All my folders inside my application folder are getting deleted while deploying the application. My application resides in webapps/sample(app name).
I suspect this happens because of my build file....

my build file is given below..
<?xml version="1.0"?>

<!-- build tool for LiveHelp admin web pages -->

<project name="BANK" default="copywar" basedir=".">

<!-- compiling the code -->
<target name="compilesources">
<javac srcdir="./WEB-INF/src" destdir="./WEB-INF/classes" includes="com/example/web/*.java" />
</target>

<!-- creating war file -->
<target name="createwar" depends="compilesources">
<jar jarfile="sample.war" basedir="." includes="WEB-INF/,jsp/" excludes="WEB-INF/src/" />
</target>

<!-- copying the ear file to jboss directory -->
<target name="copywar" depends="createwar">
<copy file="sample.war" todir="C:\Tomcat 5.5\webapps" overwrite="true"/>
</target>
</project>
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

"Prasad " please check your private messages for an important administrative matter.


SCJP, SCWCD.
|Asking Good Questions|
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Prasad,

Try:

<target name="copywar" depends="createwar">
<copy file="sample.war" todir="C:\Tomcat 5.5\webapps\sample.war" overwrite="true"/>
</target>

Note the change in todir.

Hope that helps!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Prasad Prabha
Greenhorn

Joined: Nov 26, 2008
Posts: 8
Hii Martijn Verburg

Thanks alooott...finally it worked out!!!

Regards,
Prasad
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Prasad, glad to hear it! Just a quick admin matter though, please do change your name according to our naming policy, Amit has sent you a PM with the details.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deployment problem