Can someone please point me to a very simple tutorial on build.xml files, I have read at leat 10 so far and none are helping me set up what I need to set up.
ok this is what I am trying to do: I want to deploy a web application so it is accessable to the server.
This is my file directory:
bluegrass\
has html and jsp pages
bluegrass\WEB-INF
has web.xml file
bluegrass\WEB-INF\classes
has my class files
bluegrass\WEB-INF\lib
has my jar files
I want to take and make a web app out of these files. I am not sure how to set up a build.xml file to handle the jsp's (4) and the java servlet(1). I am also unsure what to do with properties. I think for targets I am going to use initiate, build, clean, compile, dist, deploy....
But again it is mainly the properties and classpath that I get hung up on I have never done a build.xml file before so I am lost!
Are you wanting to build a .war file from these? Or is deployment gonna be a simple matter of a straight file-copy?
(One thought ... a lot of Open Source dists come with build files, if you could find one which uses JSP etc, its build file may give you a starting point to help you create your own).
Tim
--------------------------- "Your morbid fear of losing,
destroys the lives you're using." - Ozzy
I was planning on creating a war file with this buil file and then having the war file be deployed.
This is what I am thinking so far:
<?xml version="1.0"?>
<project name="bluegrass" default="buildwar" basedir=".">
<target name="init">
<property name="webinf.dir" value="${basedir}/WEB-INF"/>
<property name="lib.dir" value="${webinf.dir}/lib"/>
<property name="classes.dir" value="${webinf.dir}/classes"/>
<property name="fileset.dir" value="${basedir}/bluegrass"/>
</target>
<target name="buildwar" depends="init">
<war destfile="myapp.war" webxml="${webinf.dir}/web.xml">
<fileset dir="${fileset.dir}"/>
<lib dir="${lib.dir}"/>
<classes dir="${classes.dir}"/>
</war>
</target>
</project>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.