Java Reference
In-Depth Information
<manifest>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Built-By" value="${user.name}"/>
</manifest>
<webinf dir="${config.meta.inf.dir}"
includes="**/*.wsdl,**/*.xsd"/>
<lib file="${client.jar}" />
<classes dir="${build.dir}/classes"
excludes="**/ejb/**"/>
<fileset dir="${root.dir}/jsp" includes="*.jsp" />
</war>
</target>
<!-- DEPLOY TO GLASSFISH-->
<!-- Undeploy happens automatically on a new deploy so it
does not need to be called explicitly -->
<target name="deploy">
<echo message="Deploying ${war.name}"/>
<gf-deploy user="${gf.username}"
passwordfile="${gf.password.file}"
host="${gf.server.address}"
port="${gf.adminport}"
file="${build.dir}/${war.name}"
asinstalldir="${gf.root}"/>
<property name="artifact.deployed" value="true" />
</target>
</project>
This is a fairly standard build file, but it is useful to clarify the class names of the tasks that
are involved, and to illustrate a reasonable way to set up an Ant build. It is also worth noting
that this is about as simple as you can get in Ant. It cleans out temporary directories, generates
Java sources from schema, compiles the Java classes, and packages everything up in a WAR
with the WSDL and the schema. It then deploys the resulting WAR to Glassfish.
NOTE
If you are using Maven 2, you probably want to break up the build process illustrated here into sep-
arate modules. One idea, for example, is to create a module for the service, a module for supporting
required classes, a module for the generation of client-side artifacts, and a module for a client JAR if
you are doing those too. The client JAR can then depend on the JAR of the generated artifacts.
Search WWH ::




Custom Search