Ant support in GlassFish

During JavaOne I was told that people were asking if GlassFish has ant tasks support.  

The answer is YES, GlassFish provides an ant utility called "asant".  "asant" is a wrapper script that calls ant.  ant 1.6.5 is included in GlassFish V2.  Using "asant" will allow you to use the built-in ant tasks to administer/configure/deploy application to GlassFish Application Server. 

Following are the supported built-in ant tasks:

Following tasks are new in GlassFish V2:

asant is located in your <GlassFish-install-dir>/bin or <GlassFish-build-dir>/public/glassfish/bin.  It's in the same directory as asadmin.

Comments:

Hi, thanks for the post. Other questions I got sometimes is : If I need to use ant (and not asant) because my build system only knows about ant, what do I need to do to declare these optional tasks in my ant environment. Having a specific asant script is not the way to extend AT with optional tasks.

Posted by Ludo on June 01, 2007 at 03:53 AM PDT #

The JAR file that contains these Ant tasks is install/lib/sun-appserv-ant.jar.

asant just makes sure your environment is set up to use these tasks, but for a vanilla ant install, you just need an init target that defines the tasks in sun-appserv-ant.jar.

E.g. <target name="as-ant-init"> <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask"> <classpath path="install/lib/sun-appserv-ant.jar"/> </target>

Posted by Ian on June 26, 2007 at 05:04 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

janeyoung

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News
Blogroll

No bookmarks in folder