You can use the rapid deployment configuration tool (wrd-config.bat
or wrd-config.sh) from a command line to configure rapid deployment
projects, such as free-form or automatic installation projects. The wrd-config command
is run in a non-graphical command-line interface.
Before using the wrd-config command, you need to set up
a workspace environment variable. For more information, see the related
task about setting up a rapid deployment
environment. After you have set up your command line, you can
use the following syntax and arguments to run the tool.
Syntax
wrd-config.bat -project <"project_name"> -style <"freeform"|"autoappinstall">
[<optional parameters>]
wrd-config.sh -project <"project_name"> -style <"freeform"|"autoappinstall">
[<optional parameters>]
Mandatory parameters:
- -project <"project_name">
- The name of the rapid deployment project that you want to create.
The project name needs to be unique in your workspace.
- -style <"freeform"|"autoappinstall">
- The deployment approach – either the free-form or automatic application
installation project is used as the deployment style.
The free-form
project ("freeform") allows you to create or
drop in your J2EE artifacts (such as servlet source, JSP, static Web
content, EJB classes or source files, Java class
files, and all other generic files) into the free-form project. These
resources are automatically placed in the appropriate location in
the J2EE project structure.
The automatic installation project
("autoappinstall") creates a single project
that listens for fully composed EAR or module files. If EAR files
are placed inside this project, the EAR file is automatically deployed
to the server. If the EAR file is deleted, then that application is
uninstalled from the server. If you place WAR or EJB jar files in
an automatic installation project, the rapid deployment tool generates
the necessary EAR wrapper and then publishes that EAR file on the
server. For RAR files, a wrapper is not created. The standalone RAR
files are published to the server.
Optional parameters:
- -rebuild
- Cleans and rebuilds the contents of the rapid deployment project.
- -configure
- Opens an interactive console session to modify any available parameters.
- -runtime <"was60" | "was61"|
"was70">
- After you specify the target runtime, the application
configures the JRE library, based on the runtime location, and configures
the project's classpath to contain the WebSphere runtime libraries. Specify as
an identifier if either WebSphere Application
Server v6.0 ("was60"), WebSphere Application Server v6.1 ("was61",
or WebSphere Application
Server v7.0 ("was70") is used as the target
runtime environment for rapid deployment processing. If this parameter
is not specified, the default setting is WebSphere Application Server v7.0. This
parameter is only used with -runtimePath parameter.
- -runtimePath <"x:\WebSphere\AppServer">
- Where x:\WebSphere\AppServer is the directory
where WebSphere Application
Server is installed. This runtimePath parameter specifies the directory
path to where the target runtime is installed and is used with -runtime parameter.
- -j2eeVersion <"1.3"|"1.4">
- Specifies either J2EE version 1.3 or 1.4 is used for development
and deployment. If this j2eeVersion parameter is not specified, the
default setting is J2EE version 1.4.
- -profileName <newTargetProfileName>
- Where the newTargetProfileName is
the name of a profile for the WebSphere Application
Server runtime environment. The -profileName parameter
should only be used when the rapid deployment configuration tool is
publishing to a local WebSphere Application
Server when specifying the host name as localhost. If the -profileName parameter
is not specified, the rapid deployment configuration tool by default
publishes your application artifacts to the profile assigned the default
role in the WebSphere Application
Server v7.0, for example AppSrv01. Use this -profileName parameter
if you want to switch to a different profile assigned with a non-default
role for publishing your application artifacts.
If the
newTargetProfileName is
a profile at a WebSphere Application
Server v6.1 release, you must specify the -
runtime and
-
runtimePath parameters. The -
runtimePath parameter
must specify a path to the WebSphere Application
Server v6.1 libraries used for compiling your application. Here is
a command-line example to switch to a non-default profile using a WebSphere Application Server
v6.1 runtime environment:
WRD-config.bat -project "MyProject" -style "freeform" -runtime was61 -runtimePath "c:\WebSphere\AppServer61" -profileName AppSrv02
If
the
newTargetProfileName is a profile at a WebSphere Application Server v7.0 release,
you are not required to specify the -
runtime and
-
runtimePath parameters because the rapid deployment
configuration tool is already running from a WebSphere Application Server v7.0 runtime
environment. Here is the command-line example to switch to a non-default
profile from a WebSphere Application
Server v7.0 runtime environment:
WRD-config.bat -project "MyProject" -style "freeform" -profileName AppSrv02
- -configPath "x:\filename.xml"
- The destination file path for the configuration file, where x is
the temporary directory. This file persists the configuration data
to an XML file, which can later be used to drive other rapid deployment
configuration sessions. If this path is not specified, the default
location is in the root of the rapid deployment workspace.
- -configData "x:\filename.xml"
- The path of an existing XML configuration file that is used to
direct the configuration session. If this path is not specified, an
XML configuration file is created at a default location. This default
location depends on which version of the WebSphere Application Server you are using
to issue the wrd-config command:
- For WebSphere Application
Server v6.0, the default location is in the root of the rapid
deployment workspace. The XML configuration file has the following
file naming convention projectName_headlessconfig.xml,
where projectName is the value specified in the -project parameter.
For example, if the environment variable called WORKSPACE is set
to c:\configData and the value specified in
the -project parameter is MyProject,
the full file path to the XML configuration file at the default location
is: c:\configData\MyProject_headlessconfig.xml
- For WebSphere Application
Server v6.1 and v7.0, the default location of the XML configuration
file is in the x:/projectName directory, where x:/ is
the directory of the rapid deployment workspace and projectName is
the value specified in the -project parameter.
For example, if the environment variable called WORKSPACE is set
to c:\configData and the value specified in
the -project parameter is MyProject,
the full file path to the XML configuration file at its default location
is: c:\configData\MyProject\.wrdconfig.xml
- -listStyles
- The available deployment styles and their descriptions.
- -listServers
- The available runtime server targets.
- -properties
- Lists the properties for a given deployment project. This parameter
is only used with -project.
- -buildMode
- Specify to disable all console outputs. You find this useful for
silent builds.
- -usage
- Displays the optional and required parameters for this command.
Examples of running the WRD-config command
To
create a new free-form project:
WRD-config.bat -project "MyProject" -style "freeform" -runtime "was61" -runtimePath "c:\WebSphere\AppServer"
To
create a new automatic application installation project:
WRD-config.bat -project "MyProject" -style "autoappinstall"
To
persist configuration data to an XML file:
For WebSphere Application Server v6.0:
WRD-config.bat -project "MyProject" -style "freeform" -runtime "was60" -runtimePath "c:\WebSphere\AppServer" -configPath "c:\configData\MyPreference_headlessconfig.xml"
For WebSphere Application Server v6.1:
WRD-config.bat -project "MyProject" -style "freeform" -runtime "was61" -runtimePath "c:\WebSphere\AppServer" -configPath "c:\configData\MyProject\MyPreference.wrdconfig.xml"
For WebSphere Application Server v7.0:
WRD-config.bat -project "MyProject" -style "freeform" -runtime "was70" -runtimePath "c:\WebSphere\AppServer" -configPath "c:\configData\MyProject\MyPreference.wrdconfig.xml"
To create a new rapid deployment project using
an existing XML configuration file:
For WebSphere Application Server v6.0:
WRD-config.bat -configData "c:\configData\MyProject_headlessconfig.xml"
For WebSphere Application Server v6.1 and v7.0:
WRD-config.bat -configData "c:\configData\MyProject\.wrdconfig.xml"
To
clean and rebuild an existing rapid deployment project:
WRD-config.bat -project "MyProject" -rebuild
To
modify available deployment parameters:
WRD-config.bat -project "MyProject" -configure
To
query properties of an existing rapid deployment project:
WRD-config.bat -project "MyProject" -properties
To
query available rapid deployment styles and runtime targets:
WRD-config.bat -listStyles -listServers