Java Reference
In-Depth Information
Example 23.7 An Ant target for checking out source from CVS
<?xml version="1.0"?>
<!-- ++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- retrieve our sources by tag name -->
<!-- invoke with: ant -DTAG=puttaghere -->
<!-- ++++++++++++++++++++++++++++++++++++++++++++++ -->
<project name="sources" default="src" basedir=".">
<!-- src target -->
<target name="src">
<cvs cvsRoot=":ext:user@hostaddress:/usr/lib/cvs/cvsroot"
cvsRsh="/usr/bin/ssh"
package="projectdir/subproj"
dest="srctree"
tag="${TAG}">
</cvs>
</target>
</project>
Our example (see the topic's Web site 3 for the full listing) only copies
prebuilt XML files (the deployment descriptors) into place to be included in
the JAR, WAR, and EAR files. For small examples like ours, building the de-
ployment descriptors by hand is not a difficult task. But larger, more complex
projects will benefit from further automation. Most J2EE servers come with
tools to help build such things. These tools tend to be specific to the particulars
of their products. Since the J2EE specification allows for certain vendor varia-
tions and configuration differences, they can be helpful in configuring things
for your specific vendor's version. But being dependent on them for your de-
ployment is a subtle way to become locked into their product. Another good
choice—one that avoids this vendor lock-in—is the Open Source tool XDoclet.
23.4.2
XDoclet is an important tool to help with the automation of EJB-related tasks.
Working in conjunction with Ant, it uses the Javadoc mechanism of Java to
XDoclet
3. http://www.javalinuxbook.com/
Search WWH ::




Custom Search