geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r394605 - in /geronimo/branches/1.1: applications/console-standard/src/java/org/apache/geronimo/console/car/ applications/console-standard/src/webapp/WEB-INF/view/car/ assemblies/j2ee-jetty-server/ assemblies/j2ee-jetty-server/src/var/confi...
Date Mon, 17 Apr 2006 03:57:32 GMT
Author: ammulder
Date: Sun Apr 16 20:57:30 2006
New Revision: 394605

URL: http://svn.apache.org/viewcvs?rev=394605&view=rev
Log:
Plugins work pretty well now
Cut down on what goes into the J2EE assemblies, since you'll be able
  to download examples, etc. right into the server after installation.

Modified:
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/IndexHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/ResultsHandler.java
    geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/download.jsp
    geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/index.jsp
    geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/list.jsp
    geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/results.jsp
    geronimo/branches/1.1/assemblies/j2ee-jetty-server/project.xml
    geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/config.xml
    geronimo/branches/1.1/assemblies/j2ee-tomcat-server/project.xml
    geronimo/branches/1.1/assemblies/j2ee-tomcat-server/src/var/config/config.xml
    geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigInstallerGBean.java

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/IndexHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/IndexHandler.java?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/IndexHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/IndexHandler.java
Sun Apr 16 20:57:30 2006
@@ -43,6 +43,11 @@
     public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
         ConfigurationData[] configs = PortletManager.getConfigurations(request, null, false);
         request.setAttribute("configurations", configs);
+        String repository = request.getParameter("repository");
+        if(repository == null) {
+            repository = "http://www.geronimoplugins.com/repository/";
+        }
+        request.setAttribute("repository", repository);
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/ResultsHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/ResultsHandler.java?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/ResultsHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/car/ResultsHandler.java
Sun Apr 16 20:57:30 2006
@@ -53,10 +53,8 @@
         String pass = request.getParameter("repo-pass");
         String configId = request.getParameter("configId");
         request.setAttribute("configId", configId);
-        List configs = (List) request.getPortletSession(true).getAttribute("car.install.configurations");
-        List deps = (List) request.getPortletSession(true).getAttribute("car.install.dependencies");
+        List deps = (List) request.getPortletSession(true).getAttribute("car.install.results");
         request.setAttribute("dependencies", deps);
-        request.setAttribute("configurations", configs);
         request.setAttribute("repository", repo);
         request.setAttribute("repouser", user);
         request.setAttribute("repopass", pass);

Modified: geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/download.jsp
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/download.jsp?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/download.jsp
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/download.jsp
Sun Apr 16 20:57:30 2006
@@ -6,14 +6,15 @@
 
 <p>Processing ${configId}...</p>
 
-<p>Dependencies</p>
+<p>Found the following dependencies for this plugin.  Any missing dependencies
+    will be installed for you automatically if you proceed.</p>
 <ul>
 <c:forEach var="jar" items="${dependencies}">
     <li>${jar}</li>
 </c:forEach>
 </ul>
 
-<form name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
+<form name="<portlet:namespace/>PluginForm" action="<portlet:actionURL/>">
     <input type="hidden" name="file" value="${file}" />
     <input type="hidden" name="configId" value="${configId}" />
     <input type="hidden" name="mode" value="download-after" />
@@ -21,7 +22,7 @@
     <input type="hidden" name="repo-user" value="${repouser}" />
     <input type="hidden" name="repo-pass" value="${repopass}" />
     <input type="hidden" name="proceed" value="true" />
-    <input type="submit" value="Install Configuration" />
+    <input type="submit" value="Install Plugin" />
 </form>
 
 <p><a href="<portlet:actionURL portletMode="view"><portlet:param name="mode"
value="index-before" /></portlet:actionURL>">Cancel</a></p>

Modified: geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/index.jsp
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/index.jsp?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/index.jsp
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/index.jsp
Sun Apr 16 20:57:30 2006
@@ -3,13 +3,37 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <portlet:defineObjects/>
-<p>This portlet lets you import or export Geronimo configurations from a Maven repository.
+<p>This portlet lets you install or create Geronimo plugins.
     This can be used to install new features into a Geronimo server at runtime.</p>
 
-<h2>Export Configurations</h2>
+<h2>Install Geronimo Plugins</h2>
 
-<p>Choose a configuration in the current Geronimo server to export.  The configuration
-  will be saved as a CAR file to your local filesystem.</p>
+<p>Choose a remote repository to inspect for available Geronimo plugins.  The
+repository must have a <tt>geronimo-plugins.xml</tt> file in the root directory
+listing the available plugins in the repository.</p>
+
+<p>You can also download running configurations from another Geronimo server
+just as if you're browsing and installing third-party plugins.
+ If you want to point to a remote Geronimo server, enter a URL such as
+<tt>http://geronimo-server:8080/console-standard/maven-repo/</tt> and the enter
+the administrator username and password in the optional authentication fields.</p>
+
+<form name="<portlet:namespace/>PluginForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="mode" value="index-after" />
+    <b>Repository:</b> <input type="text" name="repository" value="${repository}"
size="30" maxlength="200" />
+    <input type="submit" value="Search for Plugins" />
+    <br /><b>Optional Authentication:</b>
+       User: <input type="text" name="username" value="${repouser}" size="20" maxlength="200"
/>
+       Password: <input type="password" name="password" value="${repopass}" size="20"
maxlength="200" />
+
+</form>
+
+<h2>Create Geronimo Plugin</h2>
+
+<p>Choose a configuration in the current Geronimo server to export as a Geronimo
+   plugin.  The configuration will be saved as a CAR file to your local filesystem.
+   <i>Note: at present, you must manually add a <tt>META-INF/geronimo-plugin.xml</tt>
+   file to the CAR after you export it in order for it to be a valid plugin.</i></p>
 
 <form action="<%=request.getContextPath()%>/car-export">
     <select name="configId">
@@ -18,25 +42,6 @@
         <option>${config.configID}</option>
       </c:forEach>
     </select>
-    <input type="submit" value="Export Configuration" />
+    <input type="submit" value="Export Plugin" />
 </form>
 
-<h2>Import Configurations</h2>
-
-<p>Choose a remote repository to inspect for available Geronimo configurations.  The
-repository must have a geronimo-configs.xml file in the root directory
-listing the available configurations in the repository.</p>
-
-<p>If you want to point to a remote Geronimo server, enter a URL such as
-<tt>http://geronimo-server:8080/console-standard/maven-repo/</tt> and the enter
-the administrator username and password in the optional authentication fields.</p>
-
-<form name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
-    <input type="hidden" name="mode" value="index-after" />
-    Repository: <input type="text" name="repository" value="${repository}" size="20" maxlength="200"
/>
-    <input type="submit" value="Search for Configurations" />
-    <br />Optional Authentication:
-       User: <input type="text" name="username" value="${repouser}" size="20" maxlength="200"
/>
-       Password: <input type="password" name="password" value="${repopass}" size="20"
maxlength="200" />
-
-</form>

Modified: geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/list.jsp
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/list.jsp?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/list.jsp
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/list.jsp
Sun Apr 16 20:57:30 2006
@@ -3,11 +3,11 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <portlet:defineObjects/>
-<p>These are the configurations available in the selected repository.  The entries
+<p>These are the Geronimo plugins available in the selected repository.  The entries
 that are hyperlinks may be installed into the local server.  The other entries are
 already available in the local server.</p>
 
-<p><b>Available Configurations:</b></p>
+<p><b>Available Plugins:</b></p>
 
 <c:forEach var="category" items="${categories}">
   <p>${category.key}</p>

Modified: geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/results.jsp
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/results.jsp?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/results.jsp
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/webapp/WEB-INF/view/car/results.jsp
Sun Apr 16 20:57:30 2006
@@ -3,19 +3,10 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <portlet:defineObjects/>
-<p>The configuration ${configId} has been installed.  This included:</p>
-
-<c:if test="${! empty configurations}">
-  <p><b>Configurations:</b></p>
-  <ul>
-    <c:forEach var="config" items="${configurations}">
-      <li>${config.name} (${config.action})</li>
-    </c:forEach>
-  </ul>
-</c:if>
+<p>The plugin ${configId} has been installed.</p>
 
 <c:if test="${! empty dependencies}">
-  <p><b>Additional JARs:</b></p>
+  <p><b>Files Processed:</b></p>
   <ul>
     <c:forEach var="dep" items="${dependencies}">
       <li>${dep.name} (${dep.action})</li>
@@ -23,7 +14,7 @@
   </ul>
 </c:if>
 
-<form name="<portlet:namespace/>KeystoreForm" action="<portlet:actionURL/>">
+<form name="<portlet:namespace/>PluginForm" action="<portlet:actionURL/>">
     <input type="hidden" name="mode" value="results-after" />
     <input type="hidden" name="configId" value="${configId}" />
     <input type="hidden" name="repository" value="${repository}" />

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=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/assemblies/j2ee-jetty-server/project.xml (original)
+++ geronimo/branches/1.1/assemblies/j2ee-jetty-server/project.xml Sun Apr 16 20:57:30 2006
@@ -936,13 +936,13 @@
             <artifactId>org.mortbay.jetty</artifactId>
             <version>${jetty_version}</version>
         </dependency>
-<!-- Should be installed when jUDDI app is installed
+
         <dependency>
             <groupId>juddi</groupId>
             <artifactId>juddi</artifactId>
             <version>${juddi_version}</version>
         </dependency>
--->
+
         <dependency>
             <groupId>openejb</groupId>
             <artifactId>openejb-builder</artifactId>

Modified: geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/config.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/config.xml?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/config.xml (original)
+++ geronimo/branches/1.1/assemblies/j2ee-jetty-server/src/var/config/config.xml Sun Apr 16
20:57:30 2006
@@ -102,8 +102,8 @@
     <configuration name="geronimo/jsp-examples-jetty/${pom.currentVersion}/car" load="false"/>
     <configuration name="geronimo/webconsole-jetty/${pom.currentVersion}/car"/>
     <configuration name="geronimo/uddi-jetty/${pom.currentVersion}/car" load="false"/>
-    <configuration name="geronimo/jmxdebug-jetty/${pom.currentVersion}/car" load="false"/>
+    <configuration name="geronimo/jmxdebug-jetty/${pom.currentVersion}/car"/>
     <configuration name="geronimo/daytrader-derby-jetty/${pom.currentVersion}/car" load="false"/>
-    <configuration name="geronimo/remote-deploy-jetty/${pom.currentVersion}/car" load="false"/>
-    <configuration name="geronimo/hot-deployer/${pom.currentVersion}/car"  load="false"/>
+    <configuration name="geronimo/remote-deploy-jetty/${pom.currentVersion}/car" />
+    <configuration name="geronimo/hot-deployer/${pom.currentVersion}/car" />
 </attributes>

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=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/assemblies/j2ee-tomcat-server/project.xml (original)
+++ geronimo/branches/1.1/assemblies/j2ee-tomcat-server/project.xml Sun Apr 16 20:57:30 2006
@@ -89,6 +89,7 @@
                 <geronimo.assemble>install</geronimo.assemble>
             </properties>
         </dependency>
+<!--
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>directory</artifactId>
@@ -107,6 +108,7 @@
                 <geronimo.assemble>install</geronimo.assemble>
             </properties>
         </dependency>
+-->
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>system-database</artifactId>
@@ -219,6 +221,7 @@
             </properties>
         </dependency>
 <!-- applications -->
+<!--
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>ldap-demo-tomcat</artifactId>
@@ -228,6 +231,7 @@
                 <geronimo.assemble>install</geronimo.assemble>
             </properties>
         </dependency>
+-->
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>welcome-tomcat</artifactId>
@@ -237,6 +241,7 @@
                 <geronimo.assemble>install</geronimo.assemble>
             </properties>
         </dependency>
+<!--
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>servlets-examples-tomcat</artifactId>
@@ -255,6 +260,7 @@
                 <geronimo.assemble>install</geronimo.assemble>
             </properties>
         </dependency>
+-->
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>webconsole-tomcat</artifactId>
@@ -292,6 +298,7 @@
                 <geronimo.assemble>install</geronimo.assemble>
             </properties>
         </dependency>
+<!--
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>daytrader-derby-tomcat</artifactId>
@@ -310,7 +317,7 @@
                 <geronimo.assemble>install</geronimo.assemble>
             </properties>
         </dependency>
-
+-->
         <!-- unpack --> 
         <dependency>
             <groupId>geronimo</groupId>
@@ -837,7 +844,7 @@
             <artifactId>concurrent</artifactId>
             <version>${concurrent_version}</version>
         </dependency>
-
+<!-- Remove all Apache Directory stuff
         <dependency>
             <groupId>directory</groupId>
             <artifactId>apacheds-core</artifactId>
@@ -903,9 +910,7 @@
             <artifactId>ldap-common</artifactId>
             <version>${apacheds_version}</version>
         </dependency>
-
-<!-- geronimo jars -->
-<!-- geronimo spec jars -->
+-->
 
         <dependency>
             <groupId>howl</groupId>
@@ -1117,6 +1122,12 @@
             <version>${xstream_version}</version>
         </dependency>
 
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>${commons_fileupload_version}</version>
+        </dependency>
+
 
 <!-- stuff that has no clear purpose -->
         <dependency>
@@ -1126,12 +1137,6 @@
         </dependency>
 
         <dependency>
-            <groupId>commons-fileupload</groupId>
-            <artifactId>commons-fileupload</artifactId>
-            <version>${commons_fileupload_version}</version>
-        </dependency>
-
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>${junit_version}</version>
@@ -1263,11 +1268,13 @@
             <artifactId>geronimo-derby</artifactId>
             <version>${pom.currentVersion}</version>
         </dependency>
+<!-- Should be installed when Directory is installed
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-directory</artifactId>
             <version>${pom.currentVersion}</version>
         </dependency>
+-->
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-j2ee</artifactId>

Modified: geronimo/branches/1.1/assemblies/j2ee-tomcat-server/src/var/config/config.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/assemblies/j2ee-tomcat-server/src/var/config/config.xml?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/assemblies/j2ee-tomcat-server/src/var/config/config.xml (original)
+++ geronimo/branches/1.1/assemblies/j2ee-tomcat-server/src/var/config/config.xml Sun Apr
16 20:57:30 2006
@@ -30,17 +30,6 @@
         <gbean name="JMXService">
             <attribute name="url">service:jmx:rmi://${PlanServerHostname}:${PlanJMXPort}/jndi/rmi://${PlanServerHostname}:${PlanNamingPort}/JMXConnector</attribute>
         </gbean>
-<!--
-        <gbean name="geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-security/1.2-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=Keystore,name=geronimo-default"
gbeanInfo="org.apache.geronimo.security.keystore.FileKeystoreInstance">
-            <attribute name="keystoreName">geronimo-default</attribute>
-            <attribute name="keystorePassword">{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNvZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9sYW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAEArVToThqcjvbXFD5C2uUmpwdAADQUVT</attribute>
-            <attribute name="keyPasswords">{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNvZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9sYW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAIGdUCEvsw3HNoD82HNiAiTo5m8E/c8pnljroPhWCnB89cHQAA0FFUw==</attribute>
-            <attribute name="keystorePath">var/security/keystores/geronimo-default</attribute>
-            <reference name="ServerInfo">
-                <pattern><gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-system/1.2-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</gbean-name></pattern>
-            </reference>
-        </gbean>
--->
     </configuration>
     <configuration name="geronimo/j2ee-corba/${pom.currentVersion}/car" load="false">
         <gbean name="NameServer">
@@ -67,13 +56,13 @@
         </gbean>
     </configuration>
     <configuration name="geronimo/activemq/${pom.currentVersion}/car"/>
-    <configuration name="geronimo/directory/${pom.currentVersion}/car">
+    <configuration name="geronimo/directory/${pom.currentVersion}/car" load="false">
         <gbean name="geronimo.server:name=DirectoryService">
             <attribute name="host">${PlanServerHostname}</attribute>
             <attribute name="port">${PlanLdapPort}</attribute>
         </gbean>
     </configuration>
-    <configuration name="geronimo/ldap-realm/${pom.currentVersion}/car"/>
+    <configuration name="geronimo/ldap-realm/${pom.currentVersion}/car" load="false"/>
     <configuration name="geronimo/tomcat/${pom.currentVersion}/car">
         <gbean name="TomcatResources"/>
         <gbean name="TomcatWebConnector">
@@ -110,13 +99,13 @@
     </configuration>
     <configuration name="geronimo/tomcat-deployer/${pom.currentVersion}/car"/>
     <configuration name="geronimo/welcome-tomcat/${pom.currentVersion}/car"/>
-    <configuration name="geronimo/ldap-demo-tomcat/${pom.currentVersion}/car"/>
-    <configuration name="geronimo/servlets-examples-tomcat/${pom.currentVersion}/car"/>
-    <configuration name="geronimo/jsp-examples-tomcat/${pom.currentVersion}/car"/>
+    <configuration name="geronimo/ldap-demo-tomcat/${pom.currentVersion}/car" load="false"/>
+    <configuration name="geronimo/servlets-examples-tomcat/${pom.currentVersion}/car"
load="false"/>
+    <configuration name="geronimo/jsp-examples-tomcat/${pom.currentVersion}/car" load="false"/>
     <configuration name="geronimo/webconsole-tomcat/${pom.currentVersion}/car"/>
-    <configuration name="geronimo/uddi-tomcat/${pom.currentVersion}/car"/>
+    <configuration name="geronimo/uddi-tomcat/${pom.currentVersion}/car" load="false"/>
     <configuration name="geronimo/jmxdebug-tomcat/${pom.currentVersion}/car"/>
-    <configuration name="geronimo/daytrader-derby-tomcat/${pom.currentVersion}/car"/>
-    <configuration name="geronimo/remote-deploy-tomcat/${pom.currentVersion}/car"/>
+    <configuration name="geronimo/daytrader-derby-tomcat/${pom.currentVersion}/car" load="false"/>
+    <configuration name="geronimo/remote-deploy-tomcat/${pom.currentVersion}/car" />
     <configuration name="geronimo/hot-deployer/${pom.currentVersion}/car" />
 </attributes>

Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java
(original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java
Sun Apr 16 20:57:30 2006
@@ -71,8 +71,10 @@
                     Artifact uri = results.getDependenciesInstalled()[i];
                     System.out.print(DeployUtils.reformat("Installed new: "+uri, 4, 72));
                 }
-                System.out.println();
-                System.out.println(DeployUtils.reformat("Downloaded "+(results.getTotalDownloadBytes()/1024)+"
kB in "+time+"s ("+results.getTotalDownloadBytes()/(1024*time)+" kB/s)", 4, 72));
+                if(results.getTotalDownloadBytes() > 0 && time > 0) {
+                    System.out.println();
+                    System.out.println(DeployUtils.reformat("Downloaded "+(results.getTotalDownloadBytes()/1024)+"
kB in "+time+"s ("+results.getTotalDownloadBytes()/(1024*time)+" kB/s)", 4, 72));
+                }
             }
             if(results.isFinished() && !results.isFailed() && results.getInstalledConfigIDs().length
== 1) {
                 Artifact target = results.getInstalledConfigIDs()[0];

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigInstallerGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigInstallerGBean.java?rev=394605&r1=394604&r2=394605&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigInstallerGBean.java
(original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigInstallerGBean.java
Sun Apr 16 20:57:30 2006
@@ -313,10 +313,16 @@
 
     public void install(ConfigurationList list, String username, String password, DownloadPoller
poller) {
         try {
+            // For each configuration in the list to install...
             for (int i = 0; i < list.getConfigurations().length; i++) {
+                // 1. Identify the configuration
                 ConfigurationMetadata metadata = list.getConfigurations()[i];
+                // 2. Validate that we can install it
+                validateConfiguration(metadata);
+                // 3. Download the artifact if necessary, and its dependencies
                 downloadArtifact(metadata.getConfigId(), list.getMainRepository(), list.getBackupRepositories(),
                         username, password, new ResultsFileWriteMonitor(poller));
+                // 4. Installation of this configuration finished successfully
                 poller.addInstalledConfigID(metadata.getConfigId());
             }
         } catch (Exception e) {
@@ -336,19 +342,39 @@
             if(data == null) {
                 throw new IllegalArgumentException("Invalid Configuration Archive "+carFile.getAbsolutePath()+"
see server log for details");
             }
+
+            // 2. Validate that we can install this
+            validateConfiguration(data.getConfiguration());
             
-            // 2. Install the CAR into the repository
+            // 3. Install the CAR into the repository
             ResultsFileWriteMonitor monitor = new ResultsFileWriteMonitor(poller);
             writeableRepo.copyToRepository(carFile, data.getConfiguration().getConfigId(),
monitor);
 
-            // 3. Download all the dependencies
+            // 4. Download all the dependencies
             downloadArtifact(data.getConfiguration().getConfigId(), data.getRepository(),
data.getBackups(),
                     username, password, monitor);
+
+            // 5. Installation of the main configuration finished successfully
             poller.addInstalledConfigID(data.getConfiguration().getConfigId());
         } catch (Exception e) {
             poller.setFailure(e);
         } finally {
             poller.setFinished();
+        }
+    }
+
+    private void validateConfiguration(ConfigurationMetadata metadata) throws MissingDependencyException
{
+        // 1. Check that it's not already running
+        if(configManager.isRunning(metadata.getConfigId())) {
+            throw new IllegalArgumentException("Configuration "+metadata.getConfigId()+"
is already running!");
+        }
+        // 2. Check that we meet the prerequisites
+        ConfigurationMetadata.Prerequisite[] prereqs = metadata.getPrerequisites();
+        for (int i = 0; i < prereqs.length; i++) {
+            ConfigurationMetadata.Prerequisite prereq = prereqs[i];
+            if(resolver.queryArtifacts(prereq.getConfigId()).length == 0) {
+                throw new MissingDependencyException("Required configuration '"+prereq.getConfigId()+"'
is not installed.");
+            }
         }
     }
 



Mime
View raw message