geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r379220 [1/2] - in /geronimo/branches/configid: configs/client-security/src/plan/ configs/console-jetty/src/plan/ configs/console-tomcat/src/plan/ configs/daytrader-jetty/src/plan/ configs/daytrader-tomcat/src/plan/ configs/geronimo-gbean-d...
Date Mon, 20 Feb 2006 20:18:42 GMT
Author: djencks
Date: Mon Feb 20 12:18:37 2006
New Revision: 379220

URL: http://svn.apache.org/viewcvs?rev=379220&view=rev
Log:
Integrate artifact resolver/manager code further.  Many configurations build.

Modified:
    geronimo/branches/configid/configs/client-security/src/plan/plan.xml
    geronimo/branches/configid/configs/console-jetty/src/plan/plan.xml
    geronimo/branches/configid/configs/console-tomcat/src/plan/plan.xml
    geronimo/branches/configid/configs/daytrader-jetty/src/plan/plan.xml
    geronimo/branches/configid/configs/daytrader-tomcat/src/plan/plan.xml
    geronimo/branches/configid/configs/geronimo-gbean-deployer/src/plan/plan.xml
    geronimo/branches/configid/configs/j2ee-deployer/src/plan/plan.xml
    geronimo/branches/configid/configs/j2ee-system/src/plan/plan.xml
    geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml
    geronimo/branches/configid/configs/tomcat-deployer/src/plan/plan.xml
    geronimo/branches/configid/configs/uddi-jetty/src/plan/plan.xml
    geronimo/branches/configid/configs/uddi-tomcat/src/plan/plan.xml
    geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
    geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/branches/configid/modules/jetty-builder/src/schema/geronimo-jetty-1.1.xsd
    geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactManager.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Repository.java
    geronimo/branches/configid/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java
    geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
    geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
    geronimo/branches/configid/modules/service-builder/src/schema/geronimo-config-1.1.xsd
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven1Repository.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java
    geronimo/branches/configid/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/branches/configid/modules/tomcat-builder/src/schema/geronimo-tomcat-1.1.xsd
    geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/branches/configid/modules/web-builder/src/schema/geronimo-web-1.1.xsd
    geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
    geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java

Modified: geronimo/branches/configid/configs/client-security/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/client-security/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/client-security/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/client-security/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -23,7 +23,7 @@
 
 -->
 <configuration
-    xmlns="http://geronimo.apache.org/xml/ns/deployment"
+    xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1"
 
     >
 
@@ -79,7 +79,7 @@
         class="org.apache.geronimo.security.realm.GenericSecurityRealm">
         <attribute name="realmName">client-properties-realm</attribute>
         <xml-reference name="LoginModuleConfiguration">
-            <lc:login-config xmlns:lc="http://geronimo.apache.org/xml/ns/loginconfig">
+            <lc:login-config xmlns:lc="http://geronimo.apache.org/xml/ns/loginconfig-1.0">
                 <lc:login-module control-flag="REQUIRED" server-side="true" wrap-principals="true">
                     <lc:login-domain-name>client-properties-realm</lc:login-domain-name>
                     <lc:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</lc:login-module-class>

Modified: geronimo/branches/configid/configs/console-jetty/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/console-jetty/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/console-jetty/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/console-jetty/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -18,14 +18,11 @@
 
 <!-- $Rev$ $Date$ -->
 
-<application
-    xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
-
-    >
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
 
     <module>
         <web>geronimo-console-framework-${pom.currentVersion}.war</web>
-        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1" configId="console">
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1">
             <context-root>/console</context-root>
             <context-priority-classloader>false</context-priority-classloader>
             <security-realm-name>geronimo-properties-realm</security-realm-name>
@@ -46,7 +43,7 @@
 
     <module>
         <web>geronimo-console-standard-${pom.currentVersion}.war</web>
-        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1" configId="console-standard">
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1">
             <context-root>/console-standard</context-root>
             <context-priority-classloader>false</context-priority-classloader>
         </web-app>

Modified: geronimo/branches/configid/configs/console-tomcat/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/console-tomcat/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/console-tomcat/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/console-tomcat/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -18,14 +18,11 @@
 
 <!-- $Rev$ $Date$ -->
 
-<application
-    xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
-
-    >
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
 
     <module>
         <web>geronimo-console-framework-${pom.currentVersion}.war</web>
-        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1" configId="console">
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1">
             <context-root>/console</context-root>
             <context-priority-classloader>false</context-priority-classloader>
             <cross-context/>
@@ -47,7 +44,7 @@
 
     <module>
         <web>geronimo-console-standard-${pom.currentVersion}.war</web>
-        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1" configId="console-standard">
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1">
             <context-root>/console-standard</context-root>
             <context-priority-classloader>false</context-priority-classloader>
             <cross-context/>

Modified: geronimo/branches/configid/configs/daytrader-jetty/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/daytrader-jetty/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/daytrader-jetty/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/daytrader-jetty/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
-    >
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
 
     <module>
         <web>daytrader-web-${daytrader_version}.war</web>
-        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1"
-            configId="Web" parentId="Trade">
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1">
             <context-priority-classloader>false</context-priority-classloader>
             <service-ref>
                 <service-ref-name>service/Trade</service-ref-name>
@@ -31,9 +29,7 @@
     -->
     <module>
         <ejb>daytrader-ejb-${daytrader_version}.jar</ejb>     <!--  Note this must match the -->
-        <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
-                     configId="TradeEJBs"
-                     >
+        <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
 
 
             <!--
@@ -506,14 +502,26 @@
 
     <module>
         <java>daytrader-streamer-${daytrader_version}.jar</java>
-        <application-client  xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1"
-            configId="foo"
-            clientConfigId="${pom.groupId}/${pom.artifactId}-streamer-client/${daytrader_version}/car">
+        <application-client  xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1">
+            <client-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <configId>
+                    <groupId>${pom.groupId}</groupId>
+                    <artifactId>${pom.artifactId}-streamer-client</artifactId>
+                    <version>${pom.currentVersion}</version>
+                    <type>car</type>
+                </configId>
+            </client-environment>
+            <server-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <configId>
+                    <groupId>${pom.groupId}</groupId>
+                    <artifactId>${pom.artifactId}-streamer-client-server</artifactId>
+                    <version>${pom.currentVersion}</version>
+                    <type>car</type>
+                </configId>
+            </server-environment>
             <resource>
                 <external-rar>activemq/activemq-ra/${activemq_version}/rar</external-rar>
-                <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
-           configId="org/apache/geronimo/SystemJMS"
-           parentId="org/apache/geronimo/ActiveMQServer">
+                <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
                     <resourceadapter>
                         <resourceadapter-instance>
                             <resourceadapter-name>ActiveMQ RA</resourceadapter-name>
@@ -564,10 +572,7 @@
     <ext-module>
         <connector>TradeDataSource</connector>
         <external-path>tranql/tranql-connector-derby-embed-xa/${tranql_vendors_version}/rar</external-path>
-        <connector
-            xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1"
-            configId="TradeDataSource"
-            >
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
 
 
 
@@ -604,11 +609,7 @@
     <ext-module>
         <connector>TradeJMS</connector>
         <external-path>activemq/activemq-ra/${activemq_version}/rar</external-path>
-        <connector
-            xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1"
-            xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
-            configId="TradeJMS"
-            >
+        <connector  xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
 
             <resourceadapter>
                 <!-- how to connect to the JMS Server -->

Modified: geronimo/branches/configid/configs/daytrader-tomcat/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/daytrader-tomcat/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/daytrader-tomcat/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/daytrader-tomcat/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
-    >
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
 
     <module>
         <web>daytrader-web-${daytrader_version}.war</web>
-        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1"
-            configId="Web" parentId="Trade">
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1">
             <context-priority-classloader>false</context-priority-classloader>
             <service-ref>
                 <service-ref-name>service/Trade</service-ref-name>
@@ -31,9 +29,7 @@
     -->
     <module>
         <ejb>daytrader-ejb-${daytrader_version}.jar</ejb>     <!--  Note this must match the -->
-        <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
-                     configId="TradeEJBs"
-                     >
+        <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
 
 
             <!--
@@ -506,14 +502,26 @@
 
     <module>
         <java>daytrader-streamer-${daytrader_version}.jar</java>
-        <application-client  xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1"
-            configId="foo"
-            clientConfigId="${pom.groupId}/${pom.artifactId}-streamer-client/${daytrader_version}/car">
+        <application-client  xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-1.1">
+            <client-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <configId>
+                    <groupId>${pom.groupId}</groupId>
+                    <artifactId>${pom.artifactId}-streamer-client</artifactId>
+                    <version>${pom.currentVersion}</version>
+                    <type>car</type>
+                </configId>
+            </client-environment>
+            <server-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <configId>
+                    <groupId>${pom.groupId}</groupId>
+                    <artifactId>${pom.artifactId}-streamer-client-server</artifactId>
+                    <version>${pom.currentVersion}</version>
+                    <type>car</type>
+                </configId>
+            </server-environment>
             <resource>
                 <external-rar>activemq/activemq-ra/${activemq_version}/rar</external-rar>
-                <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
-           configId="org/apache/geronimo/SystemJMS"
-           parentId="org/apache/geronimo/ActiveMQServer">
+                <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
                     <resourceadapter>
                         <resourceadapter-instance>
                             <resourceadapter-name>ActiveMQ RA</resourceadapter-name>
@@ -564,10 +572,7 @@
     <ext-module>
         <connector>TradeDataSource</connector>
         <external-path>tranql/tranql-connector-derby-embed-xa/${tranql_vendors_version}/rar</external-path>
-        <connector
-            xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1"
-            configId="TradeDataSource"
-            >
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
 
 
 
@@ -604,11 +609,7 @@
     <ext-module>
         <connector>TradeJMS</connector>
         <external-path>activemq/activemq-ra/${activemq_version}/rar</external-path>
-        <connector
-            xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1"
-            xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
-            configId="TradeJMS"
-            >
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
 
             <resourceadapter>
                 <!-- how to connect to the JMS Server -->

Modified: geronimo/branches/configid/configs/geronimo-gbean-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/geronimo-gbean-deployer/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/geronimo-gbean-deployer/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/geronimo-gbean-deployer/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -55,5 +55,7 @@
             <name>*</name>
         </reference>
     </gbean>
-    
+
+    <!--<gbean name="EnvironmentBuilder" class="org.apache.geronimo.deployment.service.EnvironmentBuilder"/>-->
+
 </configuration>

Modified: geronimo/branches/configid/configs/j2ee-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/j2ee-deployer/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/j2ee-deployer/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/j2ee-deployer/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -21,14 +21,15 @@
         >
 
     <gbean name="EARBuilder" class="org.apache.geronimo.j2ee.deployment.EARConfigBuilder">
-        <attribute name="defaultParentId">${pom.groupId}/j2ee-server/${pom.currentVersion}/car</attribute>
         <!--domain set to wildcard so datasources may be deployed independently on client. -->
         <!--a better solution is to get the domain and server from the parent configuration -->
         <attribute name="transactionContextManagerObjectName">*:name=TransactionContextManager,*</attribute>
         <attribute name="connectionTrackerObjectName">*:name=ConnectionTracker,*</attribute>
         <attribute name="transactionalTimerObjectName">geronimo.server:name=TransactionalThreadPooledTimer,*</attribute>
-        <attribute name="nonTransactionalTimerObjectName">geronimo.server:name=NonTransactionalThreadPooledTimer,*</attribute>
-        <attribute name="corbaGBeanObjectName">geronimo.server:J2EEApplication=null,J2EEModule=geronimo/server-corba/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=CORBABean,name=Server</attribute>
+        <attribute name="nonTransactionalTimerObjectName">
+            geronimo.server:name=NonTransactionalThreadPooledTimer,*</attribute>
+        <attribute name="corbaGBeanObjectName">
+            geronimo.server:J2EEApplication=null,J2EEModule=geronimo/server-corba/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=CORBABean,name=Server</attribute>
         <reference name="Repository">
             <gbean-name>*:name=Repository,*</gbean-name>
         </reference>
@@ -53,20 +54,38 @@
         <reference name="EJBReferenceBuilder">
             <name>ServerEJBReferenceBuilder</name>
         </reference>
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <dependencies>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>j2ee-server</artifactId>
+                        <version>${pom.currentVersion}</version>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
     </gbean>
 
     <!-- web switching builder -->
     <gbean name="WebBuilder" class="org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder">
         <attribute name="defaultNamespace">http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1</attribute>
         <references name="ModuleBuilders">
-            <pattern><gbean-name>geronimo.maven:J2EEApplication=null,J2EEModule=${pom.groupId}/jetty-deployer/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=ModuleBuilder,name=JettyWebBuilder</gbean-name></pattern>
-            <pattern><gbean-name>geronimo.maven:J2EEApplication=null,J2EEModule=${pom.groupId}/tomcat-deployer/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=ModuleBuilder,name=TomcatWebBuilder</gbean-name></pattern>
+            <pattern>
+                <gbean-name>
+                    geronimo.maven:J2EEApplication=null,J2EEModule=${pom.groupId}/jetty-deployer/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=ModuleBuilder,name=JettyWebBuilder</gbean-name>
+            </pattern>
+            <pattern>
+                <gbean-name>
+                    geronimo.maven:J2EEApplication=null,J2EEModule=${pom.groupId}/tomcat-deployer/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=ModuleBuilder,name=TomcatWebBuilder</gbean-name>
+            </pattern>
         </references>
-     </gbean>
+    </gbean>
 
     <gbean name="EJBBuilder" class="org.openejb.deployment.OpenEJBModuleBuilder">
-        <attribute name="defaultParentId">${pom.groupId}/j2ee-server/${pom.currentVersion}/car</attribute>
-        <attribute name="listener">geronimo.server:J2EEApplication=null,J2EEModule=${pom.groupId}/j2ee-server/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=GBean,name=WebContainer</attribute>
+        <attribute name="listener">
+            geronimo.server:J2EEApplication=null,J2EEModule=${pom.groupId}/j2ee-server/${pom.currentVersion}/car,J2EEServer=geronimo,j2eeType=GBean,name=WebContainer</attribute>
         <reference name="WebServiceLinkTemplate">
             <name>WebServiceEJBLinkTemplate</name>
         </reference>
@@ -76,10 +95,21 @@
         <reference name="Repository">
             <gbean-name>*:name=Repository,*</gbean-name>
         </reference>
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <dependencies>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>j2ee-server</artifactId>
+                        <version>${pom.currentVersion}</version>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
     </gbean>
 
     <gbean name="ConnectorBuilder" class="org.apache.geronimo.connector.deployment.ConnectorModuleBuilder">
-        <attribute name="defaultParentId">${pom.groupId}/j2ee-server/${pom.currentVersion}/car</attribute>
         <attribute name="defaultMaxSize">10</attribute>
         <attribute name="defaultMinSize">0</attribute>
         <attribute name="defaultBlockingTimeoutMilliseconds">5000</attribute>
@@ -89,14 +119,26 @@
         <reference name="Repository">
             <gbean-name>*:name=Repository,*</gbean-name>
         </reference>
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <dependencies>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>j2ee-server</artifactId>
+                        <version>${pom.currentVersion}</version>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
     </gbean>
 
     <gbean name="AppClientBuilder" class="org.apache.geronimo.client.builder.AppClientModuleBuilder">
-        <attribute name="defaultClientParentId">${pom.groupId}/client/${pom.currentVersion}/car</attribute>
-        <attribute name="defaultServerParentId">${pom.groupId}/j2ee-server/${pom.currentVersion}/car</attribute>
-        <attribute name="transactionContextManagerObjectName">geronimo.client:name=TransactionContextManager,*</attribute>
+        <attribute name="transactionContextManagerObjectName">
+            geronimo.client:name=TransactionContextManager,*</attribute>
         <attribute name="connectionTrackerObjectName">geronimo.client:name=ConnectionTracker,*</attribute>
-        <attribute name="corbaGBeanObjectName">geronimo.client:J2EEApplication=null,J2EEModule=geronimo/client-corba/${pom.currentVersion}/car,J2EEServer=client,j2eeType=CORBABean,name=Server</attribute>
+        <attribute name="corbaGBeanObjectName">
+            geronimo.client:J2EEApplication=null,J2EEModule=geronimo/client-corba/${pom.currentVersion}/car,J2EEServer=client,j2eeType=CORBABean,name=Server</attribute>
         <reference name="EJBReferenceBuilder">
             <name>ClientEJBReferenceBuilder</name>
         </reference>
@@ -109,21 +151,41 @@
         <reference name="ServiceReferenceBuilder">
             <name>WebServiceBuilder</name>
         </reference>
-        <references name="Store">
-            <!-- todo replace with a store the Client Builder can write to -->
-            <pattern><gbean-name>geronimo.maven:name=MavenConfigStore,j2eeType=ConfigurationStore</gbean-name></pattern>
-            <pattern><gbean-name>geronimo.server:j2eeType=ConfigurationStore,name=Local</gbean-name></pattern>
-        </references>
         <reference name="Repository">
             <gbean-name>*:name=Repository,*</gbean-name>
         </reference>
+        <xml-attribute name="defaultServerEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <dependencies>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>j2ee-server</artifactId>
+                        <version>${pom.currentVersion}</version>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
+        <xml-attribute name="defaultClientEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <dependencies>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>client</artifactId>
+                        <version>${pom.currentVersion}</version>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
     </gbean>
 
     <gbean name="CSSAttributeBuilder" class="org.openejb.corba.security.config.css.CSSConfigEditor"/>
     <gbean name="TSSAttributeBuilder" class="org.openejb.corba.security.config.tss.TSSConfigEditor"/>
     <gbean name="LoginConfigurationBuilder" class="org.apache.geronimo.security.deployment.LoginConfigBuilder"/>
     <gbean name="SecurityService" class="org.apache.geronimo.security.SecurityServiceImpl">
-        <attribute name="policyConfigurationFactory">org.apache.geronimo.security.jacc.GeronimoPolicyConfigurationFactory</attribute>
+        <attribute name="policyConfigurationFactory">
+            org.apache.geronimo.security.jacc.GeronimoPolicyConfigurationFactory</attribute>
         <attribute name="policyProvider">org.apache.geronimo.security.jacc.GeronimoPolicy</attribute>
     </gbean>
     <gbean name="ClientEJBReferenceBuilder" class="org.openejb.deployment.RemoteEJBReferenceBuilder"/>

Modified: geronimo/branches/configid/configs/j2ee-system/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/j2ee-system/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/j2ee-system/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/j2ee-system/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -78,6 +78,18 @@
         </reference>
     </gbean>
 
+    <gbean name="ArtifactManager" class="org.apache.geronimo.kernel.repository.DefaultArtifactManager">
+    </gbean>
+
+    <gbean name="ArtifactResolver" class="org.apache.geronimo.kernel.repository.DefaultArtifactResolver">
+        <reference name="ArtifactManager">
+            <name>ArtifactManager</name>
+        </reference>
+        <reference name="Repositories">
+            <gbean-name>*:name=Repository,*</gbean-name>
+        </reference>
+    </gbean>
+
     <!-- Logging service -->
     <gbean name="Logger" class="org.apache.geronimo.system.logging.log4j.Log4jService">
         <attribute name="configFileName">var/log/server-log4j.properties</attribute>

Modified: geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -24,7 +24,6 @@
     >
 
     <gbean name="JettyWebBuilder" class="org.apache.geronimo.jetty.deployment.JettyModuleBuilder">
-        <attribute name="defaultParentId">${pom.groupId}/j2ee-server/${pom.currentVersion}/car,${pom.groupId}/jetty/${pom.currentVersion}/car</attribute>
         <attribute name="defaultSessionTimeoutSeconds">1800</attribute>
         <attribute name="defaultContextPriorityClassloader">false</attribute>
         <attribute name="defaultWelcomeFiles">index.html,index.htm,index.jsp</attribute>
@@ -43,6 +42,24 @@
         <reference name="Repository">
             <gbean-name>*:name=Repository,*</gbean-name>
         </reference>
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <dependencies>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>j2ee-server</artifactId>
+                        <version>${pom.currentVersion}</version>
+                        <type>car</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>jetty</artifactId>
+                        <version>${pom.currentVersion}</version>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
     </gbean>
 
     <gbean name="StaticContent" class="org.apache.geronimo.jetty.JettyServletHolder">

Modified: geronimo/branches/configid/configs/tomcat-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/tomcat-deployer/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/tomcat-deployer/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/tomcat-deployer/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -18,13 +18,9 @@
 
 <!-- $Rev$ $Date$ -->
 
-<configuration
-    xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1"
-
-    >
+<configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
 
     <gbean name="TomcatWebBuilder" class="org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder">
-        <attribute name="defaultParentId">${pom.groupId}/j2ee-server/${pom.currentVersion}/car,${pom.groupId}/tomcat/${pom.currentVersion}/car</attribute>
         <attribute name="defaultContextPriorityClassloader">false</attribute>
         <attribute name="tomcatContainerObjectName">geronimo.server:name=TomcatWebContainer,*</attribute>
         <reference name="WebServiceBuilder">
@@ -34,6 +30,24 @@
         <reference name="Repository">
             <gbean-name>*:name=Repository,*</gbean-name>
         </reference>
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <dependencies>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>j2ee-server</artifactId>
+                        <version>${pom.currentVersion}</version>
+                        <type>car</type>
+                    </dependency>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>tomcat</artifactId>
+                        <version>${pom.currentVersion}</version>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
     </gbean>
 
 </configuration>

Modified: geronimo/branches/configid/configs/uddi-jetty/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/uddi-jetty/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/uddi-jetty/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/uddi-jetty/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -17,16 +17,12 @@
 -->
 
 <!-- $Rev$ $Date$ -->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
-    >
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
 
     <ext-module>
         <web>uddi-jetty</web>
         <external-path>geronimo/geronimo-uddi-server/${pom.currentVersion}/war</external-path>
-        <web-app
-            xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1"
-                       configId="juddi-server"
-            >
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1">
 
             <context-root>/juddi</context-root>
             <context-priority-classloader>false</context-priority-classloader>
@@ -53,9 +49,7 @@
     <ext-module>
         <connector>uddi-db</connector>
         <external-path>tranql/tranql-connector-derby-embed-local/${tranql_vendors_version}/rar</external-path>
-        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1"
-                       configId="uddi-db"
-                  >
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
             <resourceadapter>
                 <outbound-resourceadapter>
                     <connection-definition>

Modified: geronimo/branches/configid/configs/uddi-tomcat/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/uddi-tomcat/src/plan/plan.xml?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/configs/uddi-tomcat/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/uddi-tomcat/src/plan/plan.xml Mon Feb 20 12:18:37 2006
@@ -23,9 +23,7 @@
     <ext-module>
         <web>uddi-tomcat</web>
         <external-path>geronimo/geronimo-uddi-server/${pom.currentVersion}/war</external-path>
-        <web-app
-            xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1"
-            >
+        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1">
 
             <context-root>/juddi</context-root>
             <context-priority-classloader>false</context-priority-classloader>
@@ -46,8 +44,7 @@
     <ext-module>
         <connector>uddi-db</connector>
         <external-path>tranql/tranql-connector-derby-embed-local/${tranql_vendors_version}/rar</external-path>
-        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1"
-                  >
+        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
             <resourceadapter>
                 <outbound-resourceadapter>
                     <connection-definition>

Modified: geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java (original)
+++ geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java Mon Feb 20 12:18:37 2006
@@ -53,6 +53,8 @@
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
 import org.apache.geronimo.system.configuration.ExecutableConfigurationUtil;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.tranql.sql.jdbc.JDBCUtil;
@@ -76,6 +78,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.LinkedHashSet;
 import java.util.jar.JarFile;
 
 /**
@@ -99,6 +102,10 @@
         public File getLocation(Artifact artifact) {
             return null;
         }
+
+        public LinkedHashSet getDependencies(Artifact artifact) {
+            return new LinkedHashSet();
+        }
     };
 
     private EJBReferenceBuilder ejbReferenceBuilder = new EJBReferenceBuilder() {
@@ -388,6 +395,16 @@
             GBeanData store = new GBeanData(JMXUtil.getObjectName("foo:j2eeType=ConfigurationStore,name=mock"), MockConfigStore.GBEAN_INFO);
             kernel.loadGBean(store, this.getClass().getClassLoader());
             kernel.startGBean(store.getName());
+
+            GBeanData manager = new GBeanData(JMXUtil.getObjectName("foo:name=ArtifactManager"), DefaultArtifactManager.GBEAN_INFO);
+            kernel.loadGBean(manager, this.getClass().getClassLoader());
+            kernel.startGBean(manager.getName());
+
+            GBeanData resolver = new GBeanData(JMXUtil.getObjectName("foo:name=ArtifactResolver"), DefaultArtifactResolver.GBEAN_INFO);
+            resolver.setReferencePattern("ArtifactManager", manager.getName());
+//            resolver.setReferencePattern("Repositories", repository.getName());
+            kernel.loadGBean(resolver, this.getClass().getClassLoader());
+            kernel.startGBean(resolver.getName());
 
             GBeanData configurationManagerData = new GBeanData(configurationManagerName, ConfigurationManagerImpl.GBEAN_INFO);
             configurationManagerData.setReferencePatterns("Stores", Collections.singleton(store.getName()));

Modified: geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java (original)
+++ geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java Mon Feb 20 12:18:37 2006
@@ -54,11 +54,11 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.StringTokenizer;
-import java.util.LinkedHashSet;
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
@@ -532,12 +532,10 @@
         if (configID != null) {
             ObjectName configName = Configuration.getConfigurationObjectName(configID);
             if (!isRunning(kernel, configName)) {
-                Artifact[] patterns = (Artifact[]) kernel.getGBeanData(configName).getAttribute("parentId");
-                if (patterns != null) {
-                    for (int i = 0; i < patterns.length; i++) {
-                        Artifact pattern = patterns[i];
-                        startAncestors(pattern, kernel, started, configurationManager);
-                    }
+                LinkedHashSet patterns = ((Environment) kernel.getAttribute(configName, "environment")).getImports();
+                for (Iterator iterator = patterns.iterator(); iterator.hasNext();) {
+                    Artifact pattern = (Artifact) iterator.next();
+                    startAncestors(pattern, kernel, started, configurationManager);
                 }
                 configurationManager.loadGBeans(configID);
                 started.add(configID);

Modified: geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java Mon Feb 20 12:18:37 2006
@@ -17,47 +17,12 @@
 
 package org.apache.geronimo.jetty.deployment;
 
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.security.Permission;
-import java.security.PermissionCollection;
-import java.security.Permissions;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.jar.JarFile;
-import java.util.zip.ZipEntry;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.security.jacc.WebResourcePermission;
-import javax.security.jacc.WebRoleRefPermission;
-import javax.security.jacc.WebUserDataPermission;
-import javax.servlet.Servlet;
-import javax.transaction.UserTransaction;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
 import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xbeans.GbeanType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
@@ -79,8 +44,10 @@
 import org.apache.geronimo.jetty.JettyWebAppContext;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
@@ -130,6 +97,39 @@
 import org.mortbay.http.DigestAuthenticator;
 import org.mortbay.jetty.servlet.FormAuthenticator;
 
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.security.jacc.WebResourcePermission;
+import javax.security.jacc.WebRoleRefPermission;
+import javax.security.jacc.WebUserDataPermission;
+import javax.servlet.Servlet;
+import javax.transaction.UserTransaction;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.jar.JarFile;
+import java.util.zip.ZipEntry;
+
 
 /**
  * @version $Rev$ $Date$
@@ -242,6 +242,10 @@
 
         EnvironmentType environmentType = jettyWebApp.getEnvironment();
         Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
+        if (environment.getConfigId() == null) {
+            Artifact configID = new Artifact(Artifact.DEFAULT_GROUP_ID, contextRoot, "1", "car");
+            environment.setConfigId(configID);
+        }
 
         Map servletNameToPathMap = buildServletNameToPathMap(webApp, contextRoot);
 
@@ -305,7 +309,7 @@
                 log.warn(e);
             }
 
-            JettyWebAppType jettyWebApp = null;
+            JettyWebAppType jettyWebApp;
             if (rawPlan != null) {
                 XmlObject webPlan = new GenericToSpecificPlanConverter(GerJettyDocument.type.getDocumentElementName().getNamespaceURI(),
                         JettyWebAppDocument.type.getDocumentElementName().getNamespaceURI(), "jetty").convertToSpecificPlan(rawPlan);
@@ -354,21 +358,6 @@
 
     private JettyWebAppType createDefaultPlan(String contextRoot) {
         JettyWebAppType jettyWebApp = JettyWebAppType.Factory.newInstance();
-
-        // set the parentId, configId and context root
-//        Environment environment = new Environment();
-//        EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
-//        Artifact artifact = environment.getConfigId();
-//        artifact.setArtifactId(contextRoot);
-        //TODO broken, perhaps need a reverse env. builder
-//        jettyWebApp.setEnvironment(environment);
-        EnvironmentType environmentType = jettyWebApp.addNewEnvironment();
-        ArtifactType artifact = environmentType.addNewConfigId();
-        //TODO this version is incomplete.
-        artifact.setGroupId("unknown");
-        artifact.setArtifactId(contextRoot);
-        artifact.setVersion("1");
-        artifact.setType("car");
         jettyWebApp.setContextRoot(contextRoot);
         jettyWebApp.setContextPriorityClassloader(defaultContextPriorityClassloader);
         return jettyWebApp;

Modified: geronimo/branches/configid/modules/jetty-builder/src/schema/geronimo-jetty-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/jetty-builder/src/schema/geronimo-jetty-1.1.xsd?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/jetty-builder/src/schema/geronimo-jetty-1.1.xsd (original)
+++ geronimo/branches/configid/modules/jetty-builder/src/schema/geronimo-jetty-1.1.xsd Mon Feb 20 12:18:37 2006
@@ -36,7 +36,7 @@
 
     <xs:complexType name="web-appType">
         <xs:sequence>
-            <xs:element ref="sys:environment"/>
+            <xs:element ref="sys:environment" minOccurs="0"/>
 
             <xs:element name="context-root" type="xs:string" minOccurs="0"/>
             <xs:element name="context-priority-classloader" type="xs:boolean" minOccurs="0"/>

Modified: geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java (original)
+++ geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java Mon Feb 20 12:18:37 2006
@@ -63,6 +63,8 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
+import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
@@ -108,7 +110,7 @@
     private JettyModuleBuilder builder;
     private File basedir = new File(System.getProperty("basedir", "."));
     private String PARENT_ARTIFACT_ID = "geronimo/Foo/1/car";
-    private String ARTIFACT_ID = "unknown/war4/1/car";
+    private String ARTIFACT_ID = "foo/bar/1/car";
     private List parentId = Arrays.asList(new Artifact[] {Artifact.create(PARENT_ARTIFACT_ID)});
     private Environment defaultEnvironment = new Environment();
 
@@ -266,6 +268,16 @@
         GBeanData store = new GBeanData(JMXUtil.getObjectName("foo:j2eeType=ConfigurationStore,name=mock"), MockConfigStore.GBEAN_INFO);
         kernel.loadGBean(store, this.getClass().getClassLoader());
         kernel.startGBean(store.getName());
+
+        GBeanData manager = new GBeanData(JMXUtil.getObjectName("foo:name=ArtifactManager"), DefaultArtifactManager.GBEAN_INFO);
+        kernel.loadGBean(manager, this.getClass().getClassLoader());
+        kernel.startGBean(manager.getName());
+
+        GBeanData resolver = new GBeanData(JMXUtil.getObjectName("foo:name=ArtifactResolver"), DefaultArtifactResolver.GBEAN_INFO);
+        resolver.setReferencePattern("ArtifactManager", manager.getName());
+//            resolver.setReferencePattern("Repositories", repository.getName());
+        kernel.loadGBean(resolver, this.getClass().getClassLoader());
+        kernel.startGBean(resolver.getName());
 
         ObjectName configurationManagerName = new ObjectName(":j2eeType=ConfigurationManager,name=Basic");
         GBeanData configurationManagerData = new GBeanData(configurationManagerName, ConfigurationManagerImpl.GBEAN_INFO);

Modified: geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java (original)
+++ geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java Mon Feb 20 12:18:37 2006
@@ -259,7 +259,7 @@
 
         // resolve dependencies
         LinkedHashSet dependencies = environment.getDependencies();
-        dependencies = artifactResolver.resolve(parents, dependencies);
+        dependencies = recursiveResolve(artifactResolver, dependencies);
         environment.setDependencies(dependencies);
 
         // resolve references
@@ -286,6 +286,22 @@
         }
     }
 
+    private LinkedHashSet recursiveResolve(ArtifactResolver artifactResolver, LinkedHashSet dependencies) throws MissingDependencyException {
+        dependencies = artifactResolver.resolve(parents, dependencies);
+        for (Iterator iterator = new ArrayList(dependencies).iterator(); iterator.hasNext();) {
+            Artifact dependency = (Artifact) iterator.next();
+            for (Iterator iterator1 = repositories.iterator(); iterator1.hasNext();) {
+                Repository repository = (Repository) iterator1.next();
+                if (repository.contains(dependency)) {
+                    LinkedHashSet subDependencies = repository.getDependencies(dependency);
+                    subDependencies = recursiveResolve(artifactResolver, subDependencies);
+                    dependencies.addAll(subDependencies);
+                }
+            }
+        }
+        return dependencies;
+    }
+
     public String getObjectName() {
         return objectNameString;
     }
@@ -644,9 +660,10 @@
         infoFactory.addAttribute("configurationClassLoader", ClassLoader.class, false);
         //make id readable for convenience
         infoFactory.addAttribute("id", Artifact.class, false);
+        //NOTE THIS IS NOT A REFERENCE
+        infoFactory.addAttribute("configurationStore", ConfigurationStore.class, true);
 
         infoFactory.addReference("Repositories", Repository.class, "GBean");
-        infoFactory.addReference("ConfigurationStore", ConfigurationStore.class, "GBean");
         infoFactory.addReference("ArtifactManager", ArtifactManager.class);
         infoFactory.addReference("ArtifactResolver", ArtifactResolver.class);
 
@@ -668,7 +685,7 @@
                 "classPath",
                 "gBeanState",
                 "Repositories",
-                "ConfigurationStore",
+                "configurationStore",
                 "ArtifactManager",
                 "ArtifactResolver"
         });

Modified: geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactManager.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactManager.java (original)
+++ geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactManager.java Mon Feb 20 12:18:37 2006
@@ -104,7 +104,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(DefaultArtifactManager.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(DefaultArtifactManager.class, "GBean");
         infoFactory.addInterface(ArtifactManager.class);
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java (original)
+++ geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/DefaultArtifactResolver.java Mon Feb 20 12:18:37 2006
@@ -94,7 +94,7 @@
             existingArtifacts = new TreeSet();
         }
 
-        // if we have exactally one artifact loaded use it's version
+        // if we have exactly one artifact loaded use its' version
         if (existingArtifacts.size() == 1) {
             Artifact existingArtifact = (Artifact) existingArtifacts.first();
             return existingArtifact.getVersion();
@@ -177,16 +177,16 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(DefaultArtifactResolver.class);
-        infoFactory.addReference("ArtifactManager", ArtifactManager.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(DefaultArtifactResolver.class, "GBean");
+        infoFactory.addReference("ArtifactManager", ArtifactManager.class, "GBean");
         infoFactory.addReference("Repositories", Repository.class, "GBean");
+        infoFactory.addInterface(ArtifactResolver.class);
 
         infoFactory.setConstructor(new String[]{
                 "ArtifactManager",
                 "Repositories",
         });
 
-        infoFactory.addInterface(ArtifactResolver.class);
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Repository.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Repository.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Repository.java (original)
+++ geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Repository.java Mon Feb 20 12:18:37 2006
@@ -21,6 +21,7 @@
 import java.net.URI;
 import java.net.URL;
 import java.io.File;
+import java.util.LinkedHashSet;
 
 /**
  * Provides access to things like JARs via a standard API.  Generally
@@ -35,4 +36,6 @@
     boolean contains(Artifact artifact);
 
     File getLocation(Artifact artifact);
+
+    LinkedHashSet getDependencies(Artifact artifact);
 }

Modified: geronimo/branches/configid/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java (original)
+++ geronimo/branches/configid/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java Mon Feb 20 12:18:37 2006
@@ -127,5 +127,9 @@
         public File getLocation(Artifact artifact) {
             return new File(".");
         }
+
+        public LinkedHashSet getDependencies(Artifact artifact) {
+            return new LinkedHashSet();
+        }
     }
 }

Modified: geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java (original)
+++ geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java Mon Feb 20 12:18:37 2006
@@ -31,6 +31,7 @@
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlOptions;
 
 import java.util.Collection;
 import java.util.HashMap;
@@ -51,52 +52,54 @@
 
     public static Environment buildEnvironment(EnvironmentType environmentType) {
         Environment environment = new Environment();
-        if (environmentType.isSetConfigId()) {
-            environment.setConfigId(toArtifact(environmentType.getConfigId()));
-        }
+        if (environmentType != null) {
+            if (environmentType.isSetConfigId()) {
+                environment.setConfigId(toArtifact(environmentType.getConfigId()));
+            }
 
-        Map propertiesMap = new HashMap();
-        if (environmentType.isSetProperties()) {
-            PropertyType[] propertiesArray = environmentType.getProperties().getPropertyArray();
-            for (int i = 0; i < propertiesArray.length; i++) {
-                PropertyType property = propertiesArray[i];
-                String key = property.getName().trim();
-                String value = property.getValue().trim();
-                propertiesMap.put(key, value);
-            }
-        }
-        environment.setProperties(propertiesMap);
-
-        if (environmentType.isSetDependencies()) {
-            ArtifactType[] dependencyArray = environmentType.getDependencies().getDependencyArray();
-            Collection dependencies = new LinkedHashSet();
-            Collection imports = new LinkedHashSet();
-            Collection references = new LinkedHashSet();
-            for (int i = 0; i < dependencyArray.length; i++) {
-                ArtifactType artifactType = dependencyArray[i];
-                Artifact artifact = toArtifact(artifactType);
-                String type = artifact.getType();
-                if (type.equals("jar")) {
-                    dependencies.add(artifact);
-                } else if (type.equals("car")) {
-                    if ("classes".equals(artifactType.getImport())) {
-                        throw new IllegalArgumentException("classes-only dependency on car files not yet supported");
-                    } else if ("services".equals(artifactType.getImport())) {
-                        references.add(artifact);
-                    } else {
-                        imports.add(artifact);
-                    }
+            Map propertiesMap = new HashMap();
+            if (environmentType.isSetProperties()) {
+                PropertyType[] propertiesArray = environmentType.getProperties().getPropertyArray();
+                for (int i = 0; i < propertiesArray.length; i++) {
+                    PropertyType property = propertiesArray[i];
+                    String key = property.getName().trim();
+                    String value = property.getValue().trim();
+                    propertiesMap.put(key, value);
                 }
             }
-            environment.setImports(imports);
-            environment.setDependencies(dependencies);
-            environment.setReferences(references);
+            environment.setProperties(propertiesMap);
+
+            if (environmentType.isSetDependencies()) {
+                ArtifactType[] dependencyArray = environmentType.getDependencies().getDependencyArray();
+                Collection dependencies = new LinkedHashSet();
+                Collection imports = new LinkedHashSet();
+                Collection references = new LinkedHashSet();
+                for (int i = 0; i < dependencyArray.length; i++) {
+                    ArtifactType artifactType = dependencyArray[i];
+                    Artifact artifact = toArtifact(artifactType);
+                    String type = artifact.getType();
+                    if (type.equals("jar")) {
+                        dependencies.add(artifact);
+                    } else if (type.equals("car")) {
+                        if ("classes".equals(artifactType.getImport())) {
+                            throw new IllegalArgumentException("classes-only dependency on car files not yet supported");
+                        } else if ("services".equals(artifactType.getImport())) {
+                            references.add(artifact);
+                        } else {
+                            imports.add(artifact);
+                        }
+                    }
+                }
+                environment.setImports(imports);
+                environment.setDependencies(dependencies);
+                environment.setReferences(references);
 
+            }
+            environment.setInverseClassLoading(environmentType.isSetInverseClassloading());
+            environment.setSuppressDefaultEnvironment(environmentType.isSetSuppressDefaultEnvironment());
+            environment.setHiddenClasses(toFilters(environmentType.getHiddenClassesArray()));
+            environment.setNonOverrideableClasses(toFilters(environmentType.getNonOverridableClassesArray()));
         }
-        environment.setInverseClassLoading(environmentType.isSetInverseClassloading());
-        environment.setSuppressDefaultEnvironment(environmentType.isSetSuppressDefaultEnvironment());
-        environment.setHiddenClasses(toFilters(environmentType.getHiddenClassesArray()));
-        environment.setNonOverrideableClasses(toFilters(environmentType.getNonOverridableClassesArray()));
 
         return environment;
     }
@@ -244,7 +247,13 @@
             environmentType = (EnvironmentType) xmlObject.copy().changeType(EnvironmentType.type);
         }
         try {
-            SchemaConversionUtils.validateDD(environmentType);
+            XmlOptions xmlOptions = new XmlOptions();
+            xmlOptions.setLoadLineNumbers();
+            Collection errors = new ArrayList();
+            xmlOptions.setErrorListener(errors);
+            if (!environmentType.validate(xmlOptions)) {
+                throw new XmlException("Invalid deployment descriptor: " + errors + "\nDescriptor: " + environmentType.toString(), null, errors);
+            }
         } catch (XmlException e) {
             throw new DeploymentException(e);
         }

Modified: geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java (original)
+++ geronimo/branches/configid/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java Mon Feb 20 12:18:37 2006
@@ -20,7 +20,6 @@
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.ConfigurationBuilder;
 import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.AttributeType;
 import org.apache.geronimo.deployment.xbeans.ConfigurationDocument;
 import org.apache.geronimo.deployment.xbeans.ConfigurationType;
@@ -29,7 +28,6 @@
 import org.apache.geronimo.deployment.xbeans.PatternType;
 import org.apache.geronimo.deployment.xbeans.ReferenceType;
 import org.apache.geronimo.deployment.xbeans.ReferencesType;
-import org.apache.geronimo.deployment.xbeans.ServiceDocument;
 import org.apache.geronimo.deployment.xbeans.XmlAttributeType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.gbean.GBeanData;
@@ -44,7 +42,6 @@
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
-import org.apache.geronimo.kernel.repository.MissingDependencyException;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlException;
@@ -55,12 +52,6 @@
 import javax.xml.namespace.QName;
 import java.io.File;
 import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -171,7 +162,7 @@
         ClassLoader cl = context.getClassLoader(repository);
 
 
-        J2eeContext j2eeContext = null;
+        J2eeContext j2eeContext;
         try {
             j2eeContext = NameFactory.buildJ2eeContext(environment.getProperties(), NameFactory.NULL, NameFactory.J2EE_MODULE, environment.getConfigId().toString(), null, null);
         } catch (MalformedObjectNameException e) {
@@ -182,62 +173,6 @@
         context.close();
         return context.getConfigurationData();
     }
-    public static void addIncludes(DeploymentContext context, ArtifactType[] includes, Repository repository) throws DeploymentException {
-        for (int i = 0; i < includes.length; i++) {
-            ArtifactType include = includes[i];
-            Artifact artifact = getDependencyURI(include, repository);
-            String name = getDependencyFileName(include);
-            URI path;
-            try {
-                path = new URI(name);
-            } catch (URISyntaxException e) {
-                throw new DeploymentException("Unable to generate path for include: " + artifact, e);
-            }
-            try {
-                File file = repository.getLocation(artifact);
-                context.addInclude(path, file.toURL());
-            } catch (IOException e) {
-                throw new DeploymentException("Unable to add include: " + artifact, e);
-            }
-        }
-    }
-
-    //TODO this is part of Environment resolution
-    public static void addDependencies(DeploymentContext context, ArtifactType[] deps, Repository repository) throws DeploymentException {
-        for (int i = 0; i < deps.length; i++) {
-            Artifact artifact = getDependencyURI(deps[i], repository);
-//            context.addDependency(dependencyURI);
-
-            URL url;
-            try {
-                File location = repository.getLocation(artifact);
-                url = location.toURL();
-            } catch (MalformedURLException e) {
-                throw new DeploymentException("Unable to get URL for dependency " + artifact, e);
-            }
-            ClassLoader depCL = new URLClassLoader(new URL[]{url}, ClassLoader.getSystemClassLoader());
-            InputStream is = depCL.getResourceAsStream("META-INF/geronimo-service.xml");
-            if (is != null) {
-                // it has a geronimo-service.xml file
-                ServiceDocument serviceDoc = null;
-                try {
-                    Collection errors = new ArrayList();
-                    serviceDoc = ServiceDocument.Factory.parse(is, XmlBeansUtil.createXmlOptions(errors));
-                    if (errors.size() > 0) {
-                        throw new DeploymentException("Invalid service doc: " + errors);
-                    }
-                } catch (XmlException e) {
-                    throw new DeploymentException("Invalid geronimo-service.xml file in " + url, e);
-                } catch (IOException e) {
-                    throw new DeploymentException("Unable to parse geronimo-service.xml file in " + url, e);
-                }
-                ArtifactType[] dependencyDeps = serviceDoc.getService().getDependencyArray();
-                if (dependencyDeps != null) {
-                    addDependencies(context, dependencyDeps, repository);
-                }
-            }
-        }
-    }
 
     public static void addGBeans(GbeanType[] gbeans, ClassLoader cl, J2eeContext j2eeContext, DeploymentContext context) throws DeploymentException {
         for (int i = 0; i < gbeans.length; i++) {
@@ -327,22 +262,6 @@
         GBeanData gBeanData = builder.getGBeanData();
         context.addGBean(gBeanData);
         return objectName;
-    }
-
-    private static Artifact getDependencyURI(ArtifactType dep, Repository repository) throws DeploymentException {
-        Artifact artifact = EnvironmentBuilder.toArtifact(dep);
-        if (!repository.contains(artifact)) {
-            throw new DeploymentException(new MissingDependencyException("Artifact " + artifact + " not found in repository"));
-        }
-        return artifact;
-    }
-
-    private static String getDependencyFileName(ArtifactType dep) {
-        String type = dep.isSetType() ? dep.getType().trim() : "jar";
-        String artifactId = dep.getArtifactId().trim();
-        String version = dep.getVersion().trim();
-        String name = artifactId + "-" + version + "." + type;
-        return name;
     }
 
     public static final GBeanInfo GBEAN_INFO;

Modified: geronimo/branches/configid/modules/service-builder/src/schema/geronimo-config-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/service-builder/src/schema/geronimo-config-1.1.xsd?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/service-builder/src/schema/geronimo-config-1.1.xsd (original)
+++ geronimo/branches/configid/modules/service-builder/src/schema/geronimo-config-1.1.xsd Mon Feb 20 12:18:37 2006
@@ -246,7 +246,7 @@
 
     <xs:complexType name="xml-attributeType">
         <xs:sequence>
-            <xs:any namespace="##other" processContents="lax"/>
+            <xs:any namespace="##any" processContents="lax"/>
         </xs:sequence>
         <xs:attribute name="name" type="xs:string"/>
     </xs:complexType>

Modified: geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java (original)
+++ geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java Mon Feb 20 12:18:37 2006
@@ -154,23 +154,14 @@
         try {
             Artifact id = configurationData.getId();
             GBeanData config = new GBeanData(Configuration.getConfigurationObjectName(id), Configuration.GBEAN_INFO);
-//            config.setAttribute("id", id);
             config.setAttribute("type", configurationData.getModuleType());
-            //TODO configid this might need further improvmement
-//            Map nameKeys = configurationData.getNameKeys();
-//            config.setAttribute("nameKeys", nameKeys);
-
             Environment environment = configurationData.getEnvironment();
             config.setAttribute("environment", environment);
             config.setAttribute("gBeanState", Configuration.storeGBeans(configurationData.getGBeans()));
-            config.setReferencePatterns("Repositories", Collections.singleton(new ObjectName("*:name=Repository,*")));
-//            config.setAttribute("dependencies", configurationData.getDependencies());
             config.setAttribute("classPath", configurationData.getClassPath());
-//            config.setAttribute("inverseClassLoading", Boolean.valueOf(configurationData.isInverseClassloading()));
-//            Set set = configurationData.getHiddenClasses();
-//            config.setAttribute("hiddenClasses", set.toArray(new String[set.size()]));
-//            set = configurationData.getNonOverridableClasses();
-//            config.setAttribute("nonOverridableClasses", set.toArray(new String[set.size()]));
+            config.setReferencePattern("Repositories", new ObjectName("*:name=Repository,*"));
+            config.setReferencePattern("ArtifactManager", new ObjectName("*:name=ArtifactManager,*"));
+            config.setReferencePattern("ArtifactResolver", new ObjectName("*:name=ArtifactResolver,*"));
 
             return config;
         } catch (MalformedObjectNameException e) {

Modified: geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java (original)
+++ geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java Mon Feb 20 12:18:37 2006
@@ -337,6 +337,8 @@
         config.setName(name);
         //TODO configId remove this
         config.setAttribute("baseURL", getRoot(configId).toURL());
+        //TODO NOTE THIS IS NOT A PROXY
+        config.setAttribute("configurationStore", this);
 
         try {
             kernel.loadGBean(config, Configuration.class.getClassLoader());

Modified: geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java (original)
+++ geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/AbstractRepository.java Mon Feb 20 12:18:37 2006
@@ -16,6 +16,21 @@
  */
 package org.apache.geronimo.system.repository;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.FileWriteMonitor;
+import org.apache.geronimo.kernel.repository.WriteableRepository;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.File;
@@ -23,15 +38,12 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.kernel.repository.FileWriteMonitor;
-import org.apache.geronimo.kernel.repository.WriteableRepository;
-import org.apache.geronimo.system.serverinfo.ServerInfo;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.LinkedHashSet;
 
 /**
  * @version $Rev$ $Date$
@@ -87,6 +99,65 @@
     public boolean contains(Artifact artifact) {
         File location = getLocation(artifact);
         return location.isFile() && location.canRead();
+    }
+
+    private static final String NAMESPACE = "http://geronimo.apache.org/xml/ns/deployment-1.1";
+    public LinkedHashSet getDependencies(Artifact artifact) {
+        LinkedHashSet dependencies = new LinkedHashSet();
+        URL url;
+        try {
+            File location = getLocation(artifact);
+            url = location.toURL();
+        } catch (MalformedURLException e) {
+            throw (IllegalStateException)new IllegalStateException("Unable to get URL for dependency " + artifact).initCause(e);
+        }
+        ClassLoader depCL = new URLClassLoader(new URL[]{url}, ClassLoader.getSystemClassLoader());
+        InputStream is = depCL.getResourceAsStream("META-INF/geronimo-service.xml");
+        if (is != null) {
+            InputSource in = new InputSource(is);
+            DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
+            dfactory.setNamespaceAware(true);
+            try {
+                Document doc = dfactory.newDocumentBuilder().parse(in);
+                Element root = doc.getDocumentElement();
+                NodeList configs = root.getElementsByTagNameNS(NAMESPACE, "dependency");
+                for (int i = 0; i < configs.getLength(); i++) {
+                    Element dependencyElement = (Element) configs.item(i);
+                    String groupId = getString(dependencyElement, "groupId");
+                    String artifactId = getString(dependencyElement, "artifactId");
+                    String version = getString(dependencyElement, "version");
+                    String type = getString(dependencyElement, "type");
+                    if (type == null) {
+                        type = "jar";
+                    }
+                    dependencies.add(new Artifact(groupId, artifactId,  version, type));
+                }
+            } catch (IOException e) {
+//                throw new DeploymentException("Unable to parse geronimo-service.xml file in " + url, e);
+                throw (IllegalStateException)new IllegalStateException("Unable to parse geronimo-service.xml file in " + url).initCause(e);
+            } catch (ParserConfigurationException e) {
+                throw (IllegalStateException)new IllegalStateException("Unable to parse geronimo-service.xml file in " + url).initCause(e);
+            } catch (SAXException e) {
+                throw (IllegalStateException)new IllegalStateException("Unable to parse geronimo-service.xml file in " + url).initCause(e);
+            }
+        }
+        return dependencies;
+    }
+
+    private String getString(Element dependencyElement, String childName) {
+        NodeList children = dependencyElement.getElementsByTagNameNS(NAMESPACE, childName);
+        if (children == null || children.getLength() == 0) {
+        return null;
+        }
+        String value = "";
+        NodeList text = children.item(0).getChildNodes();
+        for (int t = 0; t < text.getLength(); t++) {
+            Node n = text.item(t);
+            if (n.getNodeType() == Node.TEXT_NODE) {
+                value += n.getNodeValue();
+            }
+        }
+        return value.trim();
     }
 
     public void copyToRepository(File source, Artifact destination, FileWriteMonitor monitor) throws IOException {

Modified: geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven1Repository.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven1Repository.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven1Repository.java (original)
+++ geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven1Repository.java Mon Feb 20 12:18:37 2006
@@ -118,7 +118,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Maven1Repository.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Maven1Repository.class, "GBean");
 
         infoFactory.addAttribute("root", URI.class, true);
 

Modified: geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java (original)
+++ geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/repository/Maven2Repository.java Mon Feb 20 12:18:37 2006
@@ -139,7 +139,7 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Maven2Repository.class);
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Maven2Repository.class, "GBean");
 
         infoFactory.addAttribute("root", URI.class, true);
 

Modified: geronimo/branches/configid/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java Mon Feb 20 12:18:37 2006
@@ -69,6 +69,7 @@
 import org.apache.geronimo.kernel.StoredObject;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
 import org.apache.geronimo.schema.SchemaConversionUtils;
@@ -176,13 +177,9 @@
         }
         check(webApp);
 
-
         // parse vendor dd
         TomcatWebAppType tomcatWebApp = getTomcatWebApp(plan, moduleFile, standAlone, targetPath, webApp);
 
-        EnvironmentType environmentType = tomcatWebApp.getEnvironment();
-        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
-
         if (contextRoot == null) {
             if (tomcatWebApp.isSetContextRoot()) {
                 contextRoot = tomcatWebApp.getContextRoot();
@@ -190,6 +187,14 @@
                 contextRoot = determineDefaultContextRoot(webApp, standAlone, moduleFile, targetPath);
             }
         }
+
+        EnvironmentType environmentType = tomcatWebApp.getEnvironment();
+        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
+        if (environment.getConfigId() == null) {
+            Artifact configID = new Artifact(Artifact.DEFAULT_GROUP_ID, contextRoot, "1", "car");
+            environment.setConfigId(configID);
+        }
+
         //look for a webservices dd
         Map portMap = Collections.EMPTY_MAP;
         //TODO Jeff, please review
@@ -304,13 +309,6 @@
 
     private TomcatWebAppType createDefaultPlan(String path) {
         TomcatWebAppType tomcatWebApp = TomcatWebAppType.Factory.newInstance();
-        EnvironmentType environmentType = tomcatWebApp.addNewEnvironment();
-        ArtifactType artifact = environmentType.addNewConfigId();
-        //TODO this version is incomplete.
-        artifact.setGroupId("unknown");
-        artifact.setArtifactId(path);
-        artifact.setVersion("1");
-        artifact.setType("car");
         tomcatWebApp.setContextRoot("/" + path);
         tomcatWebApp.setContextPriorityClassloader(defaultContextPriorityClassloader);
         return tomcatWebApp;



Mime
View raw message