Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

2. Developing a JAX-WS Web Service > Creating the deployment targets

Creating the deployment targets

We shall be deploying the web service to the Oracle GlassFish Server. A build file fragment may be used for specifying deployment targets. Create a deploy-targets.xml file in the config directory. Specify properties for the GlassFish Server directory, the build directory, the .war file directory, the build classes directory, and the GlassFish domain name. Create a "deploy" target to deploy the web service WAR file to the autodeploy directory of the GlassFish Server domain. Deploying to the GlassFish Server is essentially copying to the autodeploy directory. The deploy-targets.xml file is listed as follows:

<?xml version="1.0" encoding="UTF-8"?>
<project>
<property name="as.home" value="C:/glassfish3/glassfish"/>
<property name="build.home" value="${basedir}/build"/>
<property name="build.war.home" value="${build.home}/war"/>
<property name="build.classes.home" value="${build.home}/classes"/>
<property name="domain" value="domain1"/>
<target name="deploy">
<copy file="${build.war.home}/${ant.project.name}.war"
todir="${as.home}/domains/${domain}/autodeploy"/>
</target>
</project>

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial