Chapter 5. Ant Task

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.

5.1. Overview

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.

5.2. Setup Ant Task

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

5.2.1. create-domain

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.

[Table 5.1] create-domain Task Properties

PropertyDescription
domainDomain name. (Default value: jeus_domain)
servernameDomain Admin Server (DAS) name. (Default value: adminServer)
nodenameNode name used by DAS. (Default value: node1)
jeus.addressDAS address. (Default value: 0.0.0.0)
jeus.portDAS port. (Default value: 9736)
jms.portDAS JMS port. (Default value: 9741)
http.portDAS HTTP port. (Default value: 8808)
jvm.configDAS JVM configuration. (Default value: -Xmx1024m -XX:MaxPermSize=128m)
jeus.usernameDomain administrator account. It is strongly recommended to change to a domain administrator account name. (Default value: administrator)
jeus.password

Domain administrator account password. Base64 encoded value of jeus. It is strongly recommended to change the value through the Ant configuration or the set-password command of jeusadmin.

(Default value: {base64}amV1cw==)

usevirtualmulticastWhen using GMS, this property determines whether to use the virtual multicast, which uses TCP communication. Input true or false. (Default value: false)
heartbeataddress

The heartbeat address used in GMS.

Not applicable if uservirtualmulticast is set to true. (Default value: 230.30.1.1)

heartbeatport

The heartbeat port used in GMS.

Not applicable if uservirtualmulticast is set to true. (Default value: 3030)


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$ 

5.3. Server Control Ant Task

This section describes the Ant tasks that control the server.

5.3.1. boot

When starting a server using the boot task, the command is sent to node manager, and the node manager starts the server. The node manager must be running for this task to execute.

The following describes the boot task properties.

[Table 5.2] boot Task Properties

PropertyDescription
domainNameName of the domain the server to be started belongs to. (Required option)
serverNameName of the server to be started. (Required option)
hostHost to access node manager. (Required option)
portPort to access node manager. (Required option)
connectionTypeConnection type to access the node manager. Input options: ssl or plain.
truststorePathPath to the truststore file, which is required for authentication to access node manager, when the node manager is running in SSL.
truststorePasswordPassword for truststore file, which is required for authentication to access node manager, when the node manager is running in SSL.
adminServerDetermines whether the server to be started is DAS or MS. (Required option)
forceOption to forcibly set the server to the RUNNING state if the server is in the STANDBY state due to a failed deployment when the server is started.
standbyRuns the server in the STANDBY state.
usernameUser name to start the server. (Required option)
passwordPassword to start the server. (Required option)


5.3.2. down

The down task shuts down JEUS.

The following describes the down task properties.

[Table 5.3] down Task Properties

PropertyDescription
domainNameDomain name the server to be terminated belongs to. (Required option)
serverNameServer name to be terminated. (Required option)
hostHost to access node manager. (Required option)
portPort to access node manager. (Required option)
connectionTypeConnection type to access the node manager. Input options: ssl or plain.
truststorePathPath to the truststore file, which is required for authentication to access node manager, when the node manager is running in SSL.
truststorePasswordPassword for truststore file, which is required for authentication to access node manager, when the node manager is running in SSL.
usernameUser name to terminate the server. (Required option)
passwordPassword to terminate the server. (Required option)


5.3.3. Execution

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

5.4. EJB Ant Task

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

5.4.1. appcompiler

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.

[Table 5.4] appcompiler Ant Task properties

PropertyDescription
jeusHomeSets JEUS_HOME. (String type)
clientClient view file that contains the stub classes to be created. (String type)
keepOption to save the source files created during the compilation process. (Default value: false)
jspmap

Option to create the servlet-mapping table in the jeus_jspmap.xml file. (Default value: false)

ejbJarejb-jar.xml file used for compilation. (String type)
jeusEjbDdjeus-ejb-dd.xml file used for compilation. (String type)
nameDeployment name.
target

Application and stand-alone module files to be compiled. (Required option, String type)


Example

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

  • build.xml example

    [Example 5.2] appcompiler Ant Task build file example

    <?xml version="1.0"?>
    
    <project name="example" default="appcompiler" 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 appcompiler task -->
      <property name="client" value="client_view.jar"/>
      <property name="keep" value="false"/>
      <property name="jspmap" value="false"/>
      <property name="ejbjar" value="ejb-jar.xml"/>
      <property name="jeusejbdd" value="jeus-ejb-dd.xml"/>
      <property name="targetfile" value="ejb"/>
    
      <!-- 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>
    
      <!-- appcompiler task -->
      <target name="appcompiler" depends="init">
        <appcompiler jeusHome="${jeus.home}"
                     client="${client}"
                     keep="${keep}"
                     jspmap="${jspmap}"
                     ejbJar="${ejbjar}"
                     jeusEjbDd="${jeusejbdd}"
                     target="${targetfile}"/>
      </target>
    
    </project>
    

  • Execution example

    $ ant appcompiler
    Buildfile: build.xml
    
    init:
    
    appcompiler:
    
    BUILD SUCCESSFUL
    Total time: 3 minutes 7 seconds

5.4.2. ejbddinit

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.

[Table 5.5] ejbddinit Ant Task properties

PropertyDescription
propertyFileProperty files referred to when executing ejbddinit. (String type)
logginginglevel

Log level displayed on a screen when executing ejbddinit.

This level is matches the J2SE logging API level. (Default value: INFO)

target

Path to the EJB module executed by ejbddint. The EJB module can be a JAR archive or directory.

(Required option. This property can be omitted when the property file contains the target information.)


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”.

[Table 5.6] The setting of ejbddinit properties in the ejbddinit property files and the ejbddinit Ant script

ejbddinit property fileejbddinit Ant script
export-name=%{ejb-class}<property name="export-name" value="%{ejb-class}"/>
thread-max=100<property name="thread-max" value="100"/>
HelloBean.export-port=55555ejbddinit properties cannot be set for a specific EJB component, such as HelloBean, in build.xml.

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.

  • ejbddinit Ant script example

    [Example 5.3] ejbddinit Ant script example

    <?xml version="1.0"?>
    <project name="example" default="ejbddinit" 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 ejbddinit task -->
      <property name="targetfile" value="ejb.jar"/>
      <property name="logginglevel" value="FINE"/>
      <property name="propertyfile" value="ejbddinit.properties"/>
      
      <!-- set properties to be needed for ejbddinit properties -->
      <property name="export-name" value="%{ejb-class}"/>
      <property name="thread-max" value="100"/>
    
      <!-- 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>
    
      <!-- ejbddinit task -->
      <target name="ejbddinit" depends="init">
        <ejbddinit loggingLevel="${logginglevel}"
                   property="${propertyfile}"
                   target="${targetfile}"
                   exportName="${export-name}"
                   threadMax="${thread-max}">
        </ejbddinit>
      </target>
    </project>
      

  • ejbddinit Ant Task execution

    $ Ant ejbddinit
    Buildfile: build.xml
    
    init:
    
    ejbddinit: 
    [ejbddinit] LoadFile: /jeus/sample/ejbddinit.properties
    [ejbddinit] Source=/jeus/sample/ejbddinit/ejb.jar
    [ejbddinit] Successfully configured the parameters.
    [ejbddinit] Deployment descriptor initialization started.
    [ejbddinit] Creating JEUS descriptors.
    [ejbddinit] Deployment descriptor initialization finished.
    
    BUILD SUCCESSFUL
    Total time: 2 seconds 

5.5. Web Service Ant Task

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

5.5.1. java2wsdl

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.

[Table 5.7] java2wsdl Ant Task properties

PropertyDescription
configfilepathPath to the web service configuration file. (Required input, String type)
classpath

Path to Java web services classes. (Required input, String type)

destDirAbsolute path to the directory in which WSDL files are created. (String type)
levelLogging level. (String type)
verboseDisplays verbose messages.

Nested Element

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

Example

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

  • build.xml Example

    [Example 5.4] java2wsdl Ant Task build file example

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="java2wsdl" default="build" basedir=".">
        <property name="is.app-client.module" value="true" />
        <import file="../../common/common-build.xml" />    
        <taskdef name="java2wsdl"
                 classname="jeus.util.ant.webservices.Java2WsdlTask">
            <classpath refid="jeus.libraries.classpath" />
        </taskdef>
        <target name="-post-compile">
            <java2wsdl destDir="${build.classes.dir}"
                       verbose="true"
                       configfilepath="${src.conf}/service-config.xml">
                <classpath refid="classpath" />
            </java2wsdl>
        </target>
    </project>

  • Execution Example

    ~/jeus$ jant
    
    ...
    
    [java2wsdl] Building Web Services : DocLitEchoService
    [java2wsdl] Generating WSDL File - jeus/build/classes/DocLitEchoService.wsdl
    [java2wsdl] Generating JAX-RPC Mapping File - jeus/build/classes/DocLitEchoService-mapping.xml
    
    ...
    
    BUILD SUCCESSFUL
    Total time: 11 seconds

5.5.2. wsdl2java

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.)

[Figure 5.1] wsdl2java Task Structure

wsdl2java Task Structure


<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.

[Table 5.9] wsdl2java Task - mapping element properties

PropertyDescription
packageJava package name. (Required option, String type)
namespaceNamespace URI of WSDL. (Required option, String type)

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.

  • build.xml example

    [Example 5.5] wsdl2java Ant Task build file example

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="wsdl2java" default="build" basedir=".">
        <property name="is.app-client.module" value="true" />
        <import file="../../../common/common-build.xml" />
        <taskdef name="wsdl2java"
                 classname="jeus.util.ant.webservices.Wsdl2JavaTask">
            <classpath refid="jeus.libraries.classpath" />
        </taskdef>
        <target name="-pre-compile">
            <mkdir dir="${build.classes.dir}" />
            <wsdl2java destDir="${build.classes.dir}"
                       verbose="true"
                       mode="import:server"
                       doCompile="true"
                       noDataBinding="true"
                       package="sample.nodatabinding.service"
                       outputmapping="${build.classes.dir}/BookQuoteService-mapping.xml"
                       wsdl="${src.conf}/BookQuoteService.wsdl">
                <classpath refid="classpath" />
            </wsdl2java>
        </target>
    </project>

  • Execution example

    ~/jeus$ jant
    Buildfile: build.xml
    ...
    [wsdl2java] Compiling generated sources(1)...
    ...
    BUILD SUCCESSFUL
    Total time: 6 seconds

5.5.3. wsgen

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.

[Table 5.10] wsgen Task properties

PropertyDescription
seiName of the service endpoint interface class. (Required input, String type)
destdir

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

(Required input, String type)

classpathDirectory of input class files. (String type)
cpAlias for the classpath property. (String type)
resourcedestdir

Used with the genwsdl property. This property configures the location in which WSDL files are created. (String type)

sourcedestdirDirectory in which source files are created. (String type)
keepSaves created files.
verboseDisplays verbose messages.
genwsdlOption to create WSDL files.
protocol

Used with the genwsdl property. Protocol to be used in the wsdl:binding element. The default value is soap1.1. Xsoap1.2 values can be used with the property extension.

servicenameUsed with the genwsdl property. Name of a specific wsdl:service element of the created WSDL file. (String type)
portnameUsed with the genwsdl property. Name of a specific wsdl:portname element of the created WSDL file. (String type)
extensionAllows vendor extensions. This option may cause compatibility and portability issues.
policyReads the web service policy configuration file. (String type)

Example

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

  • build.xml example

    [Example 5.6] wsgen Ant Task build file example

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="wsgen" default="build" basedir=".">
        <property name="is.app-client.module" value="true" />
        <import file="../../common/common-build.xml" />
        <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
            <classpath refid="jeus.libraries.classpath" />
        </taskdef>
        <target name="-post-compile">
            <wsgen sei="fromjava.server.AddNumbersImpl"
                   destdir="${build.classes.dir}"
                   classpath="${build.classes.dir}"
                   resourcedestdir="${build.classes.dir}"
                   sourcedestdir="${build.classes.dir}"
                   genwsdl="true" />
        </target>
    </project>

  • Execution example

    ~/jeus$ jant
    Buildfile: build.xml
    ...
    
         [echo] Compiling wsgen...
    ...
    
    BUILD SUCCESSFUL
    Total time: 6 seconds

5.5.4. wsimport

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.

[Table 5.11] wsimport Task properties

PropertyDescription
wsdlAbsolute path or URL to the WSDL file used to create Java source files. (Required option, String type)
destDirAbsolute path to the directory in which Java files are created. (String type)
sourcedestdirDirectory in which source files are created. If this property is set, the keep property is automatically set. (String type)
keepSaves created files.
verboseDisplays verbose messages. (Default value: false)
bindingExternal JAS-WS or JAXB binding files. (String type)
extensionAllows vendor extensions. This option may cause compatibility and portability issues. (boolean type)
wsdllocationIf WSDL URI is specified, the URI value is set to the service endpoint interface and the @WebService.wsdlLocation Annotation and @WebServiceClient.wsdlLocation annotations of the service interface. (String type)
catalogExternal entity reference values like those in TR9401, XCatalog, and OASIS XML Catalog. The Ant xmlcatalog type can also be used. (String type)
package

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

targetCreates code according to the specified version of JAX-WS specifications. (String type)
quietHides output messages.
policyReads the web service policy configuration file. (String type)

Example

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

  • build.xml example

    [Example 5.7] wsimport Ant Task build file example

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="wsimport" default="build" basedir=".">
    	<property name="is.app-client.module" value="true" />
        <import file="../../common/common-build.xml" />
        <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
            <classpath refid="jeus.libraries.classpath" />
        </taskdef>
        <target name="-pre-compile">
            <mkdir dir="${build.classes.dir}" />
            <wsimport wsdl="${src.conf}/AddNumbers.wsdl"
                      destDir="${build.classes.dir}"
                      sourcedestdir="${build.classes.dir}"
                      package="fromwsdl.server" />
        </target>
    </project>

  • Execution example

    ~/jeus$ jant
    Buildfile: build.xml
    ...
    
     [wsimport] Consider using <depends>/<produces> so that wsimport won't do
    unnecessary compilation
     [wsimport] parsing WSDL...
     [wsimport]
     [wsimport]
     [wsimport] generating code...
    ...
    
    BUILD SUCCESSFUL
    Total time: 6 seconds

5.5.5. xjc

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

The following describes the xjc properties.

[Table 5.12] xjc Task properties

PropertyDescription
wsdlSchema files to be compiled. (Required option, String type)
bindingExternally added binding files to be applied to the schema files. (String type)
packageJava package below which source code is created. This option has the same effect as the -p option for a command line. (String type)
destdirDirectory in which source code is created. (Required option, String type)
readonlyOption to set Java source files to readonly mode. (Default value: false)
extensionOption to execute the XJC binding compiler in extension mode. (Default value: false)
catalogExternal entity reference values like those in TR9401, XCatalog, and OASIS XML Catalog. (String type)
removeOldOutputOption to delete all files specified by the produces element before the XJC binding compiler recompiles the source files. (String type, "yes"/"no")
sourceSchema version of the compiler to be used. (String type, 1.0/2.0)

Example

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

  • build.xml example

    [Example 5.8] xjc Ant Task build file example

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="xjc" default="build" basedir=".">
        <property name="is.app-client.module" value="true" />
        <import file="../../common/common-build.xml" />
        <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
            <classpath refid="jeus.libraries.classpath" />
        </taskdef>
        <target name="-pre-compile">
            <mkdir dir="${build.classes.dir}" />
            <xjc schema="${src.conf}/ts.xsd"
                 package="com.tmaxsoft"
                 destdir="${build.classes.dir}">
                <produces dir="${build.classes.dir}/com/tmaxsoft"
                          includes="**/*.java" />
                <classpath refid="jeus.libraries.classpath" />
                <classpath refid="classpath" />
            </xjc>
        </target>
    </project>

  • Execution example

    ~/jeus$ jant
    Buildfile: build.xml
    
    ...
    
          [xjc] jeus/build/classes/com/tmaxsoft is not found and thus excluded from
    the dependency check
          [xjc] Compiling file:/jeus/src/conf/ts.xsd
          [xjc] Writing output to jeus/build/classes
    
    ...
    
    BUILD SUCCESSFUL
    Total time: 4 seconds

5.5.6. schemagen

The schema gen task creates a single schema file for each individual namespace of a Java class.

The following describes the schemagen properties.

[Table 5.13] schemagen Task properties

PropertyDescription
destdirDirectory in which schema files are created. (String type)
classpathClasspath. (String type)

Example

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

  • build.xml example

    [Example 5.9] schemagen Ant Task build file example

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="schemagen" default="build" basedir=".">
        <property name="is.app-client.module" value="true" />
        <import file="../../common/common-build.xml" />
        <taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask">
            <classpath refid="jeus.libraries.classpath" />
        </taskdef>
        <target name="-pre-compile">
            <mkdir dir="${build.classes.dir}" />
            <schemagen destdir="${build.classes.dir}">
                <src path="${src.dir}" />
                <classpath refid="jeus.libraries.classpath" />
                <classpath refid="classpath" />
            </schemagen>
        </target>
    </project>

  • Execution example

    ~/jeus$ jant
    Buildfile: build.xml
    
    ...
    
    [schemagen] Generating schema from 2 source files
    [schemagen] Note: Writing jeus/schema1.xsd
    
    ...
    
    BUILD SUCCESSFUL
    Total time: 5 seconds

5.6. Web Service Maven Plugin

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

5.6.1. wsgen

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.

[Table 5.14] wsgen plugin properties

PropertyDescription
seiSEI class name. (Required option, String type)
destDir

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

(Default value: ${project.build.outputDirectory})

resourceDestDir

Used with the genwsdl property. Path in which the WSDL file is created.

(Default value: ${project.build.directory}/generated-sources/wsdl)

sourceDestDir

Directory in which source files are created.

(Default value: ${project.build.directory}/generated-sources/wsgen)

keepSaves created files. (Default value: true)
verboseDisplays verbose messages. (Default value: false)
genWsdlOption to create the WSDL file. (Default value: false)
protocolUsed with the genwsdl property. Protocol to be used in the wsdl:binding element. The default value is soap1.1. Xsoap1.2 values can be used with the property extension. (String type)
servicenameUsed with the genwsdl property. Name of a specific wsdl:service element of the created WSDL file. (String type)
portnameUsed with the genwsdl property. Name of a specific wsdl:portname element of the created WSDL file. (String type)
extensionAllows vendor extensions. This option may cause compatibility and portability issues. (boolean type)

Example

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

  • pom.xml example

    [Example 5.10] wsgen plugin pom file example

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        
        <groupId>jeus.webservices.maven.sample</groupId>
        <artifactId>wsgen_sample</artifactId>
        <version>0.0.1</version>
        <packaging>war</packaging>
        
        <name>${project.artifactId}</name>
        
        <build>
            <plugins>
                <plugin>
                    <groupId>jeus.ws</groupId>
                    <artifactId>jeus-ws-maven-plugin</artifactId>
                    <version>0.0.1</version>
                    <executions>
                        <execution>
                            <id>wsgen_test</id>
                            <goals>
                                <goal>wsgen</goal>
                            </goals>
                            <configuration>
                                <sei>jeus.webservices.sample.EchoService</sei>
                                <extension>true</extension>
                                <genWsdl>true</genWsdl>
                                <keep>true</keep>
                                <inlineSchemas>true</inlineSchemas>
                            </configuration>
                        </execution>
                    </executions>
    
                    <dependencies>
                        <dependency>
                            <groupId>com.sun</groupId>
                            <artifactId>tools</artifactId>
                            <version>1.6</version>
                            <scope>system</scope>
                            <systemPath>${java.home}/../lib/tools.jar</systemPath>
                        </dependency>
                        <dependency>
                            <groupId>com.sun.xml.ws</groupId>
                            <artifactId>jaxws-tools</artifactId>
                            <version>2.2</version>
                            <scope>system</scope>
                            <systemPath>${jeus.home}/lib/system/jaxws-tools.jar</systemPath>
                        </dependency>
                    </dependencies>
                </plugin>
                
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                        <encoding>UTF-8</encoding>
                        <compilerArguments>
                            <endorseddirs>${jeus.home}/lib/endorsed</endorseddirs>
                        </compilerArguments>
                    </configuration>
                </plugin>
            </plugins>  
        </build>
    
    </project>
    

  • Execution example

    ~/wsgen$ mvn -Djeus.home=$JEUS_HOME process-classes
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building wsgen_sample 0.0.1
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ wsgen_sample ---
    [INFO] skip non existing resourceDirectory /jeus/wsgen/src/main/resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ wsgen_sample ---
    [INFO] Nothing to compile - all classes are up to date
    [INFO] 
    [INFO] --- jeus-ws-maven-plugin:0.0.1:wsgen (wsgen_test) @ wsgen_sample ---
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3.773s
    [INFO] ------------------------------------------------------------------------
    

5.6.2. wsimport

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.

[Table 5.15] wsimport plugin properties

PropertyDescription
wsdlDirectoryPath to WSDL files, which are required to create Java source files. (Default value: ${basedir}/src/wsdl)
wsdlFilesList of local WSDL files. (String type)
wsdlUrlsList of External WSDL URLs. (String type)
destDir

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

(Default value: ${project.build.outputDirectory})

sourceDestDir

Directory in which source files are created. If this property is set, the keep property is automatically set.

(Default value: ${project.build.directory}/generated-sources/wsimport)

keepSaves created files. (Default value: true)
verboseDisplays verbose messages. (Default value: false)
bindingDirectory

Path to JAX-WS or JAXB binding files.

(Default value: ${basedir}/src/jaxws)

bindingFilesList of JAX-WS or JAXB binding files. (String type)
extensionAllows vendor extensions. This option may cause compatibility and portability issues. (Default value: false)
wsdlLocationIf WSDL URI is set in this property, it applies to service end-point interfaces and the @WebServiceClient.wsdlLocation and @WebService.wsdlLocation annotations of the service interfaces.
catalogExternal entity reference values like those in TR9401, XCatalog, and OASIS XML Catalog. (String type)
packageNameJava package name for all namespace URIs of WSDL. (String type)
targetCreates code according to the specified version of JAX-WS specifications.
quietDoes not display output messages. (Default value: false)

Example

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

  • pom.xml example

    [Example 5.11] wsimport plugin pom file example

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        
        <groupId>jeus.webservices.maven.sample</groupId>
        <artifactId>wsimport_sample</artifactId>
        <version>0.0.1</version>
        <packaging>war</packaging>
        
        <name>${project.artifactId}</name>
        
        <build>
            <plugins>
                <plugin>
                    <groupId>jeus.ws</groupId>
                    <artifactId>jeus-ws-maven-plugin</artifactId>
                    <version>0.0.1</version>
                    <executions>
                        <execution>
                            <id>wsimport_test</id>
                            <goals>
                                <goal>wsimport</goal>
                            </goals>
                            <configuration>
                                <packageName>jeus.webservices.sample.test</packageName>
                                <wsdlDirectory>${basedir}/src/wsdl</wsdlDirectory>
                                <wsdlFiles>
                                    <wsdlFile>EchoService.wsdl</wsdlFile>
                                </wsdlFiles>
                            </configuration>
                        </execution>
                    </executions>
    
                    <dependencies>
                        <dependency>
                            <groupId>com.sun</groupId>
                            <artifactId>tools</artifactId>
                            <version>1.6</version>
                            <scope>system</scope>
                            <systemPath>${java.home}/../lib/tools.jar</systemPath>
                        </dependency>
                        <dependency>
                            <groupId>com.sun.xml.ws</groupId>
                            <artifactId>jaxws-tools</artifactId>
                            <version>2.2</version>
                            <scope>system</scope>
                            <systemPath>${jeus.home}/lib/system/jaxws-tools.jar</systemPath>
                        </dependency>
                    </dependencies>
                </plugin>
                
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                        <encoding>UTF-8</encoding>
                        <compilerArguments>
                            <endorseddirs>${jeus.home}/lib/endorsed</endorseddirs>
                        </compilerArguments>
                    </configuration>
                </plugin>
            </plugins>  
        </build>
    
    </project>
    

  • Execution example

    ~/wsimport$ mvn -Djeus.home=$JEUS_HOME generate-sources
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building wsimport_sample 0.0.1
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- jeus-ws-maven-plugin:0.0.1:wsimport (wsimport_test) @ wsimport_sample ---
    [INFO] Processing: file:/jeus/wsimport/src/wsdl/EchoService.wsdl
    [INFO] jaxws:wsimport args: [-keep, -s, /jeus/wsimport/target/generated-sources/wsimport, 
    -Xnocompile, -p, jeus.webservices.sample.test, file:/jues/wsimport/src/wsdl/EchoService.wsdl]
    parsing WSDL...
    
    
    
    Generating code...
    
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.052s
    [INFO] ------------------------------------------------------------------------
    

5.7. Executing jeusadmin Commands

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>
  • jeus.home is the JEUS installation location. The previous example assumes that the path to jeus.home is saved in the system environment variable JEUS_HOME.

    Note

    When executing Ant using the jant script provided by JEUS, JEUS_HOME does not need to be set separately.

  • unix.jeusadmin and windows.jeusadmin set the location of the scripts used to execute the jeusadmin tool. In general, the jeusadmin script is located under JEUS_HOME/bin. The script names in UNIX and Windows differ, so two properties are used.

  • jeusadmin.args is a list of argument values used to execute the jeusadmin tool. Set required options such as user name, password, host address, port number, and verbose output. For more information about the options, refer to "4.2.1.1. jeusadmin".

  • cmd.target sets the command to be executed. This example checks the server status using the server-info command, so it is set to 'server-info -server ${server.name} -state'. For more information about available commands in jeusadmin, refer to Part II, "Console Commands and Tools".

  • check-server-state-windows and check-server-state-unix target use the exec task to execute jeusadmin. The osfamily property can be used to execute the OS-specific script. In the <exec> tag, the spawn property must be set to "false" to check the result using Ant. To fail an Ant build if a command failed to run, set the failonerror property to "true".

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$

5.8. Maven Plugin

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.

Note

This section does not describe Apache Maven in detail. User knowledge of Apache Maven and correct installation are assumed. For more information about Apache Maven, refer to http://maven.apache.org .

5.8.1. Installation

The following is the JEUS Maven plugin installation file directory.

JEUS_HOME/lib/systemapps/jeus-maven-plugin.jar

The following is the Maven plugin installation process.

  1. Copy jeus-maven-plugin.jar to a directory. (Any directory name can be set)

    mkdir /home/user/jeus-maven-plugin
    cd /home/user/jeus-maven-plugin
    cp JEUS_HOME/lib/systemapps/jeus-maven-plugin.jar /home/user/jeus-maven-plugin
    
  2. Go to the directory and extract pom.xml from the jeus-maven-plugin.jar file.

    jar xvf /home/user/jeus-maven-plugin/jeus-maven-plugin META-INF/maven/jeus.tool/jeus-maven-plugin/pom.xml
  3. Use the following command to install the JEUS Maven plugin in the user's maven local repository.

    mvn install:install-file -Dfile=/home/user/jeus-maven-plugin/jeus-maven-plugin.jar -DpomFile=META-INF/maven/jeus.tool/jeus-maven-plugin/pom.xml

5.8.2. Maven Plugin Goals

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

5.8.2.1. start-das

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] ------------------------------------------------------------------------
    

5.8.2.2. start-ms

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] ------------------------------------------------------------------------

5.8.2.3. stop-jeus

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] ------------------------------------------------------------------------
    

5.8.2.4. deploy

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] ------------------------------------------------------------------------
    

5.8.2.5. undeploy

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] ------------------------------------------------------------------------
    

5.8.2.6. start-app

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] ------------------------------------------------------------------------
    

5.8.2.7. stop-app

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] ------------------------------------------------------------------------
    

5.8.2.8. install-app

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] ------------------------------------------------------------------------
    

5.8.2.9. uninstall-app

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] ------------------------------------------------------------------------
    

5.8.2.10. jeusadmin

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] ------------------------------------------------------------------------