Manual packaging for deployment - J2ee

B

Bob Reynolds

Hello,

I have a requirement to create EAR and WAR packages without using the
integrated package building tools built into the IDE. The packages will be
created via a deployment script, preferably on a Win2k/Xp machine (less
preferably we have a solaris 9x box - however i really need to get this
running on xp or i'll be shuffling files between systems constantly)

To be honest, all i've ever used is my IDE, in this case Sun One Studio
(forte) to build my EARs and WARs but now I need to build my packages on a
dedicated build box thats tied in with our Source Repository.. Meaning i
have to go to first principles to create the packages...

Retrieving the files from the Code Bank isnt the issue, but compiling and
packaging the files is.

I'm using Javac to create my class files, the bit i'm not sure about (read,
currently lost) is the creation of the WAR/EAR, readings suggest that I use
the Deploytool, or JAR however I cant find explanitory text on how to use
those apps..

also note, I cant use a GUI, (deploy tool appears to have a gui/non gui
mode) as this will be a scripted deployment.

To add something else into the mix, ANT seems a popular choice, however this
is something ive never played with before so unless its the "prefered"
choice of the forum, i'm not planning on going there!

Please throw a few pearls of your collective wisdom my way, anything you
have would be appreciated.

Cheers
 
A

Ashton

Bob Reynolds said:
To add something else into the mix, ANT seems a popular choice, however this
is something ive never played with before so unless its the "prefered"
choice of the forum, i'm not planning on going there!

I sincerely suggest using Ant. When I first started with J2EE, I put
together a few deployment packages by hand just to understnad what was
going on, but the thrill wore off really quickly. :)

Otherwise, try Chapter 8 of:
http://java.sun.com/j2ee/j2ee-1_4-fr-spec.pdf (or similar) for large
amounts of detail.
 
B

Brian Pipa

Ant. I can share my ant build script for my J2EE web-app (WAR file) if
you want to see it. It's very helpful to see some example scripts that
do what you are trying to do.

brian
 
O

Oscar Kind

Ashton said:
I sincerely suggest using Ant. When I first started with J2EE, I put
together a few deployment packages by hand just to understnad what was
going on, but the thrill wore off really quickly. :)

Otherwise, try Chapter 8 of:
http://java.sun.com/j2ee/j2ee-1_4-fr-spec.pdf (or similar) for large
amounts of detail.

I'd suggest both. First, read the specs so you know what Ant should do.
Strictly speaking you don't need it, but I found it very helpful to
know what I was doing, and why.

Then, read the manual for Ant. It's a simple tool that just packs
everything in the correct structures. This is also it's weakness, as you
must know what it must do. If you read the specs you do and using Ant
will be quite easy. That's also why it's the prefered choice of many
people on this forum.

Next, you may want to read the Ant manual some more so you can do both
automatic builds and deployments. You'll never want to do without.


Oscar
 

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