You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2006/05/14 23:45:05 UTC

svn commit: r406440 - in /geronimo/branches/1.1: assemblies/j2ee-jetty-server/ assemblies/j2ee-jetty-server/src/var/config/ assemblies/j2ee-tomcat-server/ configs/upgrade-cli/ configs/upgrade-cli/src/ configs/upgrade-cli/src/plan/ configs/upgrade/ conf...

Author: djencks
Date: Sun May 14 14:45:03 2006
New Revision: 406440

URL: http://svn.apache.org/viewcvs?rev=406440&view=rev
Log:
Make the upgrade cl tool be 2 small modules.  Enhance command line infrastructure to be able to not reqires specifying versions, make it accept name queries instead of names, etc

Added:
    geronimo/branches/1.1/configs/upgrade/
      - copied from r405917, geronimo/branches/1.1/configs/geronimo-gbean-deployer/
    geronimo/branches/1.1/configs/upgrade-cli/
      - copied from r405917, geronimo/branches/1.1/configs/j2ee-system/
    geronimo/branches/1.1/configs/upgrade-cli/LICENSE.txt
      - copied unchanged from r406410, geronimo/branches/1.1/configs/j2ee-system/LICENSE.txt
    geronimo/branches/1.1/configs/upgrade-cli/NOTICE.txt
      - copied unchanged from r406410, geronimo/branches/1.1/configs/j2ee-system/NOTICE.txt
    geronimo/branches/1.1/configs/upgrade-cli/maven.xml
      - copied unchanged from r406410, geronimo/branches/1.1/configs/j2ee-system/maven.xml
    geronimo/branches/1.1/configs/upgrade-cli/project.properties
      - copied, changed from r406410, geronimo/branches/1.1/configs/j2ee-system/project.properties
    geronimo/branches/1.1/configs/upgrade-cli/project.xml
      - copied, changed from r406410, geronimo/branches/1.1/configs/j2ee-system/project.xml
    geronimo/branches/1.1/configs/upgrade-cli/src/
      - copied from r406410, geronimo/branches/1.1/configs/j2ee-system/src/
    geronimo/branches/1.1/configs/upgrade/LICENSE.txt
      - copied unchanged from r406410, geronimo/branches/1.1/configs/geronimo-gbean-deployer/LICENSE.txt
    geronimo/branches/1.1/configs/upgrade/NOTICE.txt
      - copied unchanged from r406410, geronimo/branches/1.1/configs/geronimo-gbean-deployer/NOTICE.txt
    geronimo/branches/1.1/configs/upgrade/maven.xml
      - copied, changed from r406410, geronimo/branches/1.1/configs/geronimo-gbean-deployer/maven.xml
    geronimo/branches/1.1/configs/upgrade/project.properties
      - copied, changed from r406410, geronimo/branches/1.1/configs/geronimo-gbean-deployer/project.properties
    geronimo/branches/1.1/configs/upgrade/project.xml
      - copied, changed from r406410, geronimo/branches/1.1/configs/geronimo-gbean-deployer/project.xml
    geronimo/branches/1.1/configs/upgrade/src/
      - copied from r406410, geronimo/branches/1.1/configs/geronimo-gbean-deployer/src/
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/LocalServer.java
      - copied, changed from r405917, geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/LocalServer.java
    geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/UpgradeGBean.java
      - copied, changed from r405917, geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/CLIUpgrade.java
Removed:
    geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/LocalServer.java
    geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/CLIUpgrade.java
Modified:
    geronimo/branches/1.1/assemblies/j2ee-jetty-server/project.xml
    geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/offline-deployer-list
    geronimo/branches/1.1/assemblies/j2ee-tomcat-server/project.xml
    geronimo/branches/1.1/configs/upgrade-cli/src/plan/plan.xml
    geronimo/branches/1.1/configs/upgrade/src/plan/plan.xml
    geronimo/branches/1.1/etc/project.properties
    geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java
    geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLine.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLineManifest.java
    geronimo/branches/1.1/modules/upgrade/maven.xml
    geronimo/branches/1.1/modules/upgrade/project.properties
    geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java
    geronimo/branches/1.1/plugins/geronimo-packaging-plugin/plugin.jelly
    geronimo/branches/1.1/plugins/geronimo-packaging-plugin/project.xml
    geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java
    geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilderShell.java

Modified: geronimo/branches/1.1/assemblies/j2ee-jetty-server/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/assemblies/j2ee-jetty-server/project.xml?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/assemblies/j2ee-jetty-server/project.xml (original)
+++ geronimo/branches/1.1/assemblies/j2ee-jetty-server/project.xml Sun May 14 14:45:03 2006
@@ -502,6 +502,28 @@
             </properties>
         </dependency>
 
+        <!-- upgrader -->
+        <dependency>
+             <groupId>geronimo</groupId>
+             <artifactId>upgrade-cli</artifactId>
+             <type>car</type>
+             <version>${pom.currentVersion}</version>
+             <properties>
+                 <geronimo.assemble>install</geronimo.assemble>
+                 <geronimo.assemble.executable>bin/upgrade.jar</geronimo.assemble.executable>
+             </properties>
+         </dependency>
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>upgrade</artifactId>
+            <type>car</type>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                <geronimo.assemble>install</geronimo.assemble>
+            </properties>
+        </dependency>
+
+
 
         <!-- packages we include for others to use, mostly rars -->
         <dependency>

Modified: geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/offline-deployer-list
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/offline-deployer-list?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/offline-deployer-list (original)
+++ geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/offline-deployer-list Sun May 14 14:45:03 2006
@@ -1,7 +1,7 @@
 #list of deployers to be started for offline deployment
-geronimo/geronimo-gbean-deployer/${pom.currentVersion}/car
-geronimo/j2ee-deployer/${pom.currentVersion}/car
-geronimo/openejb-deployer/${pom.currentVersion}/car
-geronimo/client-deployer/${pom.currentVersion}/car
-geronimo/axis-deployer/${pom.currentVersion}/car
-geronimo/jetty-deployer/${pom.currentVersion}/car
+geronimo/geronimo-gbean-deployer//car
+geronimo/j2ee-deployer//car
+geronimo/openejb-deployer//car
+geronimo/client-deployer//car
+geronimo/axis-deployer//car
+geronimo/jetty-deployer//car

Modified: geronimo/branches/1.1/assemblies/j2ee-tomcat-server/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/assemblies/j2ee-tomcat-server/project.xml?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/assemblies/j2ee-tomcat-server/project.xml (original)
+++ geronimo/branches/1.1/assemblies/j2ee-tomcat-server/project.xml Sun May 14 14:45:03 2006
@@ -503,6 +503,28 @@
         </dependency>
 
 
+        <!-- upgrader -->
+        <dependency>
+             <groupId>geronimo</groupId>
+             <artifactId>upgrade-cli</artifactId>
+             <type>car</type>
+             <version>${pom.currentVersion}</version>
+             <properties>
+                 <geronimo.assemble>install</geronimo.assemble>
+                 <geronimo.assemble.executable>bin/upgrade.jar</geronimo.assemble.executable>
+             </properties>
+         </dependency>
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>upgrade</artifactId>
+            <type>car</type>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                <geronimo.assemble>install</geronimo.assemble>
+            </properties>
+        </dependency>
+
+
         <!-- packages we include for others to use, mostly rars -->
         <dependency>
             <!-- included to make additional deployments easier -->

Copied: geronimo/branches/1.1/configs/upgrade-cli/project.properties (from r406410, geronimo/branches/1.1/configs/j2ee-system/project.properties)
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/upgrade-cli/project.properties?p2=geronimo/branches/1.1/configs/upgrade-cli/project.properties&p1=geronimo/branches/1.1/configs/j2ee-system/project.properties&r1=406410&r2=406440&rev=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/j2ee-system/project.properties (original)
+++ geronimo/branches/1.1/configs/upgrade-cli/project.properties Sun May 14 14:45:03 2006
@@ -42,6 +42,9 @@
     ../lib/xpp3-${xpp3_version}.jar \
     ../lib/xstream-${xstream_version}.jar \
 
-geronimo.packaging.mainClass=org.apache.geronimo.system.main.Daemon
+geronimo.packaging.mainClass=org.apache.geronimo.system.main.CommandLine
+geronimo.packaging.mainGBean=?name=Upgrade
+geronimo.packaging.mainMethod=execute
+geronimo.packaging.configurations=geronimo/upgrade//car
 geronimo.packaging.endorsedDirs=lib/endorsed
 geronimo.packaging.extensionDirs=lib/ext

Copied: geronimo/branches/1.1/configs/upgrade-cli/project.xml (from r406410, geronimo/branches/1.1/configs/j2ee-system/project.xml)
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/upgrade-cli/project.xml?p2=geronimo/branches/1.1/configs/upgrade-cli/project.xml&p1=geronimo/branches/1.1/configs/j2ee-system/project.xml&r1=406410&r2=406440&rev=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/j2ee-system/project.xml (original)
+++ geronimo/branches/1.1/configs/upgrade-cli/project.xml Sun May 14 14:45:03 2006
@@ -21,8 +21,8 @@
 <project>
     <extend>../../etc/project.xml</extend>
     <pomVersion>3</pomVersion>
-    <id>j2ee-system</id>
-    <name>System Configuration for the J2EE Server</name>
+    <id>upgrade-cli</id>
+    <name>System Configuration for the command line upgrade</name>
 
     <dependencies>
         <!-- dependency on deployer -->

Modified: geronimo/branches/1.1/configs/upgrade-cli/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/upgrade-cli/src/plan/plan.xml?rev=406440&r1=406410&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/upgrade-cli/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/upgrade-cli/src/plan/plan.xml Sun May 14 14:45:03 2006
@@ -45,13 +45,6 @@
     </reference>
   </gbean>
 
-  <!--User-editable attribute service-->
-  <gbean name="AttributeManager" class="org.apache.geronimo.system.configuration.LocalAttributeManager">
-    <reference name="ServerInfo">
-      <name>ServerInfo</name>
-    </reference>
-    <attribute name="configFile">var/config/config.xml</attribute>
-  </gbean>
 
   <!-- ArtifactManager -->
   <gbean name="ArtifactManager" class="org.apache.geronimo.kernel.repository.DefaultArtifactManager"/>
@@ -71,13 +64,6 @@
     <reference name="Repositories">
     </reference>
     <reference name="Stores">
-    </reference>
-    <reference name="AttributeStore">
-      <name>AttributeManager</name>
-    </reference>
-    <reference name="PersistentConfigurationList">
-      <type>AttributeStore</type>
-      <name>AttributeManager</name>
     </reference>
     <reference name="ArtifactManager">
       <name>ArtifactManager</name>

Copied: geronimo/branches/1.1/configs/upgrade/maven.xml (from r406410, geronimo/branches/1.1/configs/geronimo-gbean-deployer/maven.xml)
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/upgrade/maven.xml?p2=geronimo/branches/1.1/configs/upgrade/maven.xml&p1=geronimo/branches/1.1/configs/geronimo-gbean-deployer/maven.xml&r1=406410&r2=406440&rev=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/geronimo-gbean-deployer/maven.xml (original)
+++ geronimo/branches/1.1/configs/upgrade/maven.xml Sun May 14 14:45:03 2006
@@ -18,24 +18,9 @@
 
 <!-- $Rev$ $Date$ -->
 
-<project default="default"
-         xmlns:ant="jelly:ant"
-         xmlns:define="jelly:define"
-        xmlns:boot="geronimo:gbean-deployer-boot"
-        >
+<project default="default">    
 
-    <goal name="default" prereqs="car:install"/>
-
-    <goal name="car:package" prereqs="car:prepare-plan">
-        <define:taglib uri="geronimo:gbean-deployer-boot">
-            <define:jellybean name="boot" className="org.apache.geronimo.deployment.PluginBootstrap" method="bootstrap"/>
-        </define:taglib>
-        <ant:mkdir dir="${maven.build.dir}/repository"/>
-        <boot:boot
-                localRepo="${maven.repo.local}"
-                plan="${geronimo.packaging.buildFile}"
-                buildDir="${maven.build.dir}"
-                carFile="${maven.build.dir}/${maven.final.name}.car"
-                />
+    <goal name="default">
+        <attainGoal name="car:install"/>
     </goal>
-</project>
+</project>
\ No newline at end of file

Copied: geronimo/branches/1.1/configs/upgrade/project.properties (from r406410, geronimo/branches/1.1/configs/geronimo-gbean-deployer/project.properties)
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/upgrade/project.properties?p2=geronimo/branches/1.1/configs/upgrade/project.properties&p1=geronimo/branches/1.1/configs/geronimo-gbean-deployer/project.properties&r1=406410&r2=406440&rev=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/geronimo-gbean-deployer/project.properties (original)
+++ geronimo/branches/1.1/configs/upgrade/project.properties Sun May 14 14:45:03 2006
@@ -25,29 +25,4 @@
 # Also will cause all config projects to be grouped together when imported into eclipse.
 maven.eclipse.project.name=${geronimo.maven.eclipse.configs.project.prefix}${pom.artifactId}
 
-# override deploymentConfig to use bootstrap configuration
-#geronimo.packaging.deploymentConfig=geronimo/geronimo-gbean-deployer/0.2/car
-geronimo.packaging.deploymentConfig=geronimo/geronimo-gbean-deployer/${geronimo_version}/car
-#geronimo.packaging.deployerName=*:name=Deployer,j2eeType=Deployer,*
 
-
-#following is an experiment
-geronimo.packaging.classPath= \
-    ../lib/geronimo-qname_1.1_spec-${geronimo_spec_qname_version}.jar \
-    ../lib/geronimo-common-${geronimo_version}.jar \
-    ../lib/geronimo-kernel-${geronimo_version}.jar \
-    ../lib/geronimo-system-${geronimo_version}.jar \
-    ../lib/cglib-nodep-${cglib_version}.jar \
-    ../lib/commons-cli-${commons_cli_version}.jar \
-    ../lib/commons-logging-${commons_logging_version}.jar \
-    ../lib/log4j-${log4j_version}.jar \
-    ../lib/mx4j-${mx4j_version}.jar \
-    ../lib/mx4j-remote-${mx4j_version}.jar \
-    ../lib/endorsed/xercesImpl-${xerces_version}.jar \
-    ../lib/endorsed/xmlParserAPIs-${xml_parser_apis_version}.jar \
-    ../lib/xpp3-${xpp3_version}.jar \
-    ../lib/xstream-${xstream_version}.jar \
-
-geronimo.packaging.mainClass=org.apache.geronimo.deployment.cli.DeployTool
-geronimo.packaging.endorsedDirs=lib/endorsed
-geronimo.packaging.extensionDirs=lib/ext
\ No newline at end of file

Copied: geronimo/branches/1.1/configs/upgrade/project.xml (from r406410, geronimo/branches/1.1/configs/geronimo-gbean-deployer/project.xml)
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/upgrade/project.xml?p2=geronimo/branches/1.1/configs/upgrade/project.xml&p1=geronimo/branches/1.1/configs/geronimo-gbean-deployer/project.xml&r1=406410&r2=406440&rev=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/geronimo-gbean-deployer/project.xml (original)
+++ geronimo/branches/1.1/configs/upgrade/project.xml Sun May 14 14:45:03 2006
@@ -21,30 +21,38 @@
 <project>
     <pomVersion>3</pomVersion>
     <extend>../../etc/project.xml</extend>
-    <id>geronimo-gbean-deployer</id>
-    <name>Geronimo Configuration for performing service deployments</name>
+    <id>upgrade</id>
+    <name>Geronimo Configuration for upgrading plans</name>
 
     <dependencies>
-        <!-- dependencies referenced in plan -->
         <dependency>
             <groupId>geronimo</groupId>
-            <artifactId>geronimo-system</artifactId>
-            <version>${geronimo_version}</version>
-            <properties>
-                 <geronimo.dependency>true</geronimo.dependency>
-             </properties>
+            <artifactId>geronimo-packaging-plugin</artifactId>
+            <version>${geronimo_packaging_plugin_version}</version>
+            <type>plugin</type>
         </dependency>
         <dependency>
             <groupId>geronimo</groupId>
-            <artifactId>geronimo-common</artifactId>
+            <artifactId>geronimo-gbean-deployer</artifactId>
             <version>${geronimo_version}</version>
+            <type>car</type>
             <properties>
-                 <geronimo.dependency>true</geronimo.dependency>
-             </properties>
+                <packaging.config.order>1</packaging.config.order>
+            </properties>
         </dependency>
+        <!-- dependencies referenced in plan -->
+        <!--<dependency>-->
+            <!--<groupId>geronimo</groupId>-->
+            <!--<artifactId>geronimo-common</artifactId>-->
+            <!--<version>${geronimo_version}</version>-->
+            <!--<properties>-->
+                 <!--<geronimo.dependency>true</geronimo.dependency>-->
+             <!--</properties>-->
+        <!--</dependency>-->
+<!--
         <dependency>
             <groupId>geronimo</groupId>
-            <artifactId>geronimo-deployment</artifactId>
+            <artifactId>geronimo-j2ee</artifactId>
             <version>${geronimo_version}</version>
             <properties>
                  <geronimo.dependency>true</geronimo.dependency>
@@ -52,15 +60,16 @@
         </dependency>
         <dependency>
             <groupId>geronimo</groupId>
-            <artifactId>geronimo-j2ee</artifactId>
+            <artifactId>geronimo-management</artifactId>
             <version>${geronimo_version}</version>
             <properties>
                  <geronimo.dependency>true</geronimo.dependency>
              </properties>
         </dependency>
+-->
         <dependency>
             <groupId>geronimo</groupId>
-            <artifactId>geronimo-management</artifactId>
+            <artifactId>geronimo-upgrade</artifactId>
             <version>${geronimo_version}</version>
             <properties>
                  <geronimo.dependency>true</geronimo.dependency>
@@ -91,6 +100,7 @@
              </properties>
         </dependency>
 
+<!--
         <dependency>
             <groupId>xstream</groupId>
             <artifactId>xstream</artifactId>
@@ -108,20 +118,16 @@
                  <geronimo.dependency>true</geronimo.dependency>
              </properties>
         </dependency>
-      
+-->
+
         <!-- for bootstrap -->
+<!--
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-deploy-tool</artifactId>
             <version>${geronimo_version}</version>
         </dependency>
-        <!-- dependency on deployer -->
-        <dependency>
-            <groupId>geronimo</groupId>
-            <artifactId>geronimo-packaging-plugin</artifactId>
-            <version>${geronimo_packaging_plugin_version}</version>
-            <type>plugin</type>
-        </dependency>
+-->
 
     </dependencies>
 </project>

Modified: geronimo/branches/1.1/configs/upgrade/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/upgrade/src/plan/plan.xml?rev=406440&r1=406410&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/upgrade/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/upgrade/src/plan/plan.xml Sun May 14 14:45:03 2006
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    Copyright 2005 The Apache Software Foundation
+    Copyright 2006 The Apache Software Foundation
 
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -18,31 +18,7 @@
 
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
     <!-- Deployer used to process modules and plans -->
-    <gbean name="Deployer" class="org.apache.geronimo.deployment.Deployer">
-        <reference name="Store">
-            <!--<pattern><gbean-name>*:j2eeType=ConfigurationStore,*</gbean-name></pattern>-->
-         </reference>
-        <reference name="Builders">
-        </reference>
+    <gbean name="Upgrade" class="org.apache.geronimo.upgrade.UpgradeGBean">
     </gbean>
-
-    <!-- Builder for handling plans defining Geronimo modules -->
-    <gbean name="ServiceBuilder" class="org.apache.geronimo.deployment.service.ServiceConfigBuilder">
-        <!--<attribute name="defaultParentId">geronimo/j2ee-server/${pom.currentVersion}/car</attribute>-->
-        <reference name="Repository">
-            <!--<pattern><gbean-name>geronimo.maven:name=Repository</gbean-name></pattern>-->
-            <!--<pattern><gbean-name>geronimo.server:name=Repository,*</gbean-name></pattern>-->
-        </reference>
-        <reference name="XmlAttributeBuilders">
-            <!--<module>*</module>-->
-            <!--<name>*</name>-->
-        </reference>
-        <reference name="XmlReferenceBuilders">
-            <!--<module>*</module>-->
-            <!--<name>*</name>-->
-        </reference>
-    </gbean>
-
-    <!--<gbean name="EnvironmentBuilder" class="org.apache.geronimo.deployment.service.EnvironmentBuilder"/>-->
 
 </module>

Modified: geronimo/branches/1.1/etc/project.properties
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/etc/project.properties?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/etc/project.properties (original)
+++ geronimo/branches/1.1/etc/project.properties Sun May 14 14:45:03 2006
@@ -96,7 +96,7 @@
 tranql_vendors_version=1.1
 release_notes_version=1.0
 
-geronimo_packaging_plugin_version=1.1.0-8
+geronimo_packaging_plugin_version=1.1.0-9
 geronimo_assembly_plugin_version=1.1.0-12
 geronimo_deployment_plugin_version=1.1.0-3
 geronimo_dependency_plugin_version=1.1.0-3

Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java Sun May 14 14:45:03 2006
@@ -46,7 +46,7 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
-import org.apache.geronimo.kernel.config.KernelConfigurationManager;
+import org.apache.geronimo.system.main.LocalServer;
 
 /**
  * Supports online connections to the server, via JSR-88, valid only
@@ -197,7 +197,7 @@
         if (offline) {
             LocalServer localServer;
             try {
-                localServer = new LocalServer("var/config/offline-deployer-list");
+                localServer = new LocalServer("geronimo/j2ee-system//car", "var/config/offline-deployer-list");
             } catch (Exception e) {
                 throw new DeploymentException("Could not start local server", e);
             }

Modified: geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java (original)
+++ geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java Sun May 14 14:45:03 2006
@@ -32,7 +32,9 @@
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
+
 import javax.management.ObjectName;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.DeploymentException;
@@ -90,9 +92,9 @@
         t.setDaemon(true);
         t.start();
     }
-    
+
     public List deploy(boolean inPlace, File moduleFile, File planFile) throws DeploymentException {
-    	return deploy(inPlace, moduleFile, planFile, null);
+        return deploy(inPlace, moduleFile, planFile, null);
     }
 
     public List deploy(boolean inPlace, File moduleFile, File planFile, String targetConfigStore) throws DeploymentException {
@@ -116,7 +118,7 @@
         }
 
         try {
-            return deploy(inPlace, planFile, moduleFile, null, true, null, null, null, null, targetConfigStore);
+            return deploy(inPlace, planFile, moduleFile, null, true, null, null, null, null, null, null, null, targetConfigStore);
         } catch (DeploymentException e) {
             log.debug("Deployment failed: plan=" + planFile + ", module=" + originalModuleFile, e);
             throw e.cleanse();
@@ -185,7 +187,7 @@
             File targetFile,
             boolean install,
             String mainClass,
-            String classPath,
+            String mainGBean, String mainMethod, String manifestConfigurations, String classPath,
             String endorsedDirs,
             String extensionDirs,
             String targetConfigurationStore) throws DeploymentException {
@@ -260,6 +262,15 @@
                 if (mainClass != null) {
                     mainAttributes.putValue(Attributes.Name.MAIN_CLASS.toString(), mainClass);
                 }
+                if (mainGBean != null) {
+                    mainAttributes.putValue(CommandLineManifest.MAIN_GBEAN.toString(), mainGBean);
+                }
+                if (mainMethod != null) {
+                    mainAttributes.putValue(CommandLineManifest.MAIN_METHOD.toString(), mainMethod);
+                }
+                if (manifestConfigurations != null) {
+                    mainAttributes.putValue(CommandLineManifest.CONFIGURATIONS.toString(), manifestConfigurations);
+                }
                 if (classPath != null) {
                     mainAttributes.putValue(Attributes.Name.CLASS_PATH.toString(), classPath);
                 }
@@ -283,7 +294,7 @@
             } else {
                 store = (ConfigurationStore) stores.iterator().next();
             }
-            
+
             // It's our responsibility to close this context, once we're done with it...
             DeploymentContext context = builder.buildConfiguration(inPlace, configID, plan, module, stores, artifactResolver, store);
             List configurations = new ArrayList();
@@ -427,7 +438,7 @@
         infoFactory.addAttribute("remoteDeployUploadURL", String.class, false);
         infoFactory.addOperation("deploy", new Class[]{boolean.class, File.class, File.class});
         infoFactory.addOperation("deploy", new Class[]{boolean.class, File.class, File.class, String.class});
-        infoFactory.addOperation("deploy", new Class[]{boolean.class, File.class, File.class, File.class, boolean.class, String.class, String.class, String.class, String.class, String.class});
+        infoFactory.addOperation("deploy", new Class[]{boolean.class, File.class, File.class, File.class, boolean.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class});
 
         infoFactory.addReference("Builders", ConfigurationBuilder.class, "ConfigBuilder");
         infoFactory.addReference("Store", ConfigurationStore.class, "ConfigurationStore");

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java (original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/ClientCommandLine.java Sun May 14 14:45:03 2006
@@ -16,13 +16,12 @@
  */
 package org.apache.geronimo.system.main;
 
-import java.net.URI;
 import java.util.Collections;
-import javax.management.ObjectName;
 
-import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.kernel.Jsr77Naming;
 import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.kernel.Jsr77Naming;
+import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
  * @version $Revision$ $Date$
@@ -76,7 +75,7 @@
         //this kinda sucks, but resource adapter modules deployed on the client insist on having a
         //J2EEApplication name component
         AbstractName baseName = naming.createRootName(configuration, configuration.toString(), "J2EEApplication");
-
-        invokeMainGBean(Collections.singletonList(configuration), baseName, "main", args);
+        AbstractNameQuery baseNameQuery = new AbstractNameQuery(baseName);
+        invokeMainGBean(Collections.singletonList(configuration), baseNameQuery, "main", args);
     }
 }

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLine.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLine.java?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLine.java (original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLine.java Sun May 14 14:45:03 2006
@@ -21,10 +21,10 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Enumeration;
+import java.util.Set;
+import java.util.Collection;
 import java.net.URL;
 
-import javax.management.ObjectName;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.GeronimoEnvironment;
@@ -39,7 +39,9 @@
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.log.GeronimoLogging;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.MissingDependencyException;
 import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 
 
 /**
@@ -67,7 +69,7 @@
             // the interesting entries from the manifest
             CommandLineManifest manifest = CommandLineManifest.getManifestEntries();
             List configurations = manifest.getConfigurations();
-            AbstractName mainGBean = manifest.getMainGBean();
+            AbstractNameQuery mainGBean = manifest.getMainGBeanQuery();
             String mainMethod = manifest.getMainMethod();
 
             new CommandLine().invokeMainGBean(configurations, mainGBean, mainMethod, args);
@@ -84,11 +86,19 @@
     private Kernel kernel;
     private AbstractName configurationName;
 
-    public void invokeMainGBean(List configurations, AbstractName mainGBean, String mainMethod, String[] args) throws Exception {
+    public void invokeMainGBean(List configurations, AbstractNameQuery mainGBeanQuery, String mainMethod, String[] args) throws Exception {
         startKernel();
         loadConfigurations(configurations);
 
         log.info("Server startup completed");
+        Set matches = kernel.listGBeans(mainGBeanQuery);
+        if (matches.isEmpty()) {
+            throw new Exception("No match for AbstractNameQuery: " + mainGBeanQuery);
+        }
+        if (matches.size() > 1) {
+            throw new Exception("Ambiguous AbstractNameQuery: " + mainGBeanQuery + " matches: " + matches);
+        }
+        AbstractName mainGBean = (AbstractName) matches.iterator().next();
 
         // invoke the main method
         kernel.invoke(
@@ -137,11 +147,12 @@
         throw new NoSuchConfigException(moduleId);
     }
 
-    protected void loadConfigurations(List configurations) throws NoSuchConfigException, LifecycleException {
+    protected void loadConfigurations(List configurations) throws NoSuchConfigException, LifecycleException, MissingDependencyException {
         // load and start the configurations
         ConfigurationManager configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
+        Collection resolvedConfigurations = configurationManager.getArtifactResolver().resolveInClassLoader(configurations);
         try {
-            for (Iterator i = configurations.iterator(); i.hasNext();) {
+            for (Iterator i = resolvedConfigurations.iterator(); i.hasNext();) {
                 Artifact configID = (Artifact) i.next();
                 configurationManager.loadConfiguration(configID);
                 configurationManager.startConfiguration(configID);

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLineManifest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLineManifest.java?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLineManifest.java (original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/CommandLineManifest.java Sun May 14 14:45:03 2006
@@ -16,25 +16,22 @@
  */
 package org.apache.geronimo.system.main;
 
-import java.util.List;
+import java.io.IOException;
+import java.net.JarURLConnection;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
 import java.util.ArrayList;
-import java.util.StringTokenizer;
 import java.util.Collections;
+import java.util.List;
+import java.util.StringTokenizer;
 import java.util.jar.Attributes;
 import java.util.jar.Manifest;
-import java.net.URL;
-import java.net.JarURLConnection;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.io.IOException;
-import javax.management.ObjectName;
-import javax.management.MalformedObjectNameException;
 
-import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
- *
- *
  * @version $Rev$ $Date$
  */
 public class CommandLineManifest {
@@ -67,10 +64,10 @@
         // get the main gbean class
         String mainGBeanString = mainAttributes.getValue(MAIN_GBEAN);
 
-        AbstractName mainGBean = null;
-        if(mainGBeanString != null) {
+        AbstractNameQuery mainGBean = null;
+        if (mainGBeanString != null) {
             try {
-                mainGBean = new AbstractName(new URI(mainGBeanString));
+                mainGBean = new AbstractNameQuery(new URI(mainGBeanString));
             } catch (URISyntaxException e) {
                 System.err.println("Invalid Main-GBean name: " + mainGBeanString);
                 System.exit(1);
@@ -85,15 +82,10 @@
         List configurations = new ArrayList();
         String configurationsString = mainAttributes.getValue(CONFIGURATIONS);
         if (configurationsString != null) {
-            for (StringTokenizer tokenizer = new StringTokenizer(configurationsString, " "); tokenizer.hasMoreTokens();) {
+            for (StringTokenizer tokenizer = new StringTokenizer(configurationsString, " "); tokenizer.hasMoreTokens();)
+            {
                 String configuration = tokenizer.nextToken();
-                try {
-                    configurations.add(new URI(configuration));
-                } catch (URISyntaxException e) {
-                    System.err.println("Invalid URI in Manifest Configurations entry: " + configuration);
-                    System.exit(1);
-                    throw new AssertionError();
-                }
+                configurations.add(Artifact.create(configuration));
             }
         }
 
@@ -111,7 +103,8 @@
         List extensionDirs = new ArrayList();
         String extensionDirsString = mainAttributes.getValue(EXTENSION_DIRS);
         if (extensionDirsString != null) {
-            for (StringTokenizer tokenizer = new StringTokenizer(extensionDirsString, " "); tokenizer.hasMoreTokens();) {
+            for (StringTokenizer tokenizer = new StringTokenizer(extensionDirsString, " "); tokenizer.hasMoreTokens();)
+            {
                 String directory = tokenizer.nextToken();
                 extensionDirs.add(directory);
             }
@@ -121,13 +114,13 @@
         return commandLineManifest;
     }
 
-    private final AbstractName mainGBean;
+    private final AbstractNameQuery mainGBean;
     private final String mainMethod;
     private final List configurations;
     private final List endorsedDirs;
     private final List extensionDirs;
 
-    public CommandLineManifest(AbstractName mainGBean, String mainMethod, List configurations, List endorsedDirs, List extensionDirs) {
+    public CommandLineManifest(AbstractNameQuery mainGBean, String mainMethod, List configurations, List endorsedDirs, List extensionDirs) {
         this.mainGBean = mainGBean;
         this.mainMethod = mainMethod;
         this.configurations = Collections.unmodifiableList(configurations);
@@ -135,7 +128,7 @@
         this.extensionDirs = extensionDirs;
     }
 
-    public AbstractName getMainGBean() {
+    public AbstractNameQuery getMainGBeanQuery() {
         return mainGBean;
     }
 

Copied: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/LocalServer.java (from r405917, geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/LocalServer.java)
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/LocalServer.java?p2=geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/LocalServer.java&p1=geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/LocalServer.java&r1=405917&r2=406440&rev=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/LocalServer.java (original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/LocalServer.java Sun May 14 14:45:03 2006
@@ -15,26 +15,18 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.deployment.cli;
+package org.apache.geronimo.system.main;
 
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
-import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.config.PersistentConfigurationList;
 import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.system.main.CommandLine;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 /**
@@ -42,8 +34,8 @@
  */
 public class LocalServer extends CommandLine {
 
-    public LocalServer(String configListLocation) throws Exception {
-        startKernel(Artifact.create("geronimo/j2ee-system//car"));
+    public LocalServer(String bootModule, String configListLocation) throws Exception {
+        startKernel(Artifact.create(bootModule));
         Runtime.getRuntime().addShutdownHook(new Thread("Geronimo shutdown thread") {
             public void run() {
                 getKernel().shutdown();

Modified: geronimo/branches/1.1/modules/upgrade/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/upgrade/maven.xml?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/upgrade/maven.xml (original)
+++ geronimo/branches/1.1/modules/upgrade/maven.xml Sun May 14 14:45:03 2006
@@ -40,14 +40,14 @@
         <attainGoal name="build"/>
     </goal>
 
-    <preGoal name="jar:jar">
-
-
-        <j:forEach var="dep" items="${pom.dependencies}">
-            <j:if test="${!dep.artifactId.equals('velocity') and  !dep.artifactId.equals('commons-jelly-tags-velocity')}">
-                <unjar src="${maven.repo.local}/${dep.groupId}/jars/${dep.artifact}" dest="${maven.build.dir}/classes"/>
-            </j:if>
-        </j:forEach>
-    </preGoal>
+    <!--<preGoal name="jar:jar">-->
+<!---->
+<!---->
+        <!--<j:forEach var="dep" items="${pom.dependencies}">-->
+            <!--<j:if test="${!dep.artifactId.equals('velocity') and  !dep.artifactId.equals('commons-jelly-tags-velocity')}">-->
+                <!--<unjar src="${maven.repo.local}/${dep.groupId}/jars/${dep.artifact}" dest="${maven.build.dir}/classes"/>-->
+            <!--</j:if>-->
+        <!--</j:forEach>-->
+    <!--</preGoal>-->
 
 </project>

Modified: geronimo/branches/1.1/modules/upgrade/project.properties
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/upgrade/project.properties?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/upgrade/project.properties (original)
+++ geronimo/branches/1.1/modules/upgrade/project.properties Sun May 14 14:45:03 2006
@@ -5,4 +5,4 @@
 # set eclipse project name (used in eclipse plugin V1.11 onwards)
 maven.eclipse.project.name=${geronimo.maven.eclipse.modules.project.prefix}${pom.artifactId}
 
-maven.jar.mainclass=org.apache.geronimo.upgrade.CLIUpgrade
\ No newline at end of file
+maven.jar.mainclass=org.apache.geronimo.upgrade.UpgradeGBean
\ No newline at end of file

Modified: geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java (original)
+++ geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java Sun May 14 14:45:03 2006
@@ -66,9 +66,11 @@
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/web-1.0", "http://geronimo.apache.org/xml/ns/j2ee/web-1.1");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/web/jetty", "http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/web/jetty-1.0", "http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1");
+        NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0", "http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/web/jetty/config", "http://geronimo.apache.org/xml/ns/j2ee/web/jetty/config-1.0");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/web/tomcat", "http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/web/tomcat-1.0", "http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1");
+        NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.0", "http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/web/tomcat/config", "http://geronimo.apache.org/xml/ns/j2ee/web/tomcat/config-1.0");
         NAMESPACE_UPDATES.put("http://www.openejb.org/xml/ns/openejb-jar", "http://www.openejb.org/xml/ns/openejb-jar-2.1");
         NAMESPACE_UPDATES.put("http://www.openejb.org/xml/ns/openejb-jar-2.0", "http://www.openejb.org/xml/ns/openejb-jar-2.1");

Copied: geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/UpgradeGBean.java (from r405917, geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/CLIUpgrade.java)
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/UpgradeGBean.java?p2=geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/UpgradeGBean.java&p1=geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/CLIUpgrade.java&r1=405917&r2=406440&rev=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/CLIUpgrade.java (original)
+++ geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/UpgradeGBean.java Sun May 14 14:45:03 2006
@@ -21,16 +21,32 @@
 import java.io.FileInputStream;
 import java.io.File;
 import java.io.IOException;
-import java.io.OutputStream;
-import java.io.FileOutputStream;
 import java.io.PrintWriter;
+import java.io.FileWriter;
+import java.io.Writer;
 
 import org.apache.xmlbeans.XmlException;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
 
 /**
  * @version $Rev:$ $Date:$
  */
-public class CLIUpgrade {
+public class UpgradeGBean {
+
+    public void execute(String[] args) throws Exception {
+        if (args == null || args.length == 0 || args.length > 2) {
+            System.out.println("Parameter usage: ");
+            System.out.println("inputPlan outputPlan");
+            System.out.println("or");
+            System.out.println("inputPlan");
+            System.out.println("in which case the output will be in the same location as inputPlan with '.upgraded' appended");
+            return;
+        }
+        String inputFile = args[0];
+        String outFile = args.length == 2? args[1]: inputFile + ".upgrade";
+        execute(inputFile, outFile);
+    }
 
     public void execute(String infile, String outfile) throws IOException, XmlException {
         File inFile = new File(infile);
@@ -39,7 +55,7 @@
         }
         InputStream in = new FileInputStream(inFile);
         File outFile = new File(outfile);
-        OutputStream out = new FileOutputStream(outFile);
+        Writer out = new FileWriter(outFile);
         PrintWriter outWriter = new PrintWriter(out);
         new Upgrade1_0To1_1().upgrade(in, outWriter);
         outWriter.flush();
@@ -48,16 +64,19 @@
     }
 
     public static void main(String[] args) throws Exception {
-        if (args == null || args.length == 0 || args.length > 2) {
-            System.out.println("Parameter usage: ");
-            System.out.println("inputPlan outputPlan");
-            System.out.println("or");
-            System.out.println("inputPlan");
-            System.out.println("in which case the output will be in the same location as inputPlan with '.upgraded' appended");
-            return;
-        }
-        String inputFile = args[0];
-        String outFile = args.length == 2? args[1]: inputFile + ".upgrade";
-        new CLIUpgrade().execute(inputFile, outFile);
+        new UpgradeGBean().execute(args);
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(UpgradeGBean.class);
+        infoBuilder.addOperation("execute", new Class[] {String[].class});
+        infoBuilder.addOperation("execute", new Class[] {String.class, String.class});
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
     }
 }

Modified: geronimo/branches/1.1/plugins/geronimo-packaging-plugin/plugin.jelly
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/plugins/geronimo-packaging-plugin/plugin.jelly?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/plugins/geronimo-packaging-plugin/plugin.jelly (original)
+++ geronimo/branches/1.1/plugins/geronimo-packaging-plugin/plugin.jelly Sun May 14 14:45:03 2006
@@ -61,6 +61,9 @@
             moduleFile="${geronimo.packaging.moduleFile}"
             packageFile="${maven.build.dir}/${maven.final.name}.car"
             mainClass="${geronimo.packaging.mainClass}"
+            mainGBean="${geronimo.packaging.mainGBean}"
+            mainMethod="${geronimo.packaging.mainMethod}"
+            configurations="${geronimo.packaging.configurations}"
             classPath="${geronimo.packaging.classPath}"
             endorsedDirs="${geronimo.packaging.endorsedDirs}"
             extensionDirs="${geronimo.packaging.extensionDirs}"

Modified: geronimo/branches/1.1/plugins/geronimo-packaging-plugin/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/plugins/geronimo-packaging-plugin/project.xml?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/plugins/geronimo-packaging-plugin/project.xml (original)
+++ geronimo/branches/1.1/plugins/geronimo-packaging-plugin/project.xml Sun May 14 14:45:03 2006
@@ -22,7 +22,7 @@
     <groupId>geronimo</groupId>
     <id>geronimo-packaging-plugin</id>
     <name>Geronimo :: Maven Packaging Plugin</name>
-    <currentVersion>1.1.0-8</currentVersion>
+    <currentVersion>1.1.0-9</currentVersion>
 
     <dependencies>
         <dependency>

Modified: geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java (original)
+++ geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java Sun May 14 14:45:03 2006
@@ -76,6 +76,9 @@
             String.class.getName(),
             String.class.getName(),
             String.class.getName(),
+            String.class.getName(),
+            String.class.getName(),
+            String.class.getName(),
     };
 
     private String repositoryClass;
@@ -93,6 +96,9 @@
     private File moduleFile;
     private File packageFile;
     private String mainClass;
+    private String mainGBean;
+    private String mainMethod;
+    private String configurations;
     private String classPath;
     private String endorsedDirs;
     private String extensionDirs;
@@ -232,6 +238,30 @@
         this.mainClass = mainClass;
     }
 
+    public String getMainGBean() {
+        return mainGBean;
+    }
+
+    public void setMainGBean(String mainGBean) {
+        this.mainGBean = mainGBean;
+    }
+
+    public String getMainMethod() {
+        return mainMethod;
+    }
+
+    public void setMainMethod(String mainMethod) {
+        this.mainMethod = mainMethod;
+    }
+
+    public String getConfigurations() {
+        return configurations;
+    }
+
+    public void setConfigurations(String configurations) {
+        this.configurations = configurations;
+    }
+
     public String getClassPath() {
         return classPath;
     }
@@ -426,7 +456,7 @@
 
     private List invokeDeployer(Kernel kernel, AbstractName deployer, String targetConfigStore) throws Exception {
         boolean isExecutable = mainClass != null;
-        Object[] args = {Boolean.FALSE, planFile, moduleFile, isExecutable ? packageFile : null, Boolean.valueOf(!isExecutable), mainClass, classPath, endorsedDirs, extensionDirs, targetConfigStore};
+        Object[] args = {Boolean.FALSE, planFile, moduleFile, isExecutable ? packageFile : null, Boolean.valueOf(!isExecutable), mainClass, mainGBean, mainMethod, configurations, classPath, endorsedDirs, extensionDirs, targetConfigStore};
         return (List) kernel.invoke(deployer, "deploy", args, ARG_TYPES);
     }
 }

Modified: geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilderShell.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilderShell.java?rev=406440&r1=406439&r2=406440&view=diff
==============================================================================
--- geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilderShell.java (original)
+++ geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilderShell.java Sun May 14 14:45:03 2006
@@ -63,6 +63,9 @@
     private File moduleFile;
     private File packageFile;
     private String mainClass;
+    private String mainGBean;
+    private String mainMethod;
+    private String configurations;
     private String classPath;
     private String endorsedDirs;
     private String extensionDirs;
@@ -154,6 +157,30 @@
         this.mainClass = mainClass;
     }
 
+    public String getMainGBean() {
+        return mainGBean;
+    }
+
+    public void setMainGBean(String mainGBean) {
+        this.mainGBean = mainGBean;
+    }
+
+    public String getMainMethod() {
+        return mainMethod;
+    }
+
+    public void setMainMethod(String mainMethod) {
+        this.mainMethod = mainMethod;
+    }
+
+    public String getConfigurations() {
+        return configurations;
+    }
+
+    public void setConfigurations(String configurations) {
+        this.configurations = configurations;
+    }
+
     public String getClassPath() {
         return classPath;
     }
@@ -236,6 +263,9 @@
             set("setEndorsedDirs", endorsedDirs, String.class, packageBuilder);
             set("setExtensionDirs", extensionDirs, String.class, packageBuilder);
             set("setMainClass", mainClass, String.class, packageBuilder);
+            set("setMainMethod", mainMethod, String.class, packageBuilder);
+            set("setMainGBean", mainGBean, String.class, packageBuilder);
+            set("setConfigurations", configurations, String.class, packageBuilder);
             set("setModuleFile", moduleFile, File.class, packageBuilder);
             set("setPackageFile", packageFile, File.class, packageBuilder);
             set("setPlanFile", planFile, File.class, packageBuilder);