Ant Deploy Task Help Needed!!!!!

C

Chris Pieper

Ok, I was hoping to use ANT to aid in my team's deployment's to our
development server.

Currently the system is designed as follows:

Each Developer maintains a local checked out (from CVS) copy of a
project. Each developer is tasked with making various changes, of
which there is little chance for the need of mutliple editors on any
given java file.

Then we have our development server which maintains the current
working versions of all the java class files. Each developer after
making his edits, copies the new class file to the server so that the
dev server maintains an accurate collection of the system given
changes by developer.

Basically here are the rules I would like to apply to get a fileset in
which I can use to copy to the dev server.

1> Compare last modified time for java file in local developer "src"
folder to last modified time of corresponding .class file on remote
server "classes" dir.

2> Then I would like to take those java src files with a more current
modified time and copy their corresponding class file from the local
"build" dir to the remote server "classes" dir.


ANy help would be greatly appreciated.

Thanks
Chris
(e-mail address removed)
 
B

bugbear

Chris said:
Ok, I was hoping to use ANT to aid in my team's deployment's to our
development server.

Currently the system is designed as follows:

Each Developer maintains a local checked out (from CVS) copy of a
project. Each developer is tasked with making various changes, of
which there is little chance for the need of mutliple editors on any
given java file.

Then we have our development server which maintains the current
working versions of all the java class files. Each developer after
making his edits, copies the new class file to the server so that the
dev server maintains an accurate collection of the system given
changes by developer.

Why not get the developers to check in sources (to CVS)
and have an overnight build (on the central reference machine)
do a full checkout-build-test?

All this outside-CVS copying of class (AKA derived) files
seems horribly wrong.

BugBear
 
M

Mike Schilling

bugbear said:
Why not get the developers to check in sources (to CVS)
and have an overnight build (on the central reference machine)
do a full checkout-build-test?

All this outside-CVS copying of class (AKA derived) files
seems horribly wrong.

What he said. The whole point of an SCM system is to make this sort of
thing automated and reliable.

Besides, you can't assume that the only input to a .class file is the
corresponding .java file.
 
T

Thomas Weidenfeller

Chris said:
Then we have our development server which maintains the current
working versions of all the java class files. Each developer after
making his edits, copies the new class file to the server so that the
dev server maintains an accurate collection of the system given
changes by developer.

I suggest you revise that policy first, before adding a build system on
top. Since you are already using CVS, there should be absolutely no need
to copy code (source or compiled) around manually, in an uncontrolled way.

If a developer has finished some coding, and has integrated it with all
the other code, it is committed into CVS, and period. If you need
regular builds, set up a job on some machine which drags out the code
from CVS and compiles it.

To ensure quality, have many unit tests, and let programmers run them
before they commit code. Also run them from that separate job to verify
your developers have correctly integrated their source code into CVS.

To support continuous integration, put something like Cruise Control
Basically here are the rules I would like to apply to get a fileset in
which I can use to copy to the dev server.

Do not copy stuff manually. Do not mess around in the developer's
directories. That area is off-limits for you. That stuff there is not
supposed to work at all times. It glows in the dark. It is radioactive.
Don't touch it.

Only the stuff in CVS counts.
1> Compare last modified time for java file in local developer "src"
folder to last modified time of corresponding .class file on remote
server "classes" dir.

Do not take source code in developer's local source directories into
account at all. This is the realm of the developers, you don't have to
care about it. Give developers their local build environment so they can
test their local source code in isolation. If a developer thinks his/her
source code is good enough now, he/she has to commit it into CVS.

All that exists for you is the checked-in, integrated code in CVS.
2> Then I would like to take those java src files with a more current
modified time and copy their corresponding class file from the local
"build" dir to the remote server "classes" dir.

Don't copy code around. And it is rather, hmm, well, "uncool" to swipe
potentially unintegrated code from developer's directories, just
because the source files are new.

If you need build-avoidance features, be prepared to either have to do
some extensive hacking to get a fragile system, or having to spent
serious money for monster systems like ClearCase (for which you will
have to change almost your complete development setup, hire a separate
administartor and give an arm and a leg).
ANy help would be greatly appreciated.

I can already hear the whining regarding the following suggestion, but I
think it is bitterly necessary.

Stop doing what you are currently doing. You have a desaster waiting to
happen. Instead:

Make yourself intensively familiar with the basics of software
configuration management, version control systems, and sensible
development procedures in general.

Then make yourself intensively familiar with build tools. The classic
ones like make, but also the ones popular for java development, like ant.

And if you have money to spend, give things like ClearCase a look.

/Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top