Chapter 5. Ant Tasks

Table of Contents

5.1. Overview
5.2. Setup Ant Task
5.2.1. create-domain
5.3. Server Control Ant Task
5.3.1. boot
5.3.2. down
5.3.3. Execution
5.4. EJB Ant Task
5.4.1. appcompiler
5.4.2. ejbddinit
5.5. Web Service Ant Task
5.5.1. java2wsdl
5.5.2. wsdl2java
5.5.3. wsgen
5.5.4. wsimport
5.5.5. xjc
5.5.6. schemagen
5.6. Web Service Maven Plugin
5.6.1. wsgen
5.6.2. wsimport
5.7. Executing jeusadmin Commands
5.8. Maven Plugin
5.8.1. Installation
5.8.2. Maven Plugin Goals

This chapter describes Ant Tasks.

JEUS provides the following Ant tasks to automatize jobs for application development. The user must create buildfiles, which describe the tasks performed by Ant.

This section describes the contents of the buildfiles of each function and how to execute each Ant task using buildfiles. For more information about Ant configuration and its usage, refer to http://ant.apache.org .

Buildfile: build.xml

build.xml is an XML type Ant buildfile that describes Ant tasks. Important parts of the buildfile are included inside the <project> element, and multiple <target> elements generally exist in a project. The <target> element defines an Ant task to be executed.

In order to use an Ant task provided by JEUS, add the following task definition to the build.xml file.

<taskdef resource="jeus/util/ant/jeusant.properties">
    <classpath>
        <path refid="jeus.libraries"/>
    </classpath>
</taskdef>

Project properties are defined in the <project> element, and attribute values can be used through expressions like ${property-name}.

Caution

When using the Ant task provided by JEUS, specifying "jeus.home" in the project of a buildfile is recommended. This is because a target running in a project may require the JEUS_HOME directory information.

JEUS_HOME is a static final variable that fixes its value to the initial value specified in a single JVM. However, if a target that does not require JEUS_HOME information is executed first, JEUS_HOME is set to null. A target that requires JEUS_HOME information uses the value specified by the previously executed target, which can cause the program to run incorrectly.

This section describes the Ant tasks used to organize the JEUS environment.

The create-domain Ant task can create a new domain environment.

The task is defined in the build.xml file in the JEUS_HOME/setup directory. The following file contains the basic configuration.

JEUS_HOME/setup/domain-config-template.properties

The following describes the create-domain task properties.


Example

The following is an example of creating a domain using the Ant task.

In the example, the domain name is set to domain1, the DAS name is set to 'adminServer', and DAS JVM is set to '-Xmx512m -XX:MaxPermSize=256m'. Although each property already has a default value, this example provides values to show how to set them.

JEUS_HOME/setup$ ant create-domain -Ddomain=domain1 -Dservername=adminServer 
-Djvm.config="-Xmx512m -XX:MaxPermSize=256m" -Dheartbeataddress=230.30.1.1 
-Dheartbeatport=3030
Buildfile: JEUS_HOME/setup/build.xml

create-domain:
     [echo] Creating a domain configuration: domaindir="JEUS_HOME/domains/domain1 
domain = domain1, server-name = adminServer, admin password={base64}amV1cw==, 
server base port=9736, server base listen address=${jeus.address}
    [mkdir] Created dir: JEUS_HOME/domains/domain1
    [mkdir] Created dir: JEUS_HOME/domains/domain1/.applications
    [mkdir] Created dir: JEUS_HOME/domains/domain1/bin
    [mkdir] Created dir: JEUS_HOME/domains/domain1/config
    [mkdir] Created dir: JEUS_HOME/domains/domain1/data
    [mkdir] Created dir: JEUS_HOME/domains/domain1/lib
    [mkdir] Created dir: JEUS_HOME/domains/domain1/lib/application
    [mkdir] Created dir: JEUS_HOME/domains/domain1/servers
    [mkdir] Created dir: JEUS_HOME/domains/domain1/config/servlet
    [mkdir] Created dir: JEUS_HOME/domains/domain1/config/security
     [copy] Copying 1 file to JEUS_HOME/domains/domain1/config
     [copy] Copying 2 files to JEUS_HOME/domains/domain1/config/servlet
     [copy] Copying 1 file to JEUS_HOME/domains/domain1/config/security
     [copy] Copied 1 empty directory to 1 empty directory under JEUS_HOME/domains/domain1/config/security
     [copy] Copying 3 files to JEUS_HOME/domains/domain1/config/security
     [java] heart beat address has been set : 230.30.1.1
     [java] heart beat port has been set : 3030
     [copy] Copying 3 files to JEUS_HOME/domains/domain1/bin
    [mkdir] Created dir: JEUS_HOME/domains/domain1/servers/adminServer
    [mkdir] Created dir: JEUS_HOME/domains/domain1/servers/adminServer/bin
    [mkdir] Created dir: JEUS_HOME/domains/domain1/servers/adminServer/.workspace
    [mkdir] Created dir: JEUS_HOME/domains/domain1/servers/adminServer/.workspace/deployed
    [mkdir] Created dir: JEUS_HOME/domains/domain1/servers/adminServer/logs
    [mkdir] Created dir: JEUS_HOME/domains/domain1/servers/adminServer/lib
    [mkdir] Created dir: JEUS_HOME/domains/domain1/servers/adminServer/lib/application

BUILD SUCCESSFUL
Total time: 6 seconds
JEUS_HOME/setup$ 

This section describes the Ant tasks that control the server.

This section shows an example of the build.xml file and how to execute JEUS boot/down through build.xml.

build.xml example

The following is an example of a build.xml file that starts/shuts down 'adminServer', DAS, in domain1.

[Example 5.1] boot & down Ant task build file example

<?xml version="1.0"?>

<project name="example" default="boot" basedir=".">
  <property environment="env"/>
  <!-- jeus.home project property is required
       when you run the various tasks in an ant jvm and
       one of the various tasks requirs JEUS_HOME information -->
  <property name="jeus.home" value="${env.JEUS_HOME}"/>

  <!-- set properties to be needed for boot & down task -->
  <property name="domain.name" value="domain1"/>
  <property name="server.name" value="adminServer"/>
  <property name="das.url" value=""/>
  <property name="force" value="false"/>
  <property name="standby" value="false"/>
  <property name="host" value="192.168.34.66"/>
  <property name="port" value="7736"/>
  <property name="connect.type" value="plain"/>
  <property name="truststore.path" value=""/>
  <property name="truststore.password" value=""/>
  <property name="username" value="administrator"/>
  <property name="password" value="jeusadmin"/>
  <property name="isAdminServer" value="false"/>

  <!-- set the library-classpath or to run the task class -->
  <path id="jeus.libraries">
    <fileset dir="${jeus.home}/lib/system" includes="*.jar"/>
  </path>

  <!-- include the task definition resource file -->
  <taskdef resource="jeus/util/ant/jeusant.properties">
    <classpath>
      <path refid="jeus.libraries"/>
    </classpath>
  </taskdef>

  <target name="init">
  </target>

  <!-- boot task -->
  <target name="boot" depends="init">
    <boot domainName="${domain.name}"
          serverName="${server.name}"
          host="${host}"
          port="${port}"
          connectionType="${connect.type}"
          truststorePath="${truststore.path}"
          truststorePassword="${truststore.password}"
          adminServer="${isAdminServer}"
          dasUrl="${das.url}"
          force="${force}"
          standby="${standby}"
          username="${username}"
          password="${password}"/>
	</target>

  <!-- down task -->
  <target name="down" depends="init">
    <down domainName="${domain.name}"
          serverName="${server.name}"
          host="${host}"
          port="${port}"
          connectionType="${connect.type}"
          truststorePath="${truststore.path}"
          truststorePassword="${truststore.password}"
          username="${username}"
          password="${password}"/>
	</target>

</project>


Execution example

To start a server through Ant, node manager must run through the 'startNodeManager' script. If the boot command is executed, the server is started. If the down command is executed, the server is terminated.

  • boot

    c:\jeus>ant boot
    Buildfile: build.xml
    
    init:
    
    boot:
         [boot] Succeed to start server [adminServer]
    
    BUILD SUCCESSFUL
    Total time: 11 seconds
  • down

    c:\jeus>ant down
    Buildfile: build.xml
    
    init:
    
    down:
         [down] Succeed to stop server [adminServer]
    
    BUILD SUCCESSFUL
    Total time: 0 seconds

Several Ant tasks are provided for developing EJB components based on JEUS.

The appcompiler Ant task is used to create a RMI stub and skeleton classes required by the EJB module and individual EJB beans after the pre-deployment process. The Ant task can create EJB client JAR files, which are required for clients to communicate with beans deployed to a remote host.

The following describes appcompiler task properties.


Example

This following is an example of a build.xml file that executes the appcompiler.

The ejbddinit Ant Task is used to create the JEUS EJB Deployment Descriptor (DD) for EJB applications. For more information about ejbddinit, refer to "4.4. ejbddinit".

The following describes the ejbddinit Ant task properties.


The ejbddinit property files can be set in the ejbddinit Ant script.

The properties of the ejbddinit property files must be set according to the following rules of the ejbddinit Ant script. For more information about ejbddinit properties, refer to Section 4.4, “List of properties”.


Like the ejbddinit property file, the '%{ejb-class}' expression can be used to set the export-name property of an Ant script. For more information about the expression for setting export-name, refer to Section 4.4, “Supported patterns for the export-name property”.

An Ant script cannot set ejbddinit properties for a specific EJB component. To set ejbddinit properties for a specific EJB component, write a separate ejbddinit property file. A configuration for a specific EJB component has a higher priority than common configurations in ejbddinit property files and Ant scripts. If ejbddinit property files and ejbddinit Ant scripts have the same configurations, the configuration in the Ant scripts is given higher priority.

Example

The following is an example of writing and executing an ejbddinit Ant script.

This section describes the Ant tasks provided by JEUS for creating Web services and for web service clients.

The java2wsdl task creates the following from service endpoint interface classes (and classes implemented as Java).

  • WSDL file for web services

  • JAX-RPC mapping file

Note

The name of the class that defines the java2wsdl Ant task is 'jeus.util.ant.webservices.Java2WsdlTask'.

The following describes the java2wsdl properties.


Nested Element

<java2wsdl> contains the <classpath> element of Ant.

Example

The following is an example of a build.xml that executes java2wsdl.

The wsdl2java task creates one of the following WSDL of a web service.

  • Java program stubs for web service clients

  • Java program interfaces for web service servers

Note

The 'jeus.util.ant.webservices.Wsdl2JavaTask' class defines the wsdl2java Ant task.

The following describes the wsdl2java properties.

[Table 5.8] wsdl2java Task properties

PropertyDescription
wsdlAbsolute path or URL to the WSDL file used to create Java source files. (Required option, String type)
mode

Mode used to create Java source files. (Required option, String type)

Input options:

  • gen:client

  • gen:server

  • gen

  • import:client

  • import:server

  • import

destDir

Absolute path to the directory in which Java files are created.

(Required option, String type)

classDestDirDirectory in which compiled class files are created. (String type)
inputMappingInput JAX-RPC mapping file used to create Java classes. (String type)
package

Java package name for all namespace URIs in WSDL. (String type)

outputMappingOutput JAX-RPC mapping file for input WSDL. (String type)
doCompileOption to compile the created Java source files. (Default value: true)
usernameUsername required to access the URL of WSDL. (String type)
passwordPassword required to access the URL of WSDL. (String type)
keepSrcSaves created Java source files. (Default value: true)
nowrapped

Option to disable the wrapped mode detection for WSDL. (Default value: false)

dataHandlerOnly

Option to apply javax.activation.DataHandler to the MIME type. (Default value: false)

nodatabinding

Option to apply javax.xml.soap.SOAPElement to all WSDL message parts. (Default value: false)

soapver

SOAP version used in stub/tie classes.

  • 11: SOAP 1.1 (Default)

  • 12: SOAP 1.2

resolveDirLocal storage for remote WSDL files. (String type)
DDGenOption to create a basic deployment descriptor for JEUS (webservices.xml file, web.xml when MODE is web, and ejb-jar.xml file when MODE is ejb). (String type)
levelLogging level. (String type)
verboseDisplays verbose messages. (Default value: false)

Nested Element

<wsdl2java> has the <classpath> and <mapping> elements of a nested Ant. The following is the structure of the <wsdl2java> Ant task. ( + means the Ant task can have more than one element.)


<mapping>

Mapping is performed between a Java package and a WSDL namespace. If the <mapping> element is omitted, all namespace URIs are mapped to the package specified by the package property of the <wsdl2java> element.

The following describes the <mapping> properties.


Note

If the package property is specified in the <wsdl2java> element, this value has a higher priority than the <mapping> element value.

Example

The following is an example of a build.xml that executes wsdl2java.

The wsgen task creates the following from service endpoint interface classes and classes implemented in Java.

  • Portable Artifacts

  • Web service WSDL file (option)

Note

The 'jeus.webservices.jaxws.tools.WsGen2' class defines the wsgen Ant task.

The following describes the wsgen properties.


Example

The following is an example of a build.xml that executes wsgen.

The wsimport task creates one of the following from the web service WSDL.

  • Java program stubs for web service clients.

  • Java program interfaces for web service servers.

Note

The 'jeus.webservices.jaxws.tools.WsImport2' class defines the wsimport Ant task.

The following describes the wsimport properties.


Example

The following is an example of a build.xml that executes wsimport.

The xjc task converts XML schema files to JAXB content classes in Java language.

The following describes the xjc properties.


Example

The following is an example of a build.xml that executes xjc.

This section describes the Maven Plugin, which is provided for web service clients, and how to create JAX-WS based web services.

The wsgen plugin creates the following from the service endpoint interface classes and Java classes.

  • Portable Artifacts

  • WSDL file of web services (option)

Note

The wsgen plugin is in the JEUS_HOME/lib/client/jeus-ws-maven-plugin.jar file. Before using the wsgen plugin, the following must be performed.

1. Install the jeus-ws-maven-plugin.jar file on a local repository.

2. Add '-Djava.endorsed.dirs=$JEUS_HOME/lib/endorsed' to the Maven option in a JDK 1.6 environment.

The following describes the wsgen plugin properties.


Example

The following is an example of a pom.xml that executes the wsgen plugin.

The wsimport plugin creates one of the following from web service WSDL files.

  • Web service Java source code stubs for clients

  • Web service interface Java source code for servers

Note

The wsgen plugin is in the JEUS_HOME/lib/client/jeus-ws-maven-plugin.jar file. Before using the wsgen plugin, the following must be performed.

1. Install the jeus-ws-maven-plugin.jar file on a local repository.

2. Add '-Djava.endorsed.dirs=$JEUS_HOME/lib/endorsed' to the Maven option in a JDK 1.6 environment.

The following describes the wsimport plugin properties.


Example

The following is an example of a pom.xml that executes the wsimport plugin.

This section describes how to edit an Ant build file (usually build.xml) to execute jeusadmin commands. This section also uses examples to describe how to create Ant targets.

Example

The following example shows how to execute the server-info command using Ant.

<project name="check-server-state-example" default="check-server-state">
    <property environment="env"/>
    <property name="jeus.home" value="${env.JEUS_HOME}"/>
    <property name="jeus.home.bin" value="${jeus.home}/bin"/>
    <property name="unix.jeusadmin" value="${jeus.home.bin}/jeusadmin"/>
    <property name="windows.jeusadmin" value="${jeus.home.bin}/jeusadmin.cmd"/>
    <property name="jeusadmin.args" value="-u jeus -p jeus -host localhost -port 9736 -verbose"/>
    <property name="server.name" value="adminServer"/>
    <property name="cmd.target" value="server-info -server ${server.name} -state"/>
    
    <condition property="isWindows">
        <os family="windows"/>
    </condition>
    <condition property="isUnix">
        <os family="unix"/>
    </condition>

    <target name="check-server-state">
        <antcall target="check-server-state-unix"/>
        <antcall target="check-server-state-windows"/>
    </target>

    <target name="check-server-state-windows" if="isWindows">
        <echo>${windows.jeusadmin} ${jeusadmin.args} ${cmd.target}</echo>
        <exec executable="${windows.jeusadmin}" osfamily="windows" spawn="false" 
              failonerror="true">
            <arg line="${jeusadmin.args}"/>
            <arg value="${cmd.target}"/>
        </exec>
    </target>

    <target name="check-server-state-unix" if="isUnix">
        <echo>${unix.jeusadmin} ${jeusadmin.args} ${cmd.target}</echo>
        <exec executable="${unix.jeusadmin}" osfamily="unix" spawn="false" 
              failonerror="true">
            <arg line="${jeusadmin.args}"/>
            <arg value="${cmd.target}"/>
        </exec>
    </target>
</project>

The following is the result on UNIX.

user1@host1:~/jeus/bin$jant check-server-state
Buildfile: /home/user1/jeus/bin/build.xml

check-server-state:

check-server-state-unix:
     [echo] /home/user/workspace/jeus7/jeus7/target/jeus/bin/jeusadmin -u jeus -p jeus -host localhost -port 9736 -verbose server-info -server adminServer -state
     [exec] Verbose output is enabled.
     [exec] Attempting to connect to localhost:9736.
     [exec] The connection has been established to Domain Administration Server adminServer in the domain domain1.
     [exec] RUNNING
     [exec] 

check-server-state-windows:

BUILD SUCCESSFUL
Total time: 1 second
user1@host1:~/jeus/bin$

This section describes the JEUS Maven plugin. If the JEUS Maven plugin is used, Apache Maven can be used to start JEUS servers or to distribute applications.

The following are the goals provided by the JEUS Maven plugin.

Starts DAS (start-das). Internally, this executes the script under the JEUS_HOME/bin directory.

  • Name

    jeus.tool:jeus-maven-plugin:start-das

  • Parameter

    The user, password, and filename parameters are optional. However, either the user/password or filename is required.

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Host address of DAS. (Required)

    portjeus.server.portjava.lang.IntegerHost address of DAS. (Required)
    userjeus.user.namejava.lang.StringJEUS user name.
    passwordjeus.user.passwordjava.lang.StringJEUS user password.
    domainjeus.domain.namejava.lang.String

    Domain name to which DAS belongs. (Required)

    serverjeus.server.namejava.lang.StringDAS name. (Required)
    filenamejeus.auth.filejava.lang.StringAccount information file used for JEUS authentication. Same as the f option provided by the startDomainAdminServer script.
    waitingTimejeus.boot.timeoutjava.lang.IntegerAfter starting JEUS, the plugin waits for a specified period of time to check if the server started normally, which determines whether the goal executed successfully. This parameter specifies the wait time. (Unit: sec, Default value: 10 sec)
    cachelogin

    jeus.server.start. cachelogin

    booleanOption to save the authentication information used to start JEUS. (Default: false)
    force

    jeus.server.start. forced

    booleanForces the server to boot even if all configured applications are not in the RUNNING state. (Default: false)
    rolling

    jeus.server.start. rolling

    boolean

    Option to use the Rolling patch function. (Default: false)

    verbose

    jeus.server.start. verbose

    boolean

    Option to use the verbose function. (Default: false)

    standby

    jeus.server.start. standby

    boolean

    Option to use Standby booting. (Default: false)

  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml.

    <!-- JEUS Maven Plugin - start-das -->
    <plugin>
        <groupId>jeus.tool</groupId>
        <artifactId>jeus-maven-plugin</artifactId>
        <version>7.0.0.2</version>
        <configuration>
          <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
        <domain>domain1</domain>
        <server>adminServer</server>
      </configuration>
    </plugin>

    The following is the result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:start-das
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:start-das (default-cli) @ maven-sample ---
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 11.414s
    [INFO] Finished at: Mon Feb 17 16:16:39 KST 2014
    [INFO] Final Memory: 2M/61M
    [INFO] ------------------------------------------------------------------------
    

Starts MS. Internally, this executes the script under the JEUS_HOME/bin directory.

  • Name

    jeus.tool:jeus-maven-plugin:start-ms
  • Parameter

    The user, password, and filename parameters are optional. However, either the user/password or filename is required.

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Host address of DAS. (Required)

    portjeus.server.portjava.lang.IntegerHost address of DAS. (Required)
    userjeus.user.namejava.lang.StringJEUS user name.
    passwordjeus.user.passwordjava.lang.StringJEUS user password.
    domainjeus.domain.namejava.lang.String

    Domain name to which DAS belongs. (Required)

    serverjeus.server.namejava.lang.StringDAS name. (Required)
    filenamejeus.auth.filejava.lang.StringAccount information file used for JEUS authentication. Same as the f option provided by the startDomainAdminServer script.
    waitingTimejeus.boot.timeoutjava.lang.IntegerAfter starting JEUS, the plugin waits for a specified period of time to check if the server started normally, which determines whether the goal executed successfully. This parameter specifies the wait time. (Unit: sec, Default value: 10 sec)
    cachelogin

    jeus.server.start. cachelogin

    booleanOption to save the authentication information used to start JEUS. (Default: false)
    force

    jeus.server.start. forced

    booleanForces the server to boot even if all configured applications are not in the RUNNING state. (Default: false)
    rolling

    jeus.server.start. rolling

    boolean

    Option to use the Rolling patch function. (Default: false)

    verbose

    jeus.server.start. verbose

    booleanOption to use the verbose function. (Default: false)
    standby

    jeus.server.start. standby

    boolean

    Option to use Standby booting. (Default: false)

    dasurljeus.server.start. dasurljava.lang.StringDAS URL, which manages the domain to which MS belongs. (Required)
  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml.

    <!-- JEUS Maven Plugin - start-ms -->
    <plugin>
      <groupId>jeus.tool</groupId>
      <artifactId>jeus-maven-plugin</artifactId>
      <version>7.0.0.2</version>
      <configuration>
        <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
        <domain>domain1</domain>
        <server>server1</server>
        <dasurl>localhost:9736</dasurl>
      </configuration>
    </plugin>

    The following is the result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:start-ms
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:start-ms (default-cli) @ maven-sample ---
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 11.161s
    [INFO] Finished at: Mon Feb 17 16:36:16 KST 2014
    [INFO] Final Memory: 2M/61M
    [INFO] ------------------------------------------------------------------------

Terminates a connected server. Internally, this goal executes the local-shutdown command by using the one-step execution function provided by the console tool (jeusadmin).

  • Name

    jeus.tool:jeus-maven-plugin:stop-jeus

  • Parameter

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Server address to access jeusadmin. (Required)

    portjeus.server.portjava.lang.IntegerServer port number to access jeusadmin. (Default: 9736) (Required)
    userjeus.user.namejava.lang.String

    JEUS user name. (Required)

    passwordjeus.user.passwordjava.lang.String

    JEUS user password. (Required)

    argsNonejava.util.ListArgument values passed when executing the command. If both arg and args are used, arg has higher priority. This parameter is recommended for use in the pom.xml file.
    arg

    jeus.jeusadmin. command.arguments

    java.lang.StringArgument value passed when executing the command. If both arg and args are used, arg has higher priority.
  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml.

    <!-- JEUS Maven Plugin - stop-jeus -->
    <plugin>
      <groupId>jeus.tool</groupId>
      <artifactId>jeus-maven-plugin</artifactId>
      <version>7.0.0.2</version>
      <configuration>
        <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
      </configuration>
    </plugin>

    The following is the general result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:stop-jeus
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:stop-jeus (default-cli) @ maven-sample ---
    [INFO] jeus.home = /home/user/jeus
    [INFO] jeusadmin.path = /home/user/jeus/bin/jeusadmin
    [INFO] jeusadmin.one-step-execution-command = [local-shutdown]
    [INFO] Attempting to connect to localhost:9736.
    [INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
    [INFO] The server [adminServer] has been shut down successfully.
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.690s
    [INFO] Finished at: Mon Feb 17 17:19:10 KST 2014
    [INFO] Final Memory: 2M/61M
    [INFO] ------------------------------------------------------------------------
    

Deploys the application. Internally, this goal executes the deploy-application command by using the one-step execution function provided by the console tool (jeusadmin).

  • Name

    jeus.tool:jeus-maven-plugin:deploy

  • Parameter

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Server address to access jeusadmin. (Required)

    portjeus.server.portjava.lang.IntegerServer port number to access jeusadmin. (Default: 9736) (Required)
    userjeus.user.namejava.lang.String

    JEUS user name. (Required)

    passwordjeus.user.passwordjava.lang.String

    JEUS user password. (Required)

    argsNonejava.util.ListArgument values passed when executing the command. If both arg and args are used, arg has higher priority. This parameter is recommended for use in the pom.xml file.
    arg

    jeus.jeusadmin. command.arguments

    java.lang.StringArgument value passed when executing the command. If both arg and args are used, arg has higher priority.
  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml.

    <!-- JEUS Maven Plugin - deploy -->
    <plugin>
      <groupId>jeus.tool</groupId>
      <artifactId>jeus-maven-plugin</artifactId>
      <version>7.0.0.2</version>
      <configuration>
        <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
        <args>
          <param>SampleApp</param>
          <param>-servers SampleApp</param>
        </args>
      </configuration>
    </plugin>

    The following is the general result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:deploy
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:deploy (default-cli) @ maven-sample ---
    [INFO] jeus.home = /home/user/jeus
    [INFO] jeusadmin.path = /home/user/jeus/bin/jeusadmin
    [INFO] jeusadmin.one-step-execution-command = [deploy-application SampleApp -servers adminServer ]
    [INFO] Attempting to connect to localhost:9736.
    [INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
    [INFO] deploy the application for the application [SampleApp] succeeded.
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.116s
    [INFO] Finished at: Mon Feb 17 16:50:32 KST 2014
    [INFO] Final Memory: 2M/61M
    [INFO] ------------------------------------------------------------------------
    

Undeploys a deployed application. Internally, this goal executes the undeploy-application command by using the one-step execution function provided by the console tool (jeusadmin).

  • Name

    jeus.tool:jeus-maven-plugin:undeploy

  • Parameter

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Server address to access jeusadmin. (Required)

    portjeus.server.portjava.lang.Integer

    Server port number to access jeusadmin. (Default: 9736) (Required)

    userjeus.user.namejava.lang.StringJEUS user name. (Required)
    passwordjeus.user.passwordjava.lang.String

    JEUS user password. (Required)

    argsNonejava.util.ListArgument values passed when executing the command. If both arg and args are used, arg has higher priority. This parameter is recommended for use in the pom.xml file.
    arg

    jeus.jeusadmin. command.arguments

    java.lang.StringArgument value passed when executing the command. If both arg and args are used, arg has higher priority.
  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml.

    <!-- JEUS Maven Plugin - undeploy -->
    <plugin>
      <groupId>jeus.tool</groupId>
      <artifactId>jeus-maven-plugin</artifactId>
      <version>7.0.0.2</version>
      <configuration>
        <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
        <args>
          <param>SampleApp</param>
        </args>
      </configuration>
    </plugin>

    The following is the general result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:undeploy
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:undeploy (default-cli) @ maven-sample ---
    [INFO] jeus.home = /home/user/jeus
    [INFO] jeusadmin.path = /home/user/jeus/bin/jeusadmin
    [INFO] jeusadmin.one-step-execution-command = [undeploy-application SampleApp ]
    [INFO] Attempting to connect to localhost:9736.
    [INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
    [INFO] Undeploying [SampleApp] (This may take time due to graceful undeployment) ..........
    [INFO] undeploy the application for the application [SampleApp] succeeded.
    [INFO] successfully undeployed (elapsed = 147ms)
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.814s
    [INFO] Finished at: Mon Feb 17 17:06:40 KST 2014
    [INFO] Final Memory: 2M/61M
    [INFO] ------------------------------------------------------------------------
    

Starts the service of the deployed application. Internally, this goal executes the start-application command by using the one-step execution function provided by the console tool (jeusadmin).

  • Name

    jeus.tool:jeus-maven-plugin:start-app

  • Parameter

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Server address to access jeusadmin. (Required)

    portjeus.server.portjava.lang.IntegerServer port number to access jeusadmin. (Default: 9736) (Required)
    userjeus.user.namejava.lang.StringJEUS user name. (Required)
    passwordjeus.user.passwordjava.lang.String

    JEUS user password. (Required)

    argsNonejava.util.ListArgument values passed when executing the command. If both arg and args are used, arg has higher priority. This parameter is recommended for use in the pom.xml file.
    arg

    jeus.jeusadmin. command.arguments

    java.lang.StringArgument value passed when executing the command. If both arg and args are used, arg has higher priority.
  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml.

    <!-- JEUS Maven Plugin - start-app -->
    <plugin>
      <groupId>jeus.tool</groupId>
      <artifactId>jeus-maven-plugin</artifactId>
      <version>7.0.0.2</version>
      <configuration>
        <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
        <args>
          <param>SampleApp</param>
        </args>
      </configuration>
    </plugin>

    The following is the general result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:start-app
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:start-app (default-cli) @ maven-sample ---
    [INFO] jeus.home = /home/user/jeus
    [INFO] jeusadmin.path = /home/user/jeus/bin/jeusadmin
    [INFO] jeusadmin.one-step-execution-command = [start-application SampleApp ]
    [INFO] Attempting to connect to localhost:9736.
    [INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
    [INFO] start the application for the application [SampleApp] succeeded.
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.678s
    [INFO] Finished at: Mon Feb 17 17:14:07 KST 2014
    [INFO] Final Memory: 2M/61M
    [INFO] ------------------------------------------------------------------------
    

Suspends the service of the running application. Internally, this goal executes the stop-application command by using the one-step execution function provided by the console tool (jeusadmin).

  • Name

    jeus.tool:jeus-maven-plugin:stop-app

  • Parameter

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Server address to access jeusadmin. (Required)

    portjeus.server.portjava.lang.IntegerServer port number to access jeusadmin. (Default: 9736) (Required)
    userjeus.user.namejava.lang.StringJEUS user name. (Required)
    passwordjeus.user.passwordjava.lang.String

    JEUS user password. (Required)

    argsNonejava.util.ListArgument values passed when executing the command. If both arg and args are used, arg has higher priority. This parameter is recommended for use in the pom.xml file.
    arg

    jeus.jeusadmin. command.arguments

    java.lang.StringArgument value passed when executing the command. If both arg and args are used, arg has higher priority.
  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml.

    <!-- JEUS Maven Plugin - stop-app -->
    <plugin>
      <groupId>jeus.tool</groupId>
      <artifactId>jeus-maven-plugin</artifactId>
      <version>7.0.0.2</version>
      <configuration>
        <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
        <args>
          <param>SampleApp</param>
        </args>
      </configuration>
    </plugin>

    The following is the general result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:stop-app
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:stop-app (default-cli) @ maven-sample ---
    [INFO] jeus.home = /home/user/jeus
    [INFO] jeusadmin.path = /home/user/jeus/bin/jeusadmin
    [INFO] jeusadmin.one-step-execution-command = [stop-application SampleApp ]
    [INFO] Attempting to connect to localhost:9736.
    [INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
    [INFO] stop the application for the application [SampleApp] succeeded.
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.635s
    [INFO] Finished at: Mon Feb 17 17:16:48 KST 2014
    [INFO] Final Memory: 2M/61M
    [INFO] ------------------------------------------------------------------------
    

Installs an application on DAS. Internally, this goal executes the install-application command by using the one-step execution function provided by the console tool (jeusadmin).

  • Name

    jeus.tool:jeus-maven-plugin:install-app

  • Parameter

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Server address to access jeusadmin. (Required)

    portjeus.server.portjava.lang.IntegerServer port number to access jeusadmin. (Default: 9736) (Required)
    userjeus.user.namejava.lang.StringJEUS user name. (Required)
    passwordjeus.user.passwordjava.lang.String

    JEUS user password. (Required)

    argsNonejava.util.ListArgument values passed when executing the command. If both arg and args are used, arg has higher priority. This parameter is recommended for use in the pom.xml file.
    arg

    jeus.jeusadmin. command.arguments

    java.lang.StringArgument value passed when executing the command. If both arg and args are used, arg has higher priority.
  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml.

    <!-- JEUS Maven Plugin - install-app -->
    <plugin>
      <groupId>jeus.tool</groupId>
      <artifactId>jeus-maven-plugin</artifactId>
      <version>7.0.0.2</version>
      <configuration>
        <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
        <args>
          <param>/home/user/SampleApp.war</param>
          <param>-id SampleApp</param>
        </args>
      </configuration>
    </plugin>

    The following is the general result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:install-app
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:install-app (default-cli) @ maven-sample ---
    [INFO] jeus.home = /home/user/jeus
    [INFO] jeusadmin.path = /home/user/jeus/bin/jeusadmin
    [INFO] jeusadmin.one-step-execution-command = [install-application /home/user/SampleApp.war -id SampleApp ]
    [INFO] Attempting to connect to localhost:9736.
    [INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
    [INFO] Successfully installed the application [SampleApp].
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.019s
    [INFO] Finished at: Mon Feb 17 17:22:57 KST 2014
    [INFO] Final Memory: 2M/77M
    [INFO] ------------------------------------------------------------------------
    

Removes an application installed in DAS. Internally, this goal executes the uninstall-application command by using the one-step execution function provided by the console tool (jeusadmin).

  • Name

    jeus.tool:jeus-maven-plugin:uninstall-app

  • Parameter

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Server address to access jeusadmin. (Required)

    portjeus.server.portjava.lang.IntegerServer port number to access jeusadmin. (Default: 9736) (Required)
    userjeus.user.namejava.lang.StringJEUS user name. (Required)
    passwordjeus.user.passwordjava.lang.String

    JEUS user password. (Required)

    argsNonejava.util.ListArgument values passed when executing the command. If both arg and args are used, arg has higher priority. This parameter is recommended for use in the pom.xml file.
    arg

    jeus.jeusadmin. command.arguments

    java.lang.StringArgument value passed when executing the command. If both arg and args are used, arg has higher priority.
  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml.

    <!-- JEUS Maven Plugin - uninstall-app -->
    <plugin>
      <groupId>jeus.tool</groupId>
      <artifactId>jeus-maven-plugin</artifactId>
      <version>7.0.0.2</version>
      <configuration>
        <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
        <args>
          <param>SampleApp</param>
        </args>
      </configuration>
    </plugin>

    The following is the general result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:uninstall-app
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:uninstall-app (default-cli) @ maven-sample ---
    [INFO] jeus.home = /home/user/jeus
    [INFO] jeusadmin.path = /home/user/jeus/bin/jeusadmin
    [INFO] jeusadmin.one-step-execution-command = [uninstall-application SampleApp ]
    [INFO] Attempting to connect to localhost:9736.
    [INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
    [INFO] uninstall the application for the application [SampleApp] succeeded. : Successfully deleted [SampleApp].
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.654s
    [INFO] Finished at: Mon Feb 17 17:24:42 KST 2014
    [INFO] Final Memory: 2M/61M
    [INFO] ------------------------------------------------------------------------
    

Executes the specified jeusadmin command. Internally, this goal executes the command by using the one-step execution function provided by the console tool (jeusadmin).

  • Name

    jeus.tool:jeus-maven-plugin:jeusadmin

  • Parameter

    Parameter NameProperty NameTypeDescription
    jeusHomejeus.homejava.lang.String

    JEUS installation directory. (Required)

    hostjeus.server.hostjava.lang.String

    Server address to access jeusadmin. (Required)

    portjeus.server.portjava.lang.IntegerServer port number to access jeusadmin. (Default: 9736) (Required)
    userjeus.user.namejava.lang.StringJEUS user name. (Required)
    passwordjeus.user.passwordjava.lang.String

    JEUS user password. (Required)

    argsNonejava.util.ListArgument values passed when executing the command. If both arg and args are used, arg has higher priority. This parameter is recommended for use in the pom.xml file.
    arg

    jeus.jeusadmin.

    command.arguments

    java.lang.StringArgument value passed when executing the command. If both arg and args are used, arg has higher priority.
    command

    jeus.jeusadmin.

    command

    java.lang.String

    Name of the jeusadmin command to be executed. (Required)

  • Example

    Parameters can be set in pom.xml or specified on a command line for execution.

    The following is an example of the plugin configuration in pom.xml and the command is server-info -server adminServer -state.

    <!-- JEUS Maven Plugin - jeusadmin -->
    <plugin>
      <groupId>jeus.tool</groupId>
      <artifactId>jeus-maven-plugin</artifactId>
      <version>7.0.0.2</version>
      <configuration>
        <jeusHome>/home/user/jeus</jeusHome>
        <host>localhost</host>
        <port>9736</port>
        <user>administrator</user>
        <password>jeus</password>
        <command>server-info</command>
        <args>
          <param>-server adminServer</param>
          <param>-state</param>
        </args>
      </configuration>
    </plugin>

    The following is the result of executing the goal.

    $ mvn jeus.tool:jeus-maven-plugin:jeusadmin
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building maven-sample-project 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-maven-plugin:7.0.0.2:jeusadmin (default-cli) @ maven-sample ---
    [INFO] jeus.home = /home/user/jeus
    [INFO] jeusadmin.path = /home/user/jeus/bin/jeusadmin
    [INFO] jeusadmin.one-step-execution-command = [server-info -server adminServer -state ]
    [INFO] Attempting to connect to localhost:9736.
    [INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
    [INFO] RUNNING
    [INFO] 
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.642s
    [INFO] Finished at: Mon Feb 17 17:29:13 KST 2014
    [INFO] Final Memory: 2M/77M
    [INFO] ------------------------------------------------------------------------