Table of Contents
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 .
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}.
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.
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/.deploymentplans
[mkdir] Created dir: JEUS_HOME/domains/domain1/bin
[mkdir] Created dir: JEUS_HOME/domains/domain1/config
[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 2 files to JEUS_HOME/domains/domain1/config
[copy] Copying 1 file 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
[echo] productionmode = true
[java] JVM args ignored when same JVM is used.
[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/.workspace/deployed/deploymentplans
[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: 2 seconds
JEUS_HOME/setup$
This section describes the Ant tasks that control the server.
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.
The down task shuts down JEUS.
The following describes the down task properties.
This section shows an example of the build.xml file and how to execute JEUS boot/down through build.xml.
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: <<build.xml>>
<?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>
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
$ ant boot
Buildfile: build.xml
init:
boot:
[boot] Succeed to start server [adminServer]
BUILD SUCCESSFUL
Total time: 11 seconds
down
$ 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.
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: <<build.xml>>
<?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
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.
Property | Description |
---|---|
propertyFile | Property 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”.
ejbddinit property file | ejbddinit 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=55555 | ejbddinit 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.
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
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
The name of the class that defines the java2wsdl Ant task is 'jeus.util.ant.webservices.Java2WsdlTask'.
The following describes the java2wsdl properties.
<java2wsdl> contains the <classpath> element of Ant.
The following is an example of a build.xml that executes java2wsdl.
build.xml Example
[Example 5.4] java2wsdl Ant Task build file example: <<build.xml>>
<?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
$ 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
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
The 'jeus.util.ant.webservices.Wsdl2JavaTask' class defines the wsdl2java Ant task.
The following describes the wsdl2java properties.
<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 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.
Property | Description |
---|---|
package | Java package name. (Required option, String type) |
namespace | Namespace URI of WSDL. (Required option, String type) |
If the package property is specified in the <wsdl2java> element, this value has a higher priority than the <mapping> element value.
The following is an example of a build.xml that executes wsdl2java.
build.xml example
[Example 5.5] wsdl2java Ant Task build file example: <<build.xml>>
<?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
$ jant Buildfile: build.xml ... [wsdl2java] Compiling generated sources(1)... ... BUILD SUCCESSFUL Total time: 6 seconds
The wsgen task creates the following from service endpoint interface classes and classes implemented in Java.
Portable Artifacts
Web service WSDL file (option)
The 'jeus.webservices.jaxws.tools.WsGen2' class defines the wsgen Ant task.
The following describes the wsgen properties.
The following is an example of a build.xml that executes wsgen.
build.xml example
[Example 5.6] wsgen Ant Task build file example: <<build.xml>>
<?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
$ jant
Buildfile: build.xml
...
[echo] Compiling wsgen...
...
BUILD SUCCESSFUL
Total time: 6 seconds
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.
The 'jeus.webservices.jaxws.tools.WsImport2' class defines the wsimport Ant task.
The following describes the wsimport properties.
The following is an example of a build.xml that executes wsimport.
build.xml example
[Example 5.7] wsimport Ant Task build file example: <<build.xml>>
<?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
$ 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
The xjc task converts XML schema files to JAXB content classes in Java language.
The following describes the xjc properties.
The following is an example of a build.xml that executes xjc.
build.xml example
[Example 5.8] xjc Ant Task build file example: <<build.xml>>
<?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
$ 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
The schema gen task creates a single schema file for each individual namespace of a Java class.
The following describes the schemagen properties.
Property | Description |
---|---|
destdir | Directory in which schema files are created. (String type) |
classpath | Classpath. (String type) |
The following is an example of a build.xml that executes schemagen.
build.xml example
[Example 5.9] schemagen Ant Task build file example: <<build.xml>>
<?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
$ jant
Buildfile: build.xml
...
[schemagen] Generating schema from 2 source files
[schemagen] Note: Writing jeus/schema1.xsd
...
BUILD SUCCESSFUL
Total time: 5 seconds
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)
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 7 environment.
The following describes the wsgen plugin properties.
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: <<pom.xml>>
<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
$ 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] ------------------------------------------------------------------------
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
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 7 environment.
The following describes the wsimport plugin properties.
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: <<pom.xml>>
<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
$ 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] ------------------------------------------------------------------------
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.
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 administrator -p jeus -host host1 -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.
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.
JEUS_HOME/bin$jant check-server-state
Buildfile: JEUS_HOME/bin/build.xml
check-server-state:
check-server-state-unix:
[echo] JEUS_HOME/bin/jeusadmin -u administrator -p jeus -host host1 -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
JEUS_HOME/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.
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 .
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.
Copy jeus-maven-plugin.jar to a directory. (Any directory name can be set)
mkdir /home/user1/jeus-maven-plugin cd /home/user1/jeus-maven-plugin cp JEUS_HOME/lib/systemapps/jeus-maven-plugin.jar /home1/user/jeus-maven-plugin
Go to the directory and extract pom.xml from the jeus-maven-plugin.jar file.
jar xvf /home/user1/jeus-maven-plugin/jeus-maven-plugin META-INF/maven/jeus.tool/jeus-maven-plugin/pom.xml
Use the following command to install the JEUS Maven plugin in the user's maven local repository.
mvn install:install-file -Dfile=/home/user1/jeus-maven-plugin/jeus-maven-plugin.jar -DpomFile=META-INF/maven/jeus.tool/jeus-maven-plugin/pom.xml
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.
Usage
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 Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Host address of DAS. (Required) |
port | jeus.server.port | java.lang.Integer | Host address of DAS. (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. |
password | jeus.user.password | java.lang.String | JEUS user password. |
domain | jeus.domain.name | java.lang.String | Domain name to which DAS belongs. (Required) |
server | jeus.server.name | java.lang.String | DAS name. (Required) |
filename | jeus.auth.file | java.lang.String | Account information file used for JEUS authentication. Same as the f option provided by the startDomainAdminServer script. |
waitingTime | jeus.boot.timeout | java.lang.Integer | After 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 | boolean | Option to save the authentication information used to start JEUS. (Default: false) |
force | jeus.server.start. forced | boolean | Forces 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</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:8.0.0.0: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.
Usage
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 Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Host address of DAS. (Required) |
port | jeus.server.port | java.lang.Integer | Host address of DAS. (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. |
password | jeus.user.password | java.lang.String | JEUS user password. |
domain | jeus.domain.name | java.lang.String | Domain name to which DAS belongs. (Required) |
server | jeus.server.name | java.lang.String | DAS name. (Required) |
filename | jeus.auth.file | java.lang.String | Account information file used for JEUS authentication. Same as the f option provided by the startDomainAdminServer script. |
waitingTime | jeus.boot.timeout | java.lang.Integer | After 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 | boolean | Option to save the authentication information used to start JEUS. (Default: false) |
force | jeus.server.start. forced | boolean | Forces 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) |
dasurl | jeus.server.start. dasurl | java.lang.String | DAS 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</host> <port>9736</port> <user>administrator</user> <password>jeus</password> <domain>domain1</domain> <server>server1</server> <dasurl>host1: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:8.0.0.0: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).
Usage
jeus.tool:jeus-maven-plugin:stop-jeus
Parameter
Parameter Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Server address to access jeusadmin. (Required) |
port | jeus.server.port | java.lang.Integer | Server port number to access jeusadmin. (Default: 9736) (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. (Required) |
password | jeus.user.password | java.lang.String | JEUS user password. (Required) |
args | None | java.util.List | Argument 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.String | Argument 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</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:8.0.0.0:stop-jeus (default-cli) @ maven-sample ---
[INFO] jeus.home = /home/user1/jeus
[INFO] jeusadmin.path = /home/user1/jeus/bin/jeusadmin
[INFO] jeusadmin.one-step-execution-command = [local-shutdown]
[INFO] Attempting to connect to host1: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).
Usage
jeus.tool:jeus-maven-plugin:deploy
Parameter
Parameter Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Server address to access jeusadmin. (Required) |
port | jeus.server.port | java.lang.Integer | Server port number to access jeusadmin. (Default: 9736) (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. (Required) |
password | jeus.user.password | java.lang.String | JEUS user password. (Required) |
args | None | java.util.List | Argument 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.String | Argument 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</host> <port>9736</port> <user>administrator</user> <password>jeus</password> <args> <param>myWeb</param> <param>-servers adminServer</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:8.0.0.0:deploy (default-cli) @ maven-sample ---
[INFO] jeus.home = /home/user1/jeus
[INFO] jeusadmin.path = /home/user1/jeus/bin/jeusadmin
[INFO] jeusadmin.one-step-execution-command = [deploy-application myWeb -servers adminServer ]
[INFO] Attempting to connect to host1:9736.
[INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
[INFO] deploy the application for the application [myWeb] 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).
Usage
jeus.tool:jeus-maven-plugin:undeploy
Parameter
Parameter Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Server address to access jeusadmin. (Required) |
port | jeus.server.port | java.lang.Integer | Server port number to access jeusadmin. (Default: 9736) (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. (Required) |
password | jeus.user.password | java.lang.String | JEUS user password. (Required) |
args | None | java.util.List | Argument 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.String | Argument 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</host> <port>9736</port> <user>administrator</user> <password>jeus</password> <args> <param>myWeb</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:8.0.0.0:undeploy (default-cli) @ maven-sample ---
[INFO] jeus.home = /home/user1/jeus
[INFO] jeusadmin.path = /home/user1/jeus/bin/jeusadmin
[INFO] jeusadmin.one-step-execution-command = [undeploy-application myWeb ]
[INFO] Attempting to connect to host1:9736.
[INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
[INFO] Undeploying [myWeb] (This may take time due to graceful undeployment) ..........
[INFO] undeploy the application for the application [myWeb] 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).
Usage
jeus.tool:jeus-maven-plugin:start-app
Parameter
Parameter Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Server address to access jeusadmin. (Required) |
port | jeus.server.port | java.lang.Integer | Server port number to access jeusadmin. (Default: 9736) (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. (Required) |
password | jeus.user.password | java.lang.String | JEUS user password. (Required) |
args | None | java.util.List | Argument 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.String | Argument 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</host> <port>9736</port> <user>administrator</user> <password>jeus</password> <args> <param>myWeb</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:8.0.0.0:start-app (default-cli) @ maven-sample ---
[INFO] jeus.home = /home/user1/jeus
[INFO] jeusadmin.path = /home/user1/jeus/bin/jeusadmin
[INFO] jeusadmin.one-step-execution-command = [start-application myWeb ]
[INFO] Attempting to connect to host1:9736.
[INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
[INFO] start the application for the application [myWeb] 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).
Usage
jeus.tool:jeus-maven-plugin:stop-app
Parameter
Parameter Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Server address to access jeusadmin. (Required) |
port | jeus.server.port | java.lang.Integer | Server port number to access jeusadmin. (Default: 9736) (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. (Required) |
password | jeus.user.password | java.lang.String | JEUS user password. (Required) |
args | None | java.util.List | Argument 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.String | Argument 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</host> <port>9736</port> <user>administrator</user> <password>jeus</password> <args> <param>myWeb</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:8.0.0.0:stop-app (default-cli) @ maven-sample ---
[INFO] jeus.home = /home/user1/jeus
[INFO] jeusadmin.path = /home/user1/jeus/bin/jeusadmin
[INFO] jeusadmin.one-step-execution-command = [stop-application myWeb ]
[INFO] Attempting to connect to host1:9736.
[INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
[INFO] stop the application for the application [myWeb] 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).
Usage
jeus.tool:jeus-maven-plugin:install-app
Parameter
Parameter Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Server address to access jeusadmin. (Required) |
port | jeus.server.port | java.lang.Integer | Server port number to access jeusadmin. (Default: 9736) (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. (Required) |
password | jeus.user.password | java.lang.String | JEUS user password. (Required) |
args | None | java.util.List | Argument 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.String | Argument 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</host> <port>9736</port> <user>administrator</user> <password>jeus</password> <args> <param>/home/user/myWeb.war</param> <param>-id myWeb</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:8.0.0.0:install-app (default-cli) @ maven-sample ---
[INFO] jeus.home = /home/user1/jeus
[INFO] jeusadmin.path = /home/user1/jeus/bin/jeusadmin
[INFO] jeusadmin.one-step-execution-command = [install-application /home/user/myWeb.war -id myWeb ]
[INFO] Attempting to connect to host1:9736.
[INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
[INFO] Successfully installed the application [myWeb].
[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).
Usage
jeus.tool:jeus-maven-plugin:uninstall-app
Parameter
Parameter Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Server address to access jeusadmin. (Required) |
port | jeus.server.port | java.lang.Integer | Server port number to access jeusadmin. (Default: 9736) (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. (Required) |
password | jeus.user.password | java.lang.String | JEUS user password. (Required) |
args | None | java.util.List | Argument 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.String | Argument 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</host> <port>9736</port> <user>administrator</user> <password>jeus</password> <args> <param>myWeb</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:8.0.0.0:uninstall-app (default-cli) @ maven-sample ---
[INFO] jeus.home = /home/user1/jeus
[INFO] jeusadmin.path = /home/user1/jeus/bin/jeusadmin
[INFO] jeusadmin.one-step-execution-command = [uninstall-application myWeb ]
[INFO] Attempting to connect to host1:9736.
[INFO] The connection has been established to Domain Administration Server adminServer in the domain domain1.
[INFO] uninstall the application for the application [myWeb] succeeded. : Successfully deleted [myWeb].
[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).
Usage
jeus.tool:jeus-maven-plugin:jeusadmin
Parameter
Parameter Name | Property Name | Type | Description |
---|---|---|---|
jeusHome | jeus.home | java.lang.String | JEUS installation directory. (Required) |
host | jeus.server.host | java.lang.String | Server address to access jeusadmin. (Required) |
port | jeus.server.port | java.lang.Integer | Server port number to access jeusadmin. (Default: 9736) (Required) |
user | jeus.user.name | java.lang.String | JEUS user name. (Required) |
password | jeus.user.password | java.lang.String | JEUS user password. (Required) |
args | None | java.util.List | Argument 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.String | Argument 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>8.0.0.0</version> <configuration> <jeusHome>/home/user1/jeus</jeusHome> <host>host1</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:8.0.0.0:jeusadmin (default-cli) @ maven-sample ---
[INFO] jeus.home = /home/user1/jeus
[INFO] jeusadmin.path = /home/user1/jeus/bin/jeusadmin
[INFO] jeusadmin.one-step-execution-command = [server-info -server adminServer -state ]
[INFO] Attempting to connect to host1: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] ------------------------------------------------------------------------