geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v2.1 > Tools and commands
Date Tue, 23 Nov 2010 03:13:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=GMOxDOC21&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC21/Tools+and+commands">Tools
and commands</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~maojia508">maojia</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >* &lt;keyAlias1EncryptedPassword&gt;,
&lt;keyAlias2EncryptedPassword&gt; are the encrypted passwords for the private keys,
which can also be generated by using the encrypt command. <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">Alternatively,
you can create a key file to contain the password of the keystore and its private keys. Use
{{org.apache.geronimo.keyStoreTrustStorePasswordFile}} property to specify the key file. See
[Configuring SSL client authentication|Configuring SSL client authentication] for more detailed
instructions.  <br> <br> <br></td></tr>
            <tr><td class="diff-unchanged" >Examples: <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p><a name="Toolsandcommands-top"></a></p>

<p>Apache Geronimo provides several tools for administering the server. These tools
are available via command line and some via a Web based console. The Web based Geronimo console
is explained in detail in the following section <a href="/confluence/display/GMOxDOC21/Geronimo+Administration+Console"
title="Geronimo Administration Console">Geronimo Administration Console</a>. The
currently available command line tools are located in the <b>&lt;geronimo_home&gt;/bin</b>
directory and are enumerated in the following list:</p>
<div>
<ul>
    <li><a href='#Toolsandcommands-geronimo'>geronimo</a></li>
    <li><a href='#Toolsandcommands-startup'>startup</a></li>
    <li><a href='#Toolsandcommands-shutdown'>shutdown</a></li>
    <li><a href='#Toolsandcommands-deploy'>deploy</a></li>
<ul>
    <li><a href='#Toolsandcommands-Generaloptions'>General options</a></li>
    <li><a href='#Toolsandcommands-Security'>Security</a></li>
    <li><a href='#Toolsandcommands-Commands'>Commands</a></li>
<ul>
    <li><a href='#Toolsandcommands-Deploy'>Deploy</a></li>
    <li><a href='#Toolsandcommands-Login'>Login</a></li>
    <li><a href='#Toolsandcommands-Redeploy'>Redeploy</a></li>
    <li><a href='#Toolsandcommands-Start'>Start</a></li>
    <li><a href='#Toolsandcommands-Stop'>Stop</a></li>
    <li><a href='#Toolsandcommands-Undeploy'>Undeploy</a></li>
    <li><a href='#Toolsandcommands-Distribute'>Distribute</a></li>
    <li><a href='#Toolsandcommands-Encrypt'>Encrypt</a></li>
    <li><a href='#Toolsandcommands-Installlibrary'>Install-library</a></li>
    <li><a href='#Toolsandcommands-Listmodules'>List-modules</a></li>
    <li><a href='#Toolsandcommands-Listtargets'>List-targets</a></li>
    <li><a href='#Toolsandcommands-UnlockKeystore'>UnlockKeystore</a></li>
    <li><a href='#Toolsandcommands-Installplugin'>Install-plugin</a></li>
    <li><a href='#Toolsandcommands-Searchplugins'>Search-plugins</a></li>
</ul>
</ul>
    <li><a href='#Toolsandcommands-client'>client</a></li>
    <li><a href='#Toolsandcommands-jaxwstools'>jaxws-tools</a></li>
<ul>
    <li><a href='#Toolsandcommands-wsgen'>wsgen</a></li>
    <li><a href='#Toolsandcommands-wsimport'>wsimport</a></li>
</ul>
</ul></div>
<p>Although the tools name is self-explanatory, it may not be the same case with the
tool's parameters. The following sections explain more in detail these tools and commands
usage.</p>

<h1><a name="Toolsandcommands-geronimo"></a>geronimo</h1>

<p>The <b>geronimo</b> command lets you perform two actions, that is start
and stop the server in different modes depending on the parameters you specify. This command
has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/geronimo [</b><b><em>options</em></b><b>]</b></tt></p>

<p>The available options are:</p>

<p><b>debug</b><br/>
This option will start the server in <b>JDB</b> debugger.</p>

<p><b>jpda run</b><br/>
This option will start the server in foreground under JPDA debugger</p>

<p><b>jpda start</b><br/>
This option will start the server in background under JPDA debugger.</p>

<p><b>run</b><br/>
This option will start the server in the current window.</p>

<p><b>start</b><br/>
This option will start the server in a separate window just like the startup command.</p>

<p><b>stop</b><br/>
This option will stop the server.</p>

<p>Both <b>start</b> and <b>stop</b> options for this command
will have the same set of parameters as the startup and shutdown commands.</p>

<h1><a name="Toolsandcommands-startup"></a>startup</h1>

<p>The <b>startup</b> command starts the Apache Geronimo server. This command
has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/startup &lt;options&gt;</b></tt></p>

<p>The available options are:</p>

<p><b>&#45;-quiet</b><br/>
Suppress the normal startup progress bar. This is typically used when redirecting console
output to a file, or starting the server from an IDE or other tool.</p>

<p><b>&#45;-long</b><br/>
Write startup progress to the console in a format that is suitable for redirecting console
output to a file, or starting the server from an IDE or other tool (does not use linefeeds
to update the progress information that is used by default if you do not specify &#45;-quiet
or &#45;-long).</p>

<p><b>&#45;v &#45;-verbose</b><br/>
Sets the console log level to <b>INFO</b>, resulting in more console output than
is normally present.</p>

<p><b>&#45;vv &#45;-veryverbose</b><br/>
Sets the console log level to <b>DEBUG</b>, resulting in even more console output.</p>

<p><b>&#45;override [</b><b><em>configId</em></b><b>]</b><br/>
Overrides the configurations in <b>&lt;geronimo_home&gt;/var/config.xml</b>
such that only the configurations listed on the command line will be started. Note that many
J2EE<br/>
features depend on certain configs being started, so you should be very careful what you omit.
Any arguments after <b>&#45;override</b> are assumed to be configuration names.</p>

<p>The <b>startup</b> command can also be started by using the <b>java
&#45;jar</b> command:</p>

<p><tt><b>java &#45;Djava.endorsed.dirs=lib/endorsed &#45;javaagent:bin/jpa.jar
&#45;jar bin/server.jar &lt;options&gt;</b></tt></p>

<h1><a name="Toolsandcommands-shutdown"></a>shutdown</h1>

<p>The <b>shutdown</b> command stops the Apache Geronimo server. This command
has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/shutdown [</b><b><em>options</em></b><b>]</b></tt></p>

<p>The available options are:</p>

<p><b>&#45;-user [</b><b><em>user_name</em></b><b>]</b><br/>
Specifies the user name with the authority to stop the server. By default you would normally
use <b>system</b> as the user name.</p>

<p><b>&#45;-password [</b><b><em>password</em></b><b>]</b><br/>
Specifies the password for the user name you just entered. By default you would normally use
<b>manager</b> as the password.</p>

<p><b>&#45;-port [</b><b><em>port_number</em></b><b>]</b><br/>
Specifies the RMI naming port to connect to the server (for example JMX connection port).
By default port <b>1099</b> is used.</p>

<p><b>&#45;-host [</b><b><em>host_name</em></b><b>]</b><br/>
Specifies the host name of the server you are trying to stop. By default <b>localhost</b>
is used. <em>This parameter is only available in Geronimo 2.1.3 and greater.</em></p>

<p><b>&#45;-secure</b><br/>
Use secure channel to communicate with JMX server, see <a href="#Toolsandcommands-Security">Security</a>
for details. <em>This parameter is only available in Geronimo 2.1.3 and greater.</em></p>

<p>If you do not specify any parameters, this command will prompt you for a user name
and password and will connect to port 1099 on localhost.</p>

<p>The <b>shutdown</b> command can also be started by using the <b>java
&#45;jar</b> command:</p>

<p><tt><b>java &#45;Djava.endorsed.dirs=lib/endorsed &#45;jar bin/shutdown.jar
&lt;options&gt;</b></tt></p>

<h1><a name="Toolsandcommands-deploy"></a>deploy</h1>

<p>The <b>deploy</b> command is used for installing, uninstalling, reinstalling,
starting and stopping applications and modules and for installing and uninstalling configurations
(for example some configuration specific deployment plans, security realms, database connection
pools etc.)</p>

<p>This command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
&lt;command&gt; &lt;command_options&gt;</b></tt></p>

<p>where <b>&lt;general_options&gt;</b> specify common options that
apply to all commands and control how the application behaves, <b>&lt;command&gt;</b>
is a command name that specifies the action to be performed, and <b>&lt;command_options&gt;</b>
are options unique to the command specified.</p>

<p>The <b>deploy</b> command can also be started by using the <b>java
&#45;jar</b> command:</p>

<p><tt><b>java &#45;Djava.endorsed.dirs=lib/endorsed &#45;jar bin/deployer.jar
&lt;general_options&gt; &lt;command&gt; &lt;command_options&gt;</b></tt></p>

<h2><a name="Toolsandcommands-Generaloptions"></a>General options</h2>

<p>This section lists all the available general options for the Geronimo deployer tool.</p>
<ul>
	<li><b>&#45;-uri</b> &lt;identifier&gt;<br/>
Where &lt;identifier&gt; is a Universal Resource Identifier (URI) that specifies how
the deployer is to contact the server. If this flag is not specified, the deployer will attempt
to contact the server using the standard port on localhost. The identifier must have the following
form:<br/>
deployer:geronimo:jmx:rmi:///jndi/rmi:[//host[:port]]/JMXConnector<br/>
where &lt;host&gt; is replaced with the host name or TCP/IP address of the system
where the server is running and &lt;port&gt; is replaced with the port number where
the server is listening. If unspecified, localhost and the default port will be used.</li>
</ul>


<ul>
	<li><b>&#45;-host</b> &lt;host&gt;<br/>
Where &lt;host&gt; is the host name of the server you are trying to deploy that application
or resource. This option allows you to deploy resources and applications to a remote server.
This parameter is optional and defaults to localhost.</li>
</ul>


<ul>
	<li><b>&#45;-port</b> &lt;port&gt;<br/>
Where &lt;port&gt; is the port of the remote server you are trying to deploy that
application or resource. This parameter is optional and defaults to port 1099.</li>
</ul>


<ul>
	<li><b>&#45;-driver</b> &lt;driver_path&gt;<br/>
Where &lt;driver_path&gt; is the path to the driver JAR if you want to use this tool
with a server other than Geronimo. Currently, manifest Class-Path entries in that JAR are
ignored.</li>
</ul>


<ul>
	<li><b>&#45;-user</b> &lt;username&gt;<br/>
Where &lt;username&gt; is a user name authorized to be an administrator on the server.
If the command requires authorization, you must use this option.</li>
</ul>


<ul>
	<li><b>&#45;-password</b> &lt;password&gt;<br/>
Where &lt;password&gt; is a the password required to authenticate the user name. If
this flag is not specified, the deployer will attempt to perform the command with no password,
but if that fails, it will prompt you to enter a password.</li>
</ul>


<ul>
	<li><b>&#45;-secure</b><br/>
Use secure channel to communicate with JMX server, see <a href="#Toolsandcommands-Security">Security</a>
for details. <em>This parameter is only available in Geronimo 2.1.2 or greater.</em></li>
</ul>


<ul>
	<li><b>&#45;-syserr</b> &lt;select&gt;<br/>
Where &lt;select&gt; can be either true or false. If this flag is unspecified. false
is assumed. Specify true when you want errors to be logged to the syserr device.</li>
</ul>


<ul>
	<li><b>&#45;-verbose</b> &lt;select&gt;<br/>
Where &lt;select&gt; can be either true or false. If this flag is unspecified. false
is assumed. Specify true when you need more messages to determine the cause of an error.</li>
</ul>


<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h2><a name="Toolsandcommands-Security"></a>Security</h2>

<p>Starting with Geronimo 2.1.2, the deployer tool can use a secure channel (SSL/TLS)
to communicate with the JMX server to perform the given actions. To enable secure communication
just add the <b>&#45;-secure</b> option. Depending on your configuration you
might also need to specify some Java security properties to configure the JVM to use the right
keystores and passwords. For example, on a default Geronimo installation you might need to
set the following (all in one line):</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
export JAVA_OPTS="-Djavax.net.ssl.keyStore=&lt;geronimo_home&gt;/<span class="code-keyword">var</span>/security/keystores/geronimo-<span
class="code-keyword">default</span> -Djavax.net.ssl.keyStorePassword=secret \
  -Djavax.net.ssl.trustStore=&lt;geronimo_home&gt;/<span class="code-keyword">var</span>/security/keystores/geronimo-<span
class="code-keyword">default</span> -Djavax.net.ssl.trustStorePassword=secret"
</pre>
</div></div>

<p>Once that property is set, you can execute the following command (just as an example):</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;geronimo_home&gt;/bin/deploy -u system -p manager --secure list-modules
</pre>
</div></div>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>The secure JMX server might not
be running by default. Please see <a href="/confluence/display/GMOxDOC21/Configure+secure+JMX+server"
title="Configure secure JMX server">Configure secure JMX server</a> for more information.</td></tr></table></div>
<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h2><a name="Toolsandcommands-Commands"></a>Commands</h2>

<p>The available commands for the Geronimo deployer tool are listed below:</p>
<ul>
	<li>Common commands
	<ul>
		<li><a href="#Toolsandcommands-Deploy">Deploy</a></li>
		<li><a href="#Toolsandcommands-Login">Login</a></li>
		<li><a href="#Toolsandcommands-Redeploy">Redeploy</a></li>
		<li><a href="#Toolsandcommands-Start">Start</a></li>
		<li><a href="#Toolsandcommands-Stop">Stop</a></li>
		<li><a href="#Toolsandcommands-Undeploy">Undeploy</a></li>
	</ul>
	</li>
	<li>Other commands
	<ul>
		<li><a href="#Toolsandcommands-Distribute">Distribute</a></li>
		<li><a href="#Toolsandcommands-Encrypt">Encrypt</a></li>
		<li><a href="#Toolsandcommands-Installlibrary">Install-library</a></li>
		<li><a href="#Toolsandcommands-Listmodules">List-modules</a></li>
		<li><a href="#Toolsandcommands-Listtargets">List-targets</a></li>
		<li><a href="#Toolsandcommands-UnlockKeystore">UnlockKeystore</a></li>
	</ul>
	</li>
	<li>Geronimo Plugins
	<ul>
		<li><a href="#Toolsandcommands-Installplugin">Install-plugin</a></li>
		<li><a href="#Toolsandcommands-Searchplugins">Search-plugins</a></li>
	</ul>
	</li>
</ul>


<p>Additionally, you can type <b>help</b> for further details on a given
command, the syntax is as follows:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy help &lt;command&gt;</b></tt></p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Deploy"></a>Deploy</h3>

<p>Use the <b>deploy</b> command to add and start a new module. The deploy
command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
deploy &lt;module&gt; &lt;deployment_plan&gt;</b></tt></p>

<p>The &lt;module&gt; specifies the application file name and location. The
&lt;deployment_plan&gt; specifies the file name and location of the XML with the deployment
plan. Sometimes the application module already has included in the package a deployment plan
or the application is so simple that does not require any deployment plan, in these cases
this parameter can be omited.</p>

<p>A module file can be one of the following:</p>
<ul>
	<li>J2EE Enterprise Application Archive (EAR) file</li>
	<li>J2EE Web Application Archive (WAR) file</li>
	<li>J2EE Enterprise JavaBean Archive (JAR) file</li>
	<li>J2EE Java Resource Archive (RAR) file</li>
</ul>


<p>If the server is not currently running at the time of deploying the application,
the module will be marked to start next time the server is started.</p>

<p>The most common &lt;general_options&gt; would be &#45;-user and &#45;-password.
The <b>&#45;-inPlace</b> option allows you point to and deploy an application
directly from a directory external to Geornimo without the need for even packaging the application.
In other words, you can have an application <b>running</b> in Geronimo but that
application may be anywhere else on the file system.</p>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>Please note that the <b>&#45;-inPlace</b>
option cannot be used when deploying an application to a remote server.</td></tr></table></div>

<p>To use this option you should type:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
deploy &#45;-inPlace &lt;app_home&gt;</b></tt></p>

<p>Where &lt;app_home&gt; indicates the home directory where you have your application
(exploded).</p>

<p>You can also deploy applications if Geronimo is not running by using the <b>&#45;-offline</b>
option, the syntax for this command would be:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
&#45;-offline deploy &lt;module&gt;</b></tt></p>

<p>Off course, you can also combine &#45;-offline and &#45;-inPlace</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
&#45;-offline deploy &#45;-inPlace &lt;app_home&gt;</b></tt></p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Login"></a>Login</h3>

<p>Use the <b>login</b> command to save the username and password for the
current connection to the file <tt><b>.geronimo-deployer</b></tt>
in the current user's home directory. Future connections to the same server will try to use
this saved authentication information instead of prompting where possible.</p>

<p>This information will be saved separately per connection URL, so you can specify
&#45;-url or &#45;-host and/or &#45;-port on the command line to save a login
to a different server.</p>

<p>The <b>login</b> command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &#45;-user &lt;user_name&gt;
&#45;-password &lt;password&gt; login</b></tt></p>

<p>So, next time you run a different command that originally required user name and
password, you can run the command directly, for example:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy list-modules</b></tt></p>

<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td>Even when the login
information is not saved in clear text, it is not secure either. If you want to save the authentication
securely, you should change the <tt><b>.geronimo-deployer</b></tt>
file in your home directory so that nobody else can read or write it.</td></tr></table></div>
<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Redeploy"></a>Redeploy</h3>

<p>Use the <b>redeploy</b> command to stop, replace and restart a module
that has been deployed before. The redeploy command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
redeploy &lt;--targets target&gt; &lt;module&gt; &lt;deployment_plan&gt;</b></tt></p>

<p>Just like the <a href="#Toolsandcommands-Deploy">deploy command</a>,
the redeploy command accepts the following modules file types:</p>
<ul>
	<li>J2EE Enterprise Application Archive (EAR) file</li>
	<li>J2EE Web Application Archive (WAR) file</li>
	<li>J2EE Enterprise JavaBean Archive (JAR) file</li>
	<li>J2EE Java Resource Archive (RAR) file</li>
</ul>


<p>Typically, both a module and a plan are specified. If the module contains a plan
or if a default plan can be used, the plan can be omitted. However, if a plan is specified
in this case, it overrides the other plans. If the plan references a server component already
deployed in the server's environment, the module is omitted. you can use <b>--targets</b>
option only for clustering redeployment. For clustering redeployment you can find the target
with <b>list-targets</b> command. Copy the one with the name as MasterConfigurationStore
and use it as a target variable.</p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Start"></a>Start</h3>

<p>Use the <b>start</b> command to start a previously deployed module. The
start command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
start &lt;moduleIDs&gt;</b></tt></p>

<p>Where &lt;moduleIDs&gt; is a list of one or more modules (configID) separated
by blank space. The module identification (or ConfigID) is defined at deployment time in the
respective deployment plan for each module previously deployed.</p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Stop"></a>Stop</h3>

<p>Use the <b>stop</b> command to stop a running module. The stop command
has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
stop &lt;moduleIDs&gt;</b></tt></p>

<p>Where &lt;moduleIDs&gt; is a list of one or more modules (configID) separated
by blank space. The module identification (or ConfigID) is defined at deployment time in the
respective deployment plan for each module previously deployed.</p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Undeploy"></a>Undeploy</h3>

<p>Use the <b>undeploy</b> command to stop and remove a module (running
or not) and its deployment information from the server. The undeploy command has the following
syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
undeploy &lt;moduleIDs&gt;</b></tt></p>

<p>Where &lt;moduleIDs&gt; is a list of one or more modules (configID) separated
by blank space. The module identification (or ConfigID) is defined at deployment time in the
respective deployment plan for each module previously deployed.</p>

<p>This command has the same ability as with <b>deploy</b> to uninstall
applications when the server is not running, this command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
&#45;-offline undeploy &lt;moduleID&gt;</b></tt></p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Distribute"></a>Distribute</h3>

<p>Use the <b>distribute</b> command to add a new module to the server.
This command does not start the module nor mark it to be started in the future. The distribute
command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
distribute &lt;module&gt; &lt;deployment_plan&gt;</b></tt></p>

<p>Just like with the deploy command, &lt;module&gt; specifies the application
file name and location. The &lt;deployment_plan&gt; specifies the file name and location
of the XML with the deployment plan. Sometimes the application module already has included
in the package a deployment plan or the application is so simple that does not require any
deployment plan, in these cases this parameter can be omitted.</p>

<p>A module file can be one of the following:</p>
<ul>
	<li>J2EE Enterprise Application Archive (EAR) file</li>
	<li>J2EE Web Application Archive (WAR) file</li>
	<li>J2EE Enterprise JavaBean Archive (JAR) file</li>
	<li>J2EE Java Resource Archive (RAR) file</li>
</ul>


<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Encrypt"></a>Encrypt</h3>

<p>Use the <b>encrypt</b> command to generate an encrypted string. This
command takes use of&nbsp;org.apache.geronimo.util.EncryptionManager and has the following
syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
encrypt &lt;string&gt;</b></tt></p>

<p>Where &lt;general_options&gt; are common options that apply to all commands,
&lt;string&gt; specifies a string to get encrypted.</p>

<p>Currently password strings are plain text in deployment plans, such as datasource
or JMS deployment plans within an EAR. It might pose a security problem to store password
strings as plain text even though the deployment plans are only used during the deployment
process, and not at runtime. Starting from Geronimo 2.1.5, users can encrypt passwords using
the encrypt command and paste the encrypted strings into deployment plans as password.</p>

<p>Examples:</p>

<p>Use this syntax to encrypt string <tt>passw0rd</tt> on an active server
so that the encryption settings of that server will be used</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
deploy --user myadmin --password mypassword encrypt passw0rd
</pre>
</div></div>

<p>Online encryption result:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
......
<span class="code-object">String</span> to encrypt: passw0rd
Online encryption result:
{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNv
ZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9s
YW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAEG2NoqXONCcU
GqfK0reVCpVwdAADQUVT
</pre>
</div></div>

<p>Use this syntax to encrypt string passw0rd offline</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
deploy --offline encrypt passw0rd
</pre>
</div></div>

<p>Offline encryption result:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
......
<span class="code-object">String</span> to encrypt: passw0rd
Offline encryption result:
{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNv
ZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9s
YW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAEG2NoqXONCcU
GqfK0reVCpVwdAADQUVT
</pre>
</div></div>

<p>Note: Online encryption needs a running server to connect to and will use the encryption
settings of that server, such as an encryption key, to do the encryption. As a result, the
encrypted password usually can only be used for that particular server. Offline encryption
uses the default encryption settings, and the encrypted password can be used by all servers.
Offline encryption is thus less secure than online encryption.</p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Installlibrary"></a>Install-library</h3>

<p>Use the <b>install-library</b> command to install a library into server's
repository. The install-library command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
install-library [--groupId groupName] &lt;libraryFile&gt;</b></tt></p>

<p>Use the <b>&#45;-groupId</b> option to specify a non-default group
id for the library. Otherwise, the library file will be installed with the group id named
<b>default</b>.</p>

<p>Examples:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;geronimo_home&gt;/bin/deploy -u system -p manager install-library mylib-1.0.jar
</pre>
</div></div>

<p>That command will install the mylib-1.0.jar at <tt><b>&lt;geronimo_home&gt;/repository/default/mylib/1.0/mylib-1.0.jar</b></tt></p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;geronimo_home&gt;/bin/deploy -u system -p manager install-library --groupId mygroup
mylib-1.0.jar
</pre>
</div></div>

<p>That command will install the mylib-1.0.jar at <tt><b>&lt;geronimo_home&gt;/repository/mygroup/mylib/1.0/mylib-1.0.jar</b></tt></p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Listmodules"></a>List-modules</h3>

<p>Use the <b>list-modules</b> command to list all available modules on
the server, note that for running this command the server must be running. The list-modules
command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
list-modules [&#45;</b></tt><tt><b><del>all&#124;</del></b></tt><del>started&#124;</del>&#45;stopped]</p>
<ul>
	<li>&#45;-all : is used by default when no other option is specified. It will list
all the available modules.</li>
	<li>&#45;-started : this option will list only the modules that are running.</li>
	<li>&#45;-stopped : this option will list only the modules that are not running.</li>
</ul>


<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Listtargets"></a>List-targets</h3>

<p>Use the <b>list-targets</b> command to lists the targets known to the
server you have connected to. The list-targets command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
list-targets</b></tt></p>

<p>In the case of Geronimo, each configuration store is a separate target. Geronimo
does not yet support clusters as targets.</p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-UnlockKeystore"></a>UnlockKeystore</h3>

<p>Use the <b>unlockKeystore</b> command to unlock a keystore and private
keys. The unlockKeystore command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy &lt;general_options&gt;
unlockKeystore &lt;keyStoreName&gt; &lt;keyAlias1&gt; &lt;keyAlias2&gt;</b></tt></p>

<p>Where &lt;keyStoreName&gt; specifies a locked keystore to get unlocked, &lt;keyAlias1&gt;
and &lt;keyAlias2&gt; are optionally used to specify one or more locked private keys
in the keystore to get unlocked. </p>

<p>Note that before you can use the unlockKeystore command, you need to ensure that
the following lines are added to &lt;geronimo_home&gt;/var/config/config-substitutions.properties:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;keyStoreName&gt;=&lt;keyStoreEncryptedPassword&gt;
&lt;keyAlias1&gt;=&lt;keyAlias1EncryptedPassword&gt;
&lt;keyAlias2&gt;=&lt;keyAlias1EncryptedPassword&gt;
...
</pre>
</div></div>

<p>Where </p>
<ul>
	<li>&lt;keyStoreName&gt; is the name of the keystore.</li>
	<li>&lt;keyStoreEncryptedPassword&gt; is the encrypted password for the keystore,
which can be generated by using the <b>encrypt</b> command. When you copy and
paste the generated encrypted password to &lt;geronimo_home&gt;/var/config/config-substitutions.properties,
there should be no space in the encrypted password string.</li>
	<li>&lt;keyAlias1&gt;, &lt;keyAlias2&gt; are the names of the private
keys in the keystore.</li>
	<li>&lt;keyAlias1EncryptedPassword&gt;, &lt;keyAlias2EncryptedPassword&gt;
are the encrypted passwords for the private keys, which can also be generated by using the
encrypt command.</li>
</ul>


<p>Alternatively, you can create a key file to contain the password of the keystore
and its private keys. Use <tt>org.apache.geronimo.keyStoreTrustStorePasswordFile</tt>
property to specify the key file. See <a href="/confluence/display/GMOxDOC21/Configuring+SSL+client+authentication"
title="Configuring SSL client authentication">Configuring SSL client authentication</a>
for more detailed instructions. </p>


<p>Examples:</p>

<p>Use this syntax to unlock the keystore whose name is mykeystore</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
deploy --user myadmin --password mypassword unlockKeystore mykeystore
</pre>
</div></div>

<p>Use this syntax to unlock the keystore whose name is mykeystore and the private key
whose alias is key1</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
deploy --user myadmin --password mypassword unlockKeystore mykeystore key1
</pre>
</div></div>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Installplugin"></a>Install-plugin</h3>

<p>Use the <b>install-plugin</b> command to install a Geronimo plugin previously
exported from a Geronimo server or downloaded from a repository. A Geronimo plugin can be
an application, a configuration such data sources and drivers or a combination. The install-plugin
command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy install-plugin &lt;plugin_file&gt;</b></tt></p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>

<h3><a name="Toolsandcommands-Searchplugins"></a>Search-plugins</h3>

<p>Use the <b>search-plugins</b> command to list all the Geronimo plugins
available in a Maven repository. The search-plugins command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/deploy search-plugins &lt;maven_repository_URL&gt;</b></tt></p>

<p><a href="#Toolsandcommands-top">Back to top</a></p>


<h1><a name="Toolsandcommands-client"></a>client</h1>

<p>The <b>client</b> command launches the client application container.
This command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/client config-name [app arg]
[app arg] ...</b></tt></p>

<p>The first argument identifies the Geronimo configuration that contains the application
client you want to run. The rest of the arguments will be passed as arguments to the client
application when it is started.</p>

<p>The <b>client</b> command can also be started by using the <b>java
&#45;jar</b> command:</p>

<p><tt><b>java &#45;Djava.endorsed.dirs=lib/endorsed &#45;jar bin/client.jar
config-name [app arg] [app arg] ...</b></tt></p>


<h1><a name="Toolsandcommands-jaxwstools"></a>jaxws-tools</h1>

<p>The <b>jaxws-tools</b> command can be used to generate portable artifacts
used in JAX-WS web services. For example, portable artifacts such as Service Endpoint Interface
(SEI) class, Service class, JAXB generated value types, etc.</p>

<p>This command has the following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/jaxws-tools toolName [toolOptions]
...</b></tt></p>

<p>Where <tt>toolName</tt> can be either:</p>

<ul>
	<li><b><a href="#Toolsandcommands-wsgen">wsgen</a></b> &#45;
generate portable artifacts from Java</li>
	<li><b><a href="#Toolsandcommands-wsimport">wsimport</a></b>
&#45; generate portable artifacts from WSDL</li>
</ul>


<p>The <b>jaxws-tools</b> command can also be started by using the <b>java
&#45;jar</b> command:</p>

<p><tt><b>java &#45;Djava.endorsed.dirs=lib/endorsed &#45;jar bin/jaxws-tools.jar
toolName [toolOptions] ...</b></tt></p>

<h2><a name="Toolsandcommands-wsgen"></a>wsgen</h2>

<p>The <b>jaxws-tools</b> uses the <b><a href="http://java.sun.com/javase/6/docs/technotes/tools/share/wsgen.html"
class="external-link" rel="nofollow">wsgen</a></b> tool provided by Sun to
generate the portable artifacts from Java class. The <b>wsgen</b> tools has the
following syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/jaxws-tools wsgen [options]
&lt;SEI&gt;</b></tt></p>

<ul>
	<li><b>&#45;classpath</b> &lt;path&gt;<br/>
Specifies where to find input class files.</li>
</ul>


<ul>
	<li><b>&#45;d</b> &lt;directory&gt;<br/>
Specifies where to place generated output files.</li>
</ul>


<ul>
	<li><b>&#45;keep</b><br/>
Keep generated files.</li>
</ul>


<ul>
	<li><b>&#45;r</b> &lt;directory&gt;<br/>
Specifies where to place resource files such as WSDLs.</li>
</ul>


<ul>
	<li><b>&#45;s</b> &lt;directory&gt;<br/>
Specifies where to place generated source files.</li>
</ul>


<ul>
	<li><b>&#45;wsdl</b><br/>
Generate a WSDL file.</li>
</ul>


<ul>
	<li><b>&#45;servicename</b> &lt;name&gt;<br/>
Specifies the Service name to use in the generated WSDL (used in conjunction with the &#45;wsdl
option).</li>
</ul>


<ul>
	<li><b>&#45;portname</b> &lt;name&gt;<br/>
Specifies the Port name to use in the generated WSD (used in conjunction with the &#45;wsdl
option).</li>
</ul>


<p>Example:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;geronimo_home&gt;/bin/jaxws-tools wsgen -d output -keep -wsdl -classpath . foo.BarService
</pre>
</div></div>

<h2><a name="Toolsandcommands-wsimport"></a>wsimport</h2>

<p>The <b>jaxws-tools</b> uses the <b><a href="http://java.sun.com/javase/6/docs/technotes/tools/share/wsimport.html"
class="external-link" rel="nofollow">wsimport</a></b> tool provided by Sun
to generate the portable artifacts from WSDL. The <b>wsimport</b> has the following
syntax:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/jaxws-tools wsimport [options]
&lt;WSDL_URI&gt;</b></tt></p>

<ul>
	<li><b>&#45;d</b> &lt;directory&gt;<br/>
Specifies where to place generated output files.</li>
</ul>


<ul>
	<li><b>&#45;keep</b><br/>
Keep generated files.</li>
</ul>


<ul>
	<li><b>&#45;p</b> &lt;pkg&gt;<br/>
Specifies the target package.</li>
</ul>


<ul>
	<li><b>&#45;s</b> &lt;directory&gt;<br/>
Specifies where to place generated source files.</li>
</ul>


<ul>
	<li><b>&#45;wsdllocation</b> &lt;location&gt;<br/>
Specified @WebService.wsdlLocation and @WebServiceClient.wsdlLocation value.</li>
</ul>


<p>Example:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;geronimo_home&gt;/bin/jaxws-tools wsimport -d output -keep http:<span class="code-comment">//localhost:8080/foo/Bar?wsdl</span>
</pre>
</div></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC21/Tools+and+commands">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=77800&revisedVersion=42&originalVersion=41">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC21/Tools+and+commands?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message