Learn MasterIngeJB through Ant + JBoss, deploy HelloWorld

zhaozj2021-02-17  69

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

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.

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.

A Directory with the Same Name Under "$ {jboss.home} / server" ->

Srcdir = "$ {src.ejb.dir}"

destdir = "$ {build.classes.dir}"

Debug = "on"

DepRecation = "OFF"

Optimize = "on"

Classpathref = "base.path"

>

SRCDIR = "$ {src.client.dir}"

destdir = "$ {build.classes.dir}"

Debug = "on"

DepRecation = "OFF"

Optimize = "on"

Classpathref = "base.path"

>

Jarfile = "$ {build.deploy.dir} /ejb-test.jar"

>

DIR = "$ {build.classes.dir}"

EXCLUDES = "* client. *"

>

DIR = "$ {resources} / ejb-jar"

INCLUDES = "meta-inf / **"

>

JARFILE = "$ {build.client.dir} /client-test.jar"

>

DIR = "$ {build.classes.dir}"

EXCLUDES = "* bean. *"

>

Jboss.xml

Hello

HelloHomeremote

ejb-jar.xml

Hello

HelloHome

Hello

HelloBean

stateless

Container

.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

# / server

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.

转载请注明原文地址:https://www.9cbs.com/read-31115.html

New Post(0)