I've attached my build.xml (with changes to IPs and passwords :))
The kind of setup I'd recommend is this:
local developer machines (windows, linux, bsd, whatever) running
local copies of tomcat, eclipse for an IDE attached to your CVS
repository and ant either run from command line, or launched from within
the eclipse itself with the appropriate client. Now the deploy to
staging need to be done, but I'm sure you can research that part. Get
the files from CVS for your local copy and then pushing those to
production or staging. You'll need an ant target that uses ftp or
something or rsync or scp would work too
Paul Sundling
SuniX wrote:
Thank you
Can you give an example of ant source whick reload and deploy to a
tomcat server? It can help me.
Thanks
Paul Sundling wrote:
I'm not sure why you'd want to have it deployed automatically. You
can probably do it with ant and cruise control?
With ant, you can create targets that reload your app or deploy it to
a tomcat server. That's what I do currently and it even integrates
well with eclipse!
If you really want to do it automatically I heard cruise control does
that sort of functionality, but I'm not sure about having it look for
changes in CVS.
SuniX wrote:
Hi
Is there a way to use CVS with tomcat ?
i want my tomcat server to check a cvs project and deployed it
automaticaly. (cvs server and tomcat server in the same machine
running on a debian testing)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
!-- A project describes a set of targets that may be requested
when Ant is executed. The default attribute defines the
target which is executed if no specific target is requested,
and the basedir attribute defines the current working directory
from which Ant executes the requested task. This is normally
set to the current working directory.
--
project name=Gladiator default=compile basedir=.
!-- = Property Definitions === --
!--
Each of the following properties are used in the build script.
Values for these properties are set by the first place they are
defined, from the following list:
* Definitions on the ant command line (ant -Dcatalina.home=xyz compile)
* Definitions from a build.properties file in the top level
source directory
* Definitions from a build.properties file in the developer's
home directory
* Default definitions in this build.xml file
You will note below that property values can be composed based on the
contents of previously defined properties. This is a powerful technique
that helps you minimize the number of changes required when your development
environment is modified. Note that property composition is allowed within
build.properties files as well as in the build.xml script.
--
!-- The only properties we need is TOMCAT_HOME, so we get it from the environment
property file=build.properties/
property file=${user.home}/build.properties/
--
property environment=env/
!-- File and Directory Names --
!--
These properties generally define file and directory names (or paths) that
affect where the build process stores its outputs.
app.name Base name of this application, used to
construct filenames and directories.
Defaults to myapp.
app.version Version identifier for this application.
build.home The directory into which the prepare and
compile targets will generate their output.
Defaults to build.
catalina.homeThe directory in which you have installed
a binary distribution of Tomcat 4. This will
be used by the deploy target.
deploy.home The name of the directory into which the
deployment hierarchy will be created, and into
which the build directory will be copied.
Defaults to ${catalina.home}/webapps/${app.name}.
dist.homeThe name of the base directory in which
distribution files are created.
Defaults to dist.
--
property name=app.name value=gladiator/
property name=app.version value=1.0/
property name=build.homevalue=build/
property name=catalina.home value=${env.TOMCAT_HOME}/
property name=deploy.home value=${catalina.home}/webapps/${app.name}/
property name=dist.home value=dist/
property name=webapp.libs value=web/WEB-INF/lib/
property name=local.tomcat.username value=admin/
property