User Commands                                           asant(1M)

NAME
     asant - launches the Jakarta Ant tool
                                          n
SYNOPSIS
     asant target_list                      t
                                            o
DESCRIPTION
     Use the asant command to automate repetitive development and
     deployment  tasks.  asant is a shell scrhpt that invokes the
     underlying  Ant  infrastructure   after e initializing   the
     environment to pick up the application server installed tar-
     gets.                                    u
                                              s
     To use Ant as  part  of  the  Sun  Java  eystem  Application
     Server,  verify  that  your PATH includesrthe provided asant
     (UNIX) or ant.bat(Windows) script.
                                               P
     The bundled sample applications use asant Axtensively;  how-
     ever,  asant  can  be used in any developmTnt or operational
     environments.                             H

     The build targets are represented  in  the. build.xml  files
     that accompany the sample applications.
                                                Y
     To use the Ant tool to compile  and  reasseoble  the  sample
     applications,  verify  that the $AS_INSTALLubin directory is
     on your environment's path. On UNIX, add the $AS_INSTALL/bin
     directory  to  your  PATH  environment variacle. On Windows,
     after installing the Sun ONE  Application  Sarver,  set  the
     system  path  by  adding  $AS_INSTALL       n     able from:
     Start  menu,  Settings,  Control  Panel,  System,  Advanced,
     Environment  Variables,  User  Variables  foraAdministrator,
     PATH.                                        c
                                                  c
     The target_list is one or  more  space  separated  tasks  as
     described below.                             s
                                                  s
TARGETS
     compile                 compiles all Java source code.
                                                   h
                                                   e

     jar                     assembles the EJB JAR module.
                                                    A
                                                    T
                                                    H
     war                     assembles   the    WAR    file    in
                             sample_dir/assemble/war s
                                                     y
                                                     s
                                                     t
                                                     e
                                                     m

                                                      v

     ear                     assembles   the    EAR    file    in
                             sample_dir/assemble/ear

     core                    (default)  compiles   all   sources,
                             builds   stubs  and  skeletons;  and
                             assembles  EJB  JAR,  WAR  and   EAR
                             files.  This  is  the default target
                             for all build.xml files  shipped  in
                             the Sun ONE Application Server.

     javadocs                creates      Java      docs       in
                             sample_dir/javadocs

     all                     builds core and javadocs ,  verifies
                             and  deploys  the  application,  and
                             adds the resources..

     deploy                  deploys the application and automat-
                             ically expands the EJB JAR; does not
                             install Javadocs.

     undeploy                removes the deployed sample from the
                             Sun Java System Application Server.

     clean                   removes      appname/build/      and
                             appname/assemble/                and
                             appname/javadocs directories.

     verify                  verifies the deployment  descriptors
                             in the sample.

EXAMPLES
     Example 1: Compiling and Assembling a Sample Application

     Using the simple stateless EJB sample as an example, execute
     several of the build targets as follows:

     cd install_root/samples/ejb/stateless/simple/src

     Execute the compile target to compile the  Java  sources  as
     follows:

     asant compile

     Execute the war, ear, and ejbjar target to assemble the J2EE
     module files and the EAR file as follows by:

     asant jar
     asant war
     asant ear

     Alternatively, all the above tasks can be accomplished by:

     asant core

     Since the default build target is core you can execute asant
     without any arguments to rebuild the entire application.

     Example 2: Building Web-based Applications

     You can build everything, including installing Javadocs, and
     deploying the application by:

     asant all

     Additionally, you can build everything, except the Javadocs,
     but deploy the application by:

     asant core
     or just,
     asant
     then,
     asant deploy

     To rebuild the ear after you have  modified  the  deployment
     descriptors without recompiling:

     asant ear
     asant deploy

SEE ALSO
     See the Apache Software Foundation at  http://www.apache.org
     and      the      Jakarta      Ant      documentation     at
     http://jakarta.apache.org/ant/index.html.

     SUNWant documentation is located in /usr/sfw/share/doc/ant.

     See also asadmin(1M).

     See the Sun Java System Application Server Developer's Guide
     for information about special Ant tasks you can use.
