You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2004/11/09 02:59:41 UTC
svn commit: rev 56986 - in geronimo/trunk/modules: assembly deployment/src/java/org/apache/geronimo/deployment/cli
Author: ammulder
Date: Mon Nov 8 17:59:40 2004
New Revision: 56986
Modified:
geronimo/trunk/modules/assembly/maven.xml
geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/CommandPackage.java
Log:
Default package command to not install, add install option (GERONIMO-460)
Modified: geronimo/trunk/modules/assembly/maven.xml
==============================================================================
--- geronimo/trunk/modules/assembly/maven.xml (original)
+++ geronimo/trunk/modules/assembly/maven.xml Mon Nov 8 17:59:40 2004
@@ -210,21 +210,6 @@
deploymentFactory="org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl"
/>
- <!-- build the new deployer JAR
- <ant:echo>Building new-deployer.jar</ant:echo>
- <ant:mkdir dir="${distDir}/bin"/>
- <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
- <ant:jvmarg value="-ea"/>
- <ant:arg value="- -plan"/>
- <ant:arg value="target/plan/deployer-system-plan.xml"/>
- <ant:arg value="- -outfile"/>
- <ant:arg value="${distDir}/bin/new-deployer.jar"/>
- <ant:arg value="- -mainClass"/>
- <ant:arg value="org.apache.geronimo.deployment.cli.DeployTool"/>
- <ant:arg value="- -classPath"/>
- <ant:arg value="${deploy.classpath}"/>
- </ant:java>
- -->
<!-- build the system configuration and server.jar -->
<ant:echo>Building server.jar</ant:echo>
<ant:mkdir dir="${distDir}/bin"/>
@@ -235,6 +220,7 @@
<ant:arg value="${server.classpath}"/>
<ant:arg value="--mainClass"/>
<ant:arg value="org.apache.geronimo.system.main.Daemon"/>
+ <ant:arg value="--install"/>
<ant:arg value="target/plan/system-plan.xml"/>
<ant:arg value="${distDir}/bin/server.jar"/>
</ant:java>
@@ -300,6 +286,7 @@
<ant:arg value="org.apache.geronimo.system.main.ClientCommandLine"/>
<ant:arg value="--classPath"/>
<ant:arg value="${client.classpath}"/>
+ <ant:arg value="--install"/>
<ant:arg value="target/plan/client-system-plan.xml"/>
<ant:arg value="${distDir}/bin/client.jar"/>
</ant:java>
Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/CommandPackage.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/CommandPackage.java (original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/CommandPackage.java Mon Nov 8 17:59:40 2004
@@ -31,12 +31,14 @@
*/
public class CommandPackage extends AbstractCommand {
public CommandPackage() {
- super("package", "3. Use if you know what you're doing", "[--classPath path] [--mainClass class] [module] [plan] fileName",
+ super("package", "3. Use if you know what you're doing", "[--classPath path] [--mainClass class] [--install] [module] [plan] fileName",
"Creates a configuration JAR rather than installing into the server " +
"environment. The fileName argument specifies the JAR to create. The " +
"optional classPath argument specifies a Class-Path to include in the JAR " +
- "manifest. The mainClass argument specifies the Main-Class to include in " +
- "the JAR manifest.\n" +
+ "manifest. The optional mainClass argument specifies the Main-Class to include in " +
+ "the JAR manifest. The install option specifies that the " +
+ "configuration should be build into a JAR and also installed into " +
+ "the server configuration (otherwise it is packaged but not installed).\n" +
"The standard arguments may not be used with this command -- it " +
"never connects to a remote server.");
}
@@ -54,6 +56,7 @@
File module = null;
File plan = null;
File packageFile;
+ boolean install = false;
int i;
for(i = 0; i < args.length; i++) {
String arg = args[i];
@@ -61,6 +64,8 @@
classPath = args[++i];
} else if(arg.equals("--mainClass")) {
mainClass = args[++i];
+ } else if(arg.equals("--install")) {
+ install = true;
} else if(arg.startsWith("--")) {
throw new DeploymentSyntaxException("Invalid argument '"+arg+"'");
} else {
@@ -112,7 +117,7 @@
if(plan != null) {
plan = plan.getAbsoluteFile();
}
- List list = (List)connection.invokeOfflineDeployer("deploy", new Object[]{plan, module, packageFile, Boolean.TRUE, mainClass, classPath},
+ List list = (List)connection.invokeOfflineDeployer("deploy", new Object[]{plan, module, packageFile, install ? Boolean.TRUE : Boolean.FALSE, mainClass, classPath},
new String[]{File.class.getName(), File.class.getName(), File.class.getName(), boolean.class.getName(), String.class.getName(), String.class.getName()});
for (int j = 0; j < list.size(); j++) {
out.println("Packaged configuration "+list.get(j)+" to "+packageFile);