Sun Java System Application Server |
ant
by editing build.properties under user's home directory and by adding
the following properties.Property
Name |
Description |
Examples |
javaee.home | The installation directory of the Java EE 5 SDK | /home/username/glassfish |
javaee.server.name | Host name of the server where the Java EE 5 SDK is installed | localhost |
javaee.server.port | The port number for the server you chose while installing Java EE 5 SDK | 8080 |
javaee.server.username | The administrator username specified for the serve while installing Java EE 5 SDK | admin |
javaee.server.passwordfile | The
path to a file containing the admin
password for the Java EE 5 SDK. The password file needs to be in the
following format:
Where you will replace <javaeesdk-admin-password> with the admin password for the Java EE 5 SDK. |
/path/to/passwordfile |
javaee.adminserver.port | The port number for admin server you chose while installing the Java EE 5 SDK | 4848 |
check verify the build setup which is common for all modules
clean removes the generated directories like build and dist
compile compiles the project
create-javamail-resource creates javamail resource
create-jdbc-connection-pool creates jdbc connection pool
create-jdbc-resource creates jdbc resource
create-jms-connection creates jms connection
create-jms-resource creates jms resource
create-persistence-resource creates persistence resource
default compiles and packages the archive
delete-javamail-resource deletes javamail resource
delete-jdbc-connection-pool deletes jdbc connection pool
delete-jdbc-resource deletes jdbc resource
delete-jms-resource deletes jms resource
delete-persistence-resource deletes persistence resource
deploy deploys the application
keydel_common delete file-realm user
keygen_common create file-realm user
launch launches the application in a browser
listJmsDestinations lists jms destinations
package packages the archive
package-persistence-unit packages the archive
reconfig reconfigures the application server
run builds, packages and runs the application
runjavaclient run stand-alone java client
start-db starts the databse server.
stop-db stops the database server.
undeploy undeploys the application
-post-compile
-pre-clean
-pre-compile
-pre-deploy
-pre-setup
<?xml version="1.0" encoding="UTF-8"?>
<project name="duke-stateful-ear" default="ear" basedir=".">
<property name="is.ear.module" value="true"/>
<path id="ear-components">
<filelist dir="./duke-stateful-ejb" files="build.xml"/>
<filelist dir="./duke-stateful-appclient" files="build.xml"/>
<filelist dir="./test" files="build.xml"/>
</path>
<import file="../../bp-project/main.xml"/>
<target name="all" depends="ear,deploy,client-stubs">
<antcall target="run"/>
</target>
<target name="run">
<subant target="run-app-client">
<fileset dir="duke-stateful-appclient" includes="build.xml"/>
</subant>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project name="hello-stateless-ejb" default="default" basedir=".">
<property name="is.ejb-jar.module" value="true"/>
<import file="../../bp-project/main.xml"/>
<target name="all" depends="default,deploy">
<subant target="default">
<fileset dir="test" includes="build.xml"/>
</subant>
<antcall target="run"/>
</target>
<target name="run">
<subant target="runtest">
<fileset dir="test" includes="build.xml"/>
</subant>
</target>
</project>
<?xml version="1.0"
encoding="UTF-8"
?>
<project name="bp-web-project" default="default"
basedir=".">
<property name="is.war.module"
value="true"/>
<import
file="bp-project/main.xml"/>
</project>
<?xml version="1.0"
encoding="UTF-8"
?>
<project name="hello-pu" default="default" basedir=".">
<description>Builds,
tests, and runs the project hello-pu.</description>
<property name="is.jar.module"
value="true"/>
<property
name="is.persistence-unit.module" value="true"/>
<import
file="../../setup/main.xml"/>
</project>
<?xml version="1.0"
encoding="UTF-8"?>
<project name="hello-servlet" default="default"
basedir=".">
<property name="is.war.module"
value="true"/>
<!-- This project is dependent on
the hello-pu project so it is declaring a dependency -->
<property name="hello-pu.home"
value="${home.dir}/../hello-pu"/>
<!-- extra.classpath property adds to the
classpath used for compilation -->
<property name="extra.classpath"
value="${hello-pu.home}/dist/hello-pu.jar"/>
<!-- include the persistence unit in the
Web-app -->
<target name="-post-compile"
depends="init">
<copy
file="${hello-pu.home}/dist/hello-pu.jar"
todir="${build.dir}/web/WEB-INF/lib"/>
</target>
<!-- Note that
this project is sharing the build system with other projects -->
<import
file="../../bp-project/main.xml"/>
</project>
<?xml version="1.0"?>
<project name="bp-slider-navigator" default="default"
basedir=".">
<property name="is.war.module" value="true"/>
<import
file="../../../bp-project/main.xml"/>
<property name="project.ui"
value="../../../components/ui"/>
<property name="reference.ui.jar"
value="${project.ui}/dist/ui.jar"/>
<target name="-pre-compile" depends="init">
<copy
file="${reference.ui.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
</target>
</project>
Copyright © 2006 Sun Microsystems, Inc. All rights reserved.