The software you need:
Ant, J2SDK, J2EE.
My environment variable setting (I defined in user variables):
J2EE_HOME = f: /j2sdkee1.3.1 java_home = f: /j2sdk1.4.1_01 jboss_home = f: / jboss
PATH = .; f: /j2sdk1.4.1_01/bin; f: /j2sdkee1.3.1/bin; f: /ant1.5.2/bin
Classpath = .; f: /j2sdk1.4.1_01/lib/dt.jar; f: /j2sdk1.4.1_01/lib/tools.jar; f: /j2sdkee1.3.1/lib/j2ee.jar
The structure and file content of my template project are convenient for copy.
Build.xml
XML Version = "1.0"?>
Property "jboss.home" is not set. Please use the file
".nt.properties" in this directory $ {basedir} TO
Set this Property. It Must Point To The Directory Which
Contains The Following Directory: "Deploy", "conf", "TMP"
ETC.
lot>
target>
Property "jboss.home" is set but it does not see
TO POINT TO The Right Directory. The file "run.jar"
Must be available at $ {jboss.home} / bin.
lot>
target>
target>
target>
A Directory with the Same Name Under "$ {jboss.home} / server" ->
path>
Srcdir = "$ {src.ejb.dir}" destdir = "$ {build.classes.dir}" Debug = "on" DepRecation = "OFF" Optimize = "on" Classpathref = "base.path" > javac> SRCDIR = "$ {src.client.dir}" destdir = "$ {build.classes.dir}" Debug = "on" DepRecation = "OFF" Optimize = "on" Classpathref = "base.path" > javac> target> Jarfile = "$ {build.deploy.dir} /ejb-test.jar" > DIR = "$ {build.classes.dir}" EXCLUDES = "* client. *" > fileset> DIR = "$ {resources} / ejb-jar" INCLUDES = "meta-inf / **" > fileset> jar> JARFILE = "$ {build.client.dir} /client-test.jar" > DIR = "$ {build.classes.dir}" EXCLUDES = "* bean. *" > fileset> jar> target> fileset> copy> target> path> patchand> path> patchand> fileset> copy> target> target> provject> Jboss.xml XML Version = "1.0" encoding = "UTF-8"?> session> enterprise-beans> jboss> ejb-jar.xml session> enterprise-beans> ejb-jar> .nt.properties # Attention: this is an example file how to overwrite settings in this project # Please rename it to ".nt.properties" and adust the settings to your needs # Set the path to the runtime jboss Directory Containing The Jboss Application Server # Attention: The One Containing Director Like "BIN", "Client", "Server" ETC. Jboss.home = f: / jboss Ant.home = f: /nt1.5.2 # Set the configuration name what Must Have a Corresponding Directory Under # jboss.configuration = default Directory Structure: Resources / EJB-JAR / META-INF: Src / etc / bin: SRC / ETC / WEB-INF: Under Template: Remarks: 1. If you want to add Chinese comments in the .xml file, put EnCoding = "GB2312". 2. About Ant usage can be found in "Java Deep Adventures" 3. The meaning of the properties in the .xml file can be found: "MasterIngejb 2" 4. JBoss template http://sourceforge.net/project/showfiles.php?group_id=22866&release_id=1111135.