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:31:14 UTC

svn commit: rev 56983 - in geronimo/trunk/modules: assembly deployment/src/java/org/apache/geronimo/deployment deployment/src/java/org/apache/geronimo/deployment/cli system/src/java/org/apache/geronimo/system/main

Author: ammulder
Date: Mon Nov  8 17:31:14 2004
New Revision: 56983

Modified:
   geronimo/trunk/modules/assembly/maven.xml
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Bootstrap.java
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java
   geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/CommandLineManifest.java
Log:
Make the new deployer the only deployer


Modified: geronimo/trunk/modules/assembly/maven.xml
==============================================================================
--- geronimo/trunk/modules/assembly/maven.xml	(original)
+++ geronimo/trunk/modules/assembly/maven.xml	Mon Nov  8 17:31:14 2004
@@ -210,25 +210,25 @@
             deploymentFactory="org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl"
             />
 
-        <!-- build the new deployer JAR -->
+        <!-- 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="- -plan"/>
             <ant:arg value="target/plan/deployer-system-plan.xml"/>
-            <ant:arg value="--outfile"/>
+            <ant:arg value="- -outfile"/>
             <ant:arg value="${distDir}/bin/new-deployer.jar"/>
-            <ant:arg value="--mainClass"/>
+            <ant:arg value="- -mainClass"/>
             <ant:arg value="org.apache.geronimo.deployment.cli.DeployTool"/>
-            <ant:arg value="--classPath"/>
+            <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"/>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="package"/>
             <ant:arg value="--classPath"/>
@@ -241,7 +241,7 @@
 
         <!-- build the J2EEServer configuration -->
         <ant:echo>Building server configuration</ant:echo>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="target/plan/j2ee-server-plan.xml"/>
@@ -249,7 +249,7 @@
 
         <!-- building tranql connector default database configuration-->
         <ant:echo>Building default database configuration</ant:echo>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="target/plan/default-database-plan.xml"/>
@@ -258,7 +258,7 @@
 
         <!-- building system database configuration-->
         <ant:echo>Building system database configuration</ant:echo>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="target/plan/system-database-plan.xml"/>
@@ -267,7 +267,7 @@
 
         <!-- building system activemq configuration-->
         <ant:echo>Building system activemq configuration</ant:echo>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="target/plan/system-activemq-plan.xml"/>
@@ -275,7 +275,7 @@
 
         <!-- building system jms configuration-->
         <ant:echo>Building system jms configuration</ant:echo>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="target/plan/system-jms-plan.xml"/>
@@ -284,7 +284,7 @@
 
         <!-- build the J2EEServer secure configuration -->
         <ant:echo>Building secure server configuration</ant:echo>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="target/plan/j2ee-secure-plan.xml"/>
@@ -293,7 +293,7 @@
         <!-- build the system configuration and client.jar -->
         <ant:echo>Building client.jar</ant:echo>
         <ant:mkdir dir="${distDir}/bin"/>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="package"/>
             <ant:arg value="--mainClass"/>
@@ -306,7 +306,7 @@
 
         <!-- build the J2EE client configuration -->
         <ant:echo>Building J2EE Client configuration</ant:echo>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="target/plan/j2ee-client-plan.xml"/>
@@ -314,7 +314,7 @@
 
         <!-- build the Demo configuration -->
         <ant:echo>Building demo website configuration</ant:echo>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="${maven.repo.local}/geronimo/wars/geronimo-demo-${pom.currentVersion}.war"/>
@@ -322,7 +322,7 @@
 
         <!-- build the Debug Tool configuration "org/apache/geronimo/DebugConsole"-->
         <ant:echo>Building debug tool configuration</ant:echo>
-        <ant:java fork="true" jar="${distDir}/bin/new-deployer.jar" failonerror="true">
+        <ant:java fork="true" jar="${distDir}/bin/deployer.jar" failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="${maven.repo.local}/geronimo/wars/geronimo-jmxdebug-${pom.currentVersion}.war"/>

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Bootstrap.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Bootstrap.java	(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Bootstrap.java	Mon Nov  8 17:31:14 2004
@@ -128,10 +128,10 @@
             Manifest manifest = new Manifest();
             Attributes mainAttributes = manifest.getMainAttributes();
             mainAttributes.putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1.0");
-            mainAttributes.putValue(Attributes.Name.MAIN_CLASS.toString(), "org.apache.geronimo.system.main.CommandLine");
+            mainAttributes.putValue(Attributes.Name.MAIN_CLASS.toString(), "org.apache.geronimo.deployment.cli.DeployTool");
             mainAttributes.putValue(Attributes.Name.CLASS_PATH.toString(), deployerClassPath);
-            mainAttributes.putValue(CommandLineManifest.MAIN_GBEAN.toString(), deployerGBean);
-            mainAttributes.putValue(CommandLineManifest.MAIN_METHOD.toString(), "deploy");
+//            mainAttributes.putValue(CommandLineManifest.MAIN_GBEAN.toString(), deployerGBean);
+//            mainAttributes.putValue(CommandLineManifest.MAIN_METHOD.toString(), "deploy");
             mainAttributes.putValue(CommandLineManifest.CONFIGURATIONS.toString(), j2eeDeployerConfig.getConfigId());
 
             // attribute that indicates to a JSR-88 tool that we have a Deployment factory

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java	(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java	Mon Nov  8 17:31:14 2004
@@ -34,6 +34,7 @@
 import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
 import org.apache.geronimo.deployment.plugin.factories.AuthenticationFailedException;
 import org.apache.geronimo.system.main.CommandLine;
+import org.apache.geronimo.system.main.CommandLineManifest;
 
 /**
  * Supports two types of connections to the server.  One, via JSR-88, is valid
@@ -216,10 +217,8 @@
         }
 
         public void start() throws DeploymentException {
-            //todo: load configuration list dynamically once the bootstrapper builds this deploy tool
-            List configurations = new ArrayList();
+            List configurations = CommandLineManifest.getManifestEntries().getConfigurations();
             try {
-                configurations.add(new URI("org/apache/geronimo/J2EEDeployer"));
                 super.startKernel(configurations);
             } catch(Exception e) {
                 throw new DeploymentException("Unable to start local kernel", e);

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/CommandLineManifest.java
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/CommandLineManifest.java	(original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/CommandLineManifest.java	Mon Nov  8 17:31:14 2004
@@ -62,28 +62,20 @@
 
         // get the main gbean class
         String mainGBeanString = mainAttributes.getValue(MAIN_GBEAN);
-        if (mainGBeanString == null) {
-            System.err.println("Manifest does not contain a Main-GBean entry");
-            System.exit(1);
-            throw new AssertionError();
-        }
 
-        ObjectName mainGBean;
-        try {
-            mainGBean = new ObjectName(mainGBeanString);
-        } catch (MalformedObjectNameException e) {
-            System.err.println("Invalid Main-GBean name: " + mainGBeanString);
-            System.exit(1);
-            throw new AssertionError();
+        ObjectName mainGBean = null;
+        if(mainGBeanString != null) {
+            try {
+                mainGBean = new ObjectName(mainGBeanString);
+            } catch (MalformedObjectNameException e) {
+                System.err.println("Invalid Main-GBean name: " + mainGBeanString);
+                System.exit(1);
+                throw new AssertionError();
+            }
         }
 
         // get the main method
         String mainMethod = mainAttributes.getValue(MAIN_METHOD);
-        if (mainGBeanString == null) {
-            System.err.println("Manifest does not contain a Main-Method entry");
-            System.exit(1);
-            throw new AssertionError();
-        }
 
         // get the list of extra configurations to load
         List configurations = new ArrayList();