All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.mojo.was6.HelpMojo Maven / Gradle / Ivy

Go to download

Tools for working with IBM WebSphere 6.0.x and 6.1.x. This plugin works along with an installation of WebSphere Application Server or Process Server - standalone or ND installation, to provide automated tasks for: generating RMIC stubs, starting/stopping servers, installing/updating/uninstalling EARs to application servers, run serviceDeploy and run arbitrary scripts with wsadmin.

There is a newer version: 1.2.1
Show newest version
package org.codehaus.mojo.was6;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;

/**
 * Display help information on was6-maven-plugin. Call 
  mvn was6:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details. * * @version generated on Mon Jan 26 00:48:06 CET 2009 * @goal help * @requiresProject false */ public class HelpMojo extends AbstractMojo { /** * If true, display all settable properties for each goal. * * @parameter expression="${detail}" default-value="false" */ private boolean detail; /** * The name of the goal for which to show help. If unspecified, all goals will be displayed. * * @parameter expression="${goal}" */ private java.lang.String goal; /** * The maximum length of a display line. * * @parameter expression="${lineLength}" default-value="80" */ private int lineLength; /** * The number of spaces per indentation level. * * @parameter expression="${indentSize}" default-value="2" */ private int indentSize; /** {@inheritDoc} */ public void execute() throws MojoExecutionException { StringBuffer sb = new StringBuffer(); append( sb, "org.codehaus.mojo:was6-maven-plugin:1.1", 0 ); append( sb, "", 0 ); append( sb, "WAS6 Maven Plugin 1.1", 0 ); append( sb, "Tools for working with IBM WebSphere 6.0.x and 6.1.x. This plugin works along with an installation of WebSphere Application Server or Process Server - standalone or ND installation, to provide automated tasks for: generating RMIC stubs, starting/stopping servers, installing/updating/uninstalling EARs to application servers, run serviceDeploy and run arbitrary scripts with wsadmin.", 1 ); append( sb, "", 0 ); if ( goal == null || goal.length() <= 0 ) { append( sb, "This plugin has 13 goals:", 0 ); append( sb, "", 0 ); } if ( goal == null || goal.length() <= 0 || "clean".equals( goal ) ) { append( sb, "was6:clean", 0 ); append( sb, "Cleans out temporary resources and generated sources.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "generatedClassesDirectory (Default: ${project.build.directory}/generated-classes/was6-maven-plugin)", 2 ); append( sb, "Directory to hold generated classes.", 3 ); append( sb, "", 0 ); append( sb, "generatedSourcesDirectory (Default: ${project.build.directory}/generated-sources/was6-maven-plugin)", 2 ); append( sb, "Directory to hold generated sources.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "ejbdeploy".equals( goal ) ) { append( sb, "was6:ejbdeploy", 0 ); append( sb, "Generates EJB RMIC stub sources.\nThis goal will fork a parallel life cycle up to package phase. This is required because an archive is required as input to the underlying tasks.\n", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "compatible35", 2 ); append( sb, "Set to true to use WebSphere 3.5 compatible mapping rules.", 3 ); append( sb, "", 0 ); append( sb, "dbname", 2 ); append( sb, "Specifies the name of the database to create.", 3 ); append( sb, "", 0 ); append( sb, "dbschema", 2 ); append( sb, "Specifies the name of the database schema to create.", 3 ); append( sb, "", 0 ); append( sb, "dbvendor", 2 ); append( sb, "Specifies the type of database the EJBs will use.", 3 ); append( sb, "", 0 ); append( sb, "dynamic", 2 ); append( sb, "Specifies to enable dynamic query support.", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "generatedClassesDirectory (Default: ${project.build.directory}/generated-classes/was6-maven-plugin)", 2 ); append( sb, "Directory to hold generated classes.", 3 ); append( sb, "", 0 ); append( sb, "generatedSourcesDirectory (Default: ${project.build.directory}/generated-sources/was6-maven-plugin)", 2 ); append( sb, "Directory to hold generated sources.", 3 ); append( sb, "", 0 ); append( sb, "jdkComplianceLevel (Default: 5.0)", 2 ); append( sb, "JDK compliance level. Valid values are: 1.4 or 5.0 This parameter will only be taken into consideration if legacyMode is false. IBM didn\'t support this flag in earlier versions.", 3 ); append( sb, "", 0 ); append( sb, "legacyMode (Default: false)", 2 ); append( sb, "Set this to true if you\'ve got an old rational SDP version (7.0.0.4/interimfix 001), or an old WAS base/ND installation (lower than fixpack 007).", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "noInform (Default: false)", 2 ); append( sb, "Set to true to disable informational messages.", 3 ); append( sb, "", 0 ); append( sb, "noValidate (Default: false)", 2 ); append( sb, "Set to true to disable validation messages.", 3 ); append( sb, "", 0 ); append( sb, "noWarnings (Default: false)", 2 ); append( sb, "Set to true to disable warning and informational messages.", 3 ); append( sb, "", 0 ); append( sb, "sqlj", 2 ); append( sb, "Set to true to generate SQL/J persistor code.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "help".equals( goal ) ) { append( sb, "was6:help", 0 ); append( sb, "Display help information on was6-maven-plugin. Call\n\u00a0\u00a0mvn\u00a0was6:help\u00a0-Ddetail=true\u00a0-Dgoal=\nto display parameter details.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "detail (Default: false)", 2 ); append( sb, "If true, display all settable properties for each goal.", 3 ); append( sb, "", 0 ); append( sb, "goal", 2 ); append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 ); append( sb, "", 0 ); append( sb, "lineLength (Default: 80)", 2 ); append( sb, "The maximum length of a display line.", 3 ); append( sb, "", 0 ); append( sb, "indentSize (Default: 2)", 2 ); append( sb, "The number of spaces per indentation level.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "installApp".equals( goal ) ) { append( sb, "was6:installApp", 0 ); append( sb, "Installs an EAR into WebSphere Application Server.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "applicationName (Default: ${project.build.finalName})", 2 ); append( sb, "The name of the application that you wish to administer.", 3 ); append( sb, "", 0 ); append( sb, "conntype (Default: NONE)", 2 ); append( sb, "Specifies the type of connection to be used. Valid values are: SOAP, RMI or NONE.", 3 ); append( sb, "", 0 ); append( sb, "earFile (Default: ${project.artifact.file})", 2 ); append( sb, "EAR archive to deploy.", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "host (Default: localhost)", 2 ); append( sb, "The host to connect to. This will also be used as the keys to lookup userId/password from settings.xml, if not specified in the username and/or password parameter in the plugin.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "password", 2 ); append( sb, "Password to authenticate with. This takes precedence over values defined in settings.xml.", 3 ); append( sb, "", 0 ); append( sb, "port", 2 ); append( sb, "The port on the host to connect to.", 3 ); append( sb, "", 0 ); append( sb, "profile", 2 ); append( sb, "Optional script file to be executed before the main command or file.", 3 ); append( sb, "", 0 ); append( sb, "profileName", 2 ); append( sb, "The profile name of the desired server.", 3 ); append( sb, "", 0 ); append( sb, "properties", 2 ); append( sb, "Optional java properties file containing attributes to set in the JVM System properties", 3 ); append( sb, "", 0 ); append( sb, "targetCell", 2 ); append( sb, "The target cell for deployment.", 3 ); append( sb, "", 0 ); append( sb, "targetCluster", 2 ); append( sb, "Name of target cluster to deploy to.", 3 ); append( sb, "", 0 ); append( sb, "targetNode", 2 ); append( sb, "The target node for deployment.", 3 ); append( sb, "", 0 ); append( sb, "targetServer", 2 ); append( sb, "The target server for deployment.", 3 ); append( sb, "", 0 ); append( sb, "updateExisting (Default: true)", 2 ); append( sb, "Flag for updating existing application or installing a brand new.", 3 ); append( sb, "", 0 ); append( sb, "username", 2 ); append( sb, "user ID to authenticate with. This takes precedence over values defined in settings.xml.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "servicedeploy".equals( goal ) ) { append( sb, "was6:servicedeploy", 0 ); append( sb, "Executes the ServiceDeploy command against an archive file (Ear, Zip or Jar) to produce an ear file that can be deployed on Process Server.\nReference Documentation can be found IBM WebSphere Enterprise Service Bus, Version 6.1, IBM WebSphere Process Server, Version 6.1.\n", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "classPath", 2 ); append( sb, "The classPath attribute is optional and controls which external archives (jar, rar, and zip) should be appended to the classpath. By default, no external archives are used during deployment.", 3 ); append( sb, "", 0 ); append( sb, "clean", 2 ); append( sb, "The clean attribute attribute is optional and is passed to eclipse so that eclipse will regenerate its stored plugin configuration.", 3 ); append( sb, "", 0 ); append( sb, "cleanStagingModules", 2 ); append( sb, "The cleanStagingModules attribute is optional and controls whether imported staging modules should be deleted before running the deployer. By default, imported staging modules are not deleted.", 3 ); append( sb, "", 0 ); append( sb, "debug", 2 ); append( sb, "The file that contains plugin-specific trace enablement settings. The debug attribute is optional and may be used to specify a trace .options file to enable eclipse-based tracing.", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "fileEncoding", 2 ); append( sb, "The fileEncoding attribute is optional and specifies the default file encoding that should be used by eclipse.", 3 ); append( sb, "", 0 ); append( sb, "freeForm", 2 ); append( sb, "The freeForm attribute is optional and controls whether jsp and html files will be copied from the optional j2ee folder of an sca jar file and copied to the generated war file. By default, jsp and html files are not copied into the war file.", 3 ); append( sb, "", 0 ); append( sb, "ignoreErrors", 2 ); append( sb, "The ignoreErrors attribute is optional and controls whether an ear file should be generated despite validation errors. By default, an ear file will not be generated if validation errors were flagged during deployment.", 3 ); append( sb, "", 0 ); append( sb, "javaDebug", 2 ); append( sb, "The file that contains plugin-specific trace enablement settings. The javaDebug attribute is optional and may be used to indicate that all debug information should be included in generated class files.", 3 ); append( sb, "", 0 ); append( sb, "keep", 2 ); append( sb, "The keep attribute is optional and controls whether the generated eclipse workspace should be preserved when the deployer task is complete. By default, the generated eclipse workspace is deleted after deployment.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "noJ2EEDeploy", 2 ); append( sb, "The noJ2EEDeploy attribute is optional and controls whether the J2EE deployers, including ejbDeploy, should be skipped during deployment. The J2EE deployers will execute by default.", 3 ); append( sb, "", 0 ); append( sb, "outputApplication (Default: ${project.artifact.file})", 2 ); append( sb, "The outputApplication attribute is optional and controls the name and location of the generated J2EE ear file. If this attribute is not specified, then the ear file will be named according to the sca module name and will be generated in the location from which the ANT process was launched.", 3 ); append( sb, "", 0 ); append( sb, "progressMonitor (Default: none)", 2 ); append( sb, "The progressMonitor attribute is optional and controls how progress should be displayed to the console. Legal values include none, meter, or message. The default progressMonitor is none.", 3 ); append( sb, "", 0 ); append( sb, "scaModule", 2 ); append( sb, "The scaModule attribute is required and specifies the .jar, .zip or .ear file that contains the application to be deployed. If the command is not issued from the path in which the file resides, this must be the full path for the file. The .zip file can be either a nested archive that contains jars of Libraries or Modules or it can be an Eclipse Project Interchange format file.", 3 ); append( sb, "", 0 ); append( sb, "skipXsdValidate", 2 ); append( sb, "The skipXsdValidate attribute is optional and specifies that the XSD schema validation will be skipped. This parameter is not available in the base product, as it was introduced in a later fixpack as a workaround for various issues.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "vmArgs", 2 ); append( sb, "The vmArgs attribute is optional and may be used to specify jvm arguments for the deploy process. They are space separated.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "wsAdmin".equals( goal ) ) { append( sb, "was6:wsAdmin", 0 ); append( sb, "The wsadmin goal executes the WebSphere command-line administration tool with the specified arguments.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "args", 2 ); append( sb, "Arguments passed to the script.", 3 ); append( sb, "", 0 ); append( sb, "command", 2 ); append( sb, "A single command to be passed to the script processor. Either specify this or script", 3 ); append( sb, "", 0 ); append( sb, "conntype (Default: SOAP)", 2 ); append( sb, "The Default type is SOAP. Valid values are SOAP, RMI, and NONE. NONE means that no server connection is made.", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "host (Default: localhost)", 2 ); append( sb, "The host attribute is optional and only specified if the conntype is specified. It contains the hostname of the machine to connect to", 3 ); append( sb, "", 0 ); append( sb, "jvmMaxMemory (Default: 256M)", 2 ); append( sb, "sets maximum size of the memory for the underlying VM.", 3 ); append( sb, "", 0 ); append( sb, "language", 2 ); append( sb, "The language to be used to interpret scripts. Valid values are: \'jacl\', \'javascript\' or \'jpython\'.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "password", 2 ); append( sb, "Contains the password to authenticate with.", 3 ); append( sb, "", 0 ); append( sb, "port", 2 ); append( sb, "The port on the host to connect to.", 3 ); append( sb, "", 0 ); append( sb, "profile", 2 ); append( sb, "A script file to be executed before the main command or file", 3 ); append( sb, "", 0 ); append( sb, "profileName", 2 ); append( sb, "Name of the server profile to use", 3 ); append( sb, "", 0 ); append( sb, "properties", 2 ); append( sb, "A java properties file containing attributes to set in the JVM System properties", 3 ); append( sb, "", 0 ); append( sb, "script", 2 ); append( sb, "A file containing a set of commands in a file to be passed to the script processor. Either specify this parameter or command", 3 ); append( sb, "", 0 ); append( sb, "user", 2 ); append( sb, "Contains the user ID to authenticate with.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "wsDefaultBindings".equals( goal ) ) { append( sb, "was6:wsDefaultBindings", 0 ); append( sb, "This goal enables you to generate default IBM WebSphere Bindings for the specified EAR file. The goal provides options to control how the bindings are generated and mimics the options provided by the WebSphere Application Install wizards. The goal binds to the package phase by default.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "dbPassword", 2 ); append( sb, "Specifies the password associated with the default data source.", 3 ); append( sb, "", 0 ); append( sb, "dbUser", 2 ); append( sb, "Specifies the user associated with the default data source.", 3 ); append( sb, "", 0 ); append( sb, "defaultConnectionFactory", 2 ); append( sb, "Specifies the default connection factory to be used for all EJB 2.x CMPs.", 3 ); append( sb, "", 0 ); append( sb, "defaultDataSource", 2 ); append( sb, "Specifies an optional default data source JNDI name to be used for all EJB 1.x CMPs.", 3 ); append( sb, "", 0 ); append( sb, "earFile (Default: ${project.artifact.file})", 2 ); append( sb, "EAR archive to generate bindings for.", 3 ); append( sb, "", 0 ); append( sb, "ejbJndiPrefix", 2 ); append( sb, "Specifies a prefix that is prepended to any generated EJB JNDI names. The default is \'ejb\'.", 3 ); append( sb, "", 0 ); append( sb, "exportFile", 2 ); append( sb, "When specified, it points to a file that will be generated containing the bindings information. This file is in the custom strategy format.", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "forceBindings (Default: false)", 2 ); append( sb, "When false, any pre-existing bindings will not be altered. When true, new bindings are completely generated.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "resAuth", 2 ); append( sb, "Specifies the resource authorization on the connection factory for EJB 2.x CMPs.\nLegal values are: PerConnFact or Container", 3 ); append( sb, "", 0 ); append( sb, "strategy", 2 ); append( sb, "When specified, this attribute points to a custom strategy file that further affects the bindings. See the properties/dfltbndngs.dtd of your WebSphere installation for more details.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "virtualHost", 2 ); append( sb, "Specifies the virtual host for all wars in the application.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "wsListApps".equals( goal ) ) { append( sb, "was6:wsListApps", 0 ); append( sb, "Lists all the applications installed on a WebSphere Server or Cell. This goal is a wrapper for the AdminApp.list() command of the wsadmin tool. Refer to the wsadmin documentation for information on this operation.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "conntype", 2 ); append( sb, "Valid values are SOAP, RMI, JMS, and NONE. NONE means that no server connection is made.", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "host", 2 ); append( sb, "The host attribute is optional and only specified if the conntype is specified. It contains the hostname of the machine to connect to.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "password", 2 ); append( sb, "The password to authenticate with.", 3 ); append( sb, "", 0 ); append( sb, "port", 2 ); append( sb, "Only needed if the conntype is specified. It contains the port on the host to connect to.", 3 ); append( sb, "", 0 ); append( sb, "profile", 2 ); append( sb, "A script file to be executed before the main command or file.", 3 ); append( sb, "", 0 ); append( sb, "profileName", 2 ); append( sb, "The name of the server profile to be used.", 3 ); append( sb, "", 0 ); append( sb, "properties", 2 ); append( sb, "properties file containing attributes to set in the JVM System properties.", 3 ); append( sb, "", 0 ); append( sb, "user", 2 ); append( sb, "The user ID to authenticate with.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "wsStartApp".equals( goal ) ) { append( sb, "was6:wsStartApp", 0 ); append( sb, "The wsStartApplication goal enables you to start an existing or newly installed application on a WebSphere Server or in a WebSphere Cell.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "applicationName (Default: ${project.build.finalName})", 2 ); append( sb, "The name of the application that you wish to administer.", 3 ); append( sb, "", 0 ); append( sb, "conntype (Default: NONE)", 2 ); append( sb, "Specifies the type of connection to be used. Valid values are: SOAP, RMI or NONE.", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "host (Default: localhost)", 2 ); append( sb, "The host to connect to. This will also be used as the keys to lookup userId/password from settings.xml, if not specified in the username and/or password parameter in the plugin.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "node", 2 ); append( sb, "Optional parameter specifying the name of the node containing the application you wish to stop.", 3 ); append( sb, "", 0 ); append( sb, "password", 2 ); append( sb, "Password to authenticate with. This takes precedence over values defined in settings.xml.", 3 ); append( sb, "", 0 ); append( sb, "port", 2 ); append( sb, "The port on the host to connect to.", 3 ); append( sb, "", 0 ); append( sb, "profile", 2 ); append( sb, "Optional script file to be executed before the main command or file.", 3 ); append( sb, "", 0 ); append( sb, "profileName", 2 ); append( sb, "The profile name of the desired server.", 3 ); append( sb, "", 0 ); append( sb, "properties", 2 ); append( sb, "Optional java properties file containing attributes to set in the JVM System properties", 3 ); append( sb, "", 0 ); append( sb, "server (Default: server1)", 2 ); append( sb, "Optional parameter specifying the name of the server containing the application you wish to start.", 3 ); append( sb, "", 0 ); append( sb, "username", 2 ); append( sb, "user ID to authenticate with. This takes precedence over values defined in settings.xml.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "wsStartServer".equals( goal ) ) { append( sb, "was6:wsStartServer", 0 ); append( sb, "Starts a standalone server instance. This is not used to start a server controlled by DeploymentManager. Therefore, this goal is useful for the Base Application Server, and to start the Node Agent and/or DeploymentManager. If you wish to start a server managed by the Deployment Manager, use the wsadmin task to execute a scripting command.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Specifies the name of the file to log the server start information to. If none is specified maven default will be used.", 3 ); append( sb, "", 0 ); append( sb, "noWait (Default: false)", 2 ); append( sb, "If true, the task with return immediately without waiting for the server to start.", 3 ); append( sb, "", 0 ); append( sb, "password", 2 ); append( sb, "Optional. Specifies the password of the admin user to authenticate with for administrative access.", 3 ); append( sb, "", 0 ); append( sb, "profileName", 2 ); append( sb, "The profile name of the desired server.", 3 ); append( sb, "", 0 ); append( sb, "quiet (Default: false)", 2 ); append( sb, "If true, the task will not print any status information.", 3 ); append( sb, "", 0 ); append( sb, "replaceLog (Default: false)", 2 ); append( sb, "If true, the task with erase an existing log file, instead of appending", 3 ); append( sb, "", 0 ); append( sb, "script", 2 ); append( sb, "Specifies the name of a optional script file to execute during server startup.", 3 ); append( sb, "", 0 ); append( sb, "server (Default: server1)", 2 ); append( sb, "Name of the server to start.", 3 ); append( sb, "", 0 ); append( sb, "statusPort", 2 ); append( sb, "Optional. Specifies the TCP Port the server should send status messages to.", 3 ); append( sb, "", 0 ); append( sb, "timeout", 2 ); append( sb, "Optional. Wait the specified the amount of time in seconds to wait for the server to successfully start.", 3 ); append( sb, "", 0 ); append( sb, "trace (Default: false)", 2 ); append( sb, "If true, the task with print trace information.", 3 ); append( sb, "", 0 ); append( sb, "username", 2 ); append( sb, "Optional. Specifies the id of the admin user to authenticate with for administrative access.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "wsStopApp".equals( goal ) ) { append( sb, "was6:wsStopApp", 0 ); append( sb, "The wsStopApp goal enables you to stop an existing or newly installed application on a WebSphere Server or in a WebSphere Cell. This goal is a wrapper for the ApplicationManager.stopApplication() command of the wsadmin tool. Refer to the wsadmin documentation for information on this operation.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "applicationName (Default: ${project.build.finalName})", 2 ); append( sb, "The name of the application that you wish to administer.", 3 ); append( sb, "", 0 ); append( sb, "conntype (Default: NONE)", 2 ); append( sb, "Specifies the type of connection to be used. Valid values are: SOAP, RMI or NONE.", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "host (Default: localhost)", 2 ); append( sb, "The host to connect to. This will also be used as the keys to lookup userId/password from settings.xml, if not specified in the username and/or password parameter in the plugin.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "node", 2 ); append( sb, "Optional parameter specifying the name of the node containing the application you wish to stop.", 3 ); append( sb, "", 0 ); append( sb, "password", 2 ); append( sb, "Password to authenticate with. This takes precedence over values defined in settings.xml.", 3 ); append( sb, "", 0 ); append( sb, "port", 2 ); append( sb, "The port on the host to connect to.", 3 ); append( sb, "", 0 ); append( sb, "profile", 2 ); append( sb, "Optional script file to be executed before the main command or file.", 3 ); append( sb, "", 0 ); append( sb, "profileName", 2 ); append( sb, "The profile name of the desired server.", 3 ); append( sb, "", 0 ); append( sb, "properties", 2 ); append( sb, "Optional java properties file containing attributes to set in the JVM System properties", 3 ); append( sb, "", 0 ); append( sb, "server (Default: server1)", 2 ); append( sb, "Optional parameter specifying the name of the server containing the application you wish to stop.", 3 ); append( sb, "", 0 ); append( sb, "username", 2 ); append( sb, "user ID to authenticate with. This takes precedence over values defined in settings.xml.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "wsStopServer".equals( goal ) ) { append( sb, "was6:wsStopServer", 0 ); append( sb, "This goal enables you to stop a standalone server instance. This is not used to stop a server controlled by DeploymentManager. Therefore, this task is useful for the Base Application Server, and to stop the Node Agent and/or DeploymentManager. If you wish to stop a server managed by the Deployment Manager, use the wsadmin task to execute a scripting command.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "conntype (Default: SOAP)", 2 ); append( sb, "Specifies the type of connection to be used. Valid values are: SOAP or RMI", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Specifies the name of the file to log the server start information to. If none is specified maven default will be used.", 3 ); append( sb, "", 0 ); append( sb, "noWait (Default: false)", 2 ); append( sb, "If true, the task with return immediately without waiting for the server to start.", 3 ); append( sb, "", 0 ); append( sb, "password", 2 ); append( sb, "Optional. Specifies the password of the admin user to authenticate with for administrative access.", 3 ); append( sb, "", 0 ); append( sb, "port", 2 ); append( sb, "Admin port of the server you wish to stop.", 3 ); append( sb, "", 0 ); append( sb, "profileName", 2 ); append( sb, "The profile name of the desired server.", 3 ); append( sb, "", 0 ); append( sb, "quiet (Default: false)", 2 ); append( sb, "If true, the task will not print any status information.", 3 ); append( sb, "", 0 ); append( sb, "replaceLog (Default: false)", 2 ); append( sb, "If true, the task with erase an existing log file, instead of appending", 3 ); append( sb, "", 0 ); append( sb, "server (Default: server1)", 2 ); append( sb, "Name of the server to start.", 3 ); append( sb, "", 0 ); append( sb, "statusPort", 2 ); append( sb, "Optional. Specifies the TCP Port the server should send status messages to.", 3 ); append( sb, "", 0 ); append( sb, "timeout", 2 ); append( sb, "Optional. Wait the specified the amount of time in seconds to wait for the server to successfully start.", 3 ); append( sb, "", 0 ); append( sb, "trace (Default: false)", 2 ); append( sb, "If true, the task with print trace information.", 3 ); append( sb, "", 0 ); append( sb, "username", 2 ); append( sb, "Optional. Specifies the id of the admin user to authenticate with for administrative access.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( goal == null || goal.length() <= 0 || "wsUninstallApp".equals( goal ) ) { append( sb, "was6:wsUninstallApp", 0 ); append( sb, "Enables you to uninstall an existing application from a WebSphere Server or Cell. This goal builds upon the wsadmin task and shares many of the same attributes. This task is a wrapper for the AdminApp.uninstall() command of the wsadmin tool.", 1 ); append( sb, "", 0 ); if ( detail ) { append( sb, "Available parameters:", 1 ); append( sb, "", 0 ); append( sb, "applicationName (Default: ${project.build.finalName})", 2 ); append( sb, "The name of the application that you wish to administer.", 3 ); append( sb, "", 0 ); append( sb, "conntype (Default: NONE)", 2 ); append( sb, "Specifies the type of connection to be used. Valid values are: SOAP, RMI or NONE.", 3 ); append( sb, "", 0 ); append( sb, "failOnError (Default: true)", 2 ); append( sb, "Fail build on errors.", 3 ); append( sb, "", 0 ); append( sb, "host (Default: localhost)", 2 ); append( sb, "The host to connect to. This will also be used as the keys to lookup userId/password from settings.xml, if not specified in the username and/or password parameter in the plugin.", 3 ); append( sb, "", 0 ); append( sb, "logFile", 2 ); append( sb, "Optional log file to log execution of ws_ant to.", 3 ); append( sb, "", 0 ); append( sb, "password", 2 ); append( sb, "Password to authenticate with. This takes precedence over values defined in settings.xml.", 3 ); append( sb, "", 0 ); append( sb, "port", 2 ); append( sb, "The port on the host to connect to.", 3 ); append( sb, "", 0 ); append( sb, "profile", 2 ); append( sb, "Optional script file to be executed before the main command or file.", 3 ); append( sb, "", 0 ); append( sb, "profileName", 2 ); append( sb, "The profile name of the desired server.", 3 ); append( sb, "", 0 ); append( sb, "properties", 2 ); append( sb, "Optional java properties file containing attributes to set in the JVM System properties", 3 ); append( sb, "", 0 ); append( sb, "username", 2 ); append( sb, "user ID to authenticate with. This takes precedence over values defined in settings.xml.", 3 ); append( sb, "", 0 ); append( sb, "verbose (Default: false)", 2 ); append( sb, "Specifies a verbose execution to help debug.", 3 ); append( sb, "", 0 ); append( sb, "wasHome (Default: ${env.WAS_HOME})", 2 ); append( sb, "Root install location of WebSphere 6.1", 3 ); append( sb, "", 0 ); append( sb, "workingDirectory", 2 ); append( sb, "Working directory for plugin.", 3 ); append( sb, "", 0 ); } } if ( getLog().isInfoEnabled() ) { getLog().info( sb.toString() ); } } /** *

Repeat a String n times to form a new string.

* * @param str String to repeat * @param repeat number of times to repeat str * @return String with repeated String * @throws NegativeArraySizeException if repeat < 0 * @throws NullPointerException if str is null */ private static String repeat( String str, int repeat ) { StringBuffer buffer = new StringBuffer( repeat * str.length() ); for ( int i = 0; i < repeat; i++ ) { buffer.append( str ); } return buffer.toString(); } private void append( StringBuffer sb, String description, int indent ) { for ( Iterator it = toLines( description, indent ).iterator(); it.hasNext(); ) { sb.append( it.next().toString() ).append( '\n' ); } } /** * Splits the specified text into lines of convenient display length. * * @param text The text to split into lines, must not be null. * @param indent The base indentation level of each line, must not be negative. * @return The sequence of display lines, never null. */ private List toLines( String text, int indent ) { List lines = new ArrayList(); String ind = repeat( "\t", indent ); String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" ); for ( int i = 0; i < plainLines.length; i++ ) { toLines( lines, ind + plainLines[i] ); } return lines; } /** * Adds the specified line to the output sequence, performing line wrapping if necessary. * * @param lines The sequence of display lines, must not be null. * @param line The line to add, must not be null. */ private void toLines( List lines, String line ) { int lineIndent = getIndentLevel( line ); StringBuffer buf = new StringBuffer( 256 ); String[] tokens = line.split( " +" ); for ( int i = 0; i < tokens.length; i++ ) { String token = tokens[i]; if ( i > 0 ) { if ( buf.length() + token.length() >= lineLength ) { lines.add( buf.toString() ); buf.setLength( 0 ); buf.append( repeat( " ", lineIndent * indentSize ) ); } else { buf.append( ' ' ); } } for ( int j = 0; j < token.length(); j++ ) { char c = token.charAt( j ); if ( c == '\t' ) { buf.append( repeat( " ", indentSize - buf.length() % indentSize ) ); } else if ( c == '\u00A0' ) { buf.append( ' ' ); } else { buf.append( c ); } } } lines.add( buf.toString() ); } /** * Gets the indentation level of the specified line. * * @param line The line whose indentation level should be retrieved, must not be null. * @return The indentation level of the line. */ private static int getIndentLevel( String line ) { int level = 0; for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ ) { level++; } for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ ) { if ( line.charAt( i ) == '\t' ) { level++; break; } } return level; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy