geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r436786 [3/3] - in /geronimo/server/branches/sachin: ./ applications/console/ applications/console/console-core/ applications/console/console-core/src/java/ applications/console/console-core/src/main/ applications/console/console-core/src/m...
Date Fri, 25 Aug 2006 13:26:27 GMT
Modified: geronimo/server/branches/sachin/modules/geronimo-testsupport/src/main/java/org/apache/geronimo/testsupport/TestSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-testsupport/src/main/java/org/apache/geronimo/testsupport/TestSupport.java?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-testsupport/src/main/java/org/apache/geronimo/testsupport/TestSupport.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-testsupport/src/main/java/org/apache/geronimo/testsupport/TestSupport.java Fri Aug 25 06:22:45 2006
@@ -46,7 +46,15 @@
      * And if you do, please document why you have done so.
      */
     protected Log log = LogFactory.getLog(getClass());
-
+    
+    protected TestSupport(final String name) {
+        super(name);
+    }
+    
+    protected TestSupport() {
+        super();
+    }
+    
     /**
      * Determine the value of <tt>${basedir}</tt>, which should be the base directory of
      * the module which the concreate test class is defined in.

Modified: geronimo/server/branches/sachin/modules/interceptor/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/interceptor/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/interceptor/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/interceptor/pom.xml Fri Aug 25 06:22:45 2006
@@ -46,10 +46,4 @@
         <url>http://svn.apache.org/viewvc/geronimo/trunk/modules/interceptor</url>
     </scm>
     
-    <build>
-        <!-- FIXME: Remove when the default is to use the m2 standard layout -->
-        <sourceDirectory>${pom.basedir}/src/main/java</sourceDirectory>
-        <testSourceDirectory>${pom.basedir}/src/test/java</testSourceDirectory>
-    </build>
-    
 </project>

Modified: geronimo/server/branches/sachin/modules/j2ee-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/j2ee-builder/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/j2ee-builder/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/j2ee-builder/pom.xml Fri Aug 25 06:22:45 2006
@@ -70,6 +70,29 @@
     </dependencies>
     
     <build>
+        <!--
+        FIXME: Convert module to m2 standard layout
+        -->
+        
+        <sourceDirectory>src/java</sourceDirectory>
+        <testSourceDirectory>src/test</testSourceDirectory>
+
+        <resources>
+            <resource>
+                <directory>src/resources</directory>
+            </resource>
+        </resources>
+
+        <testResources>
+            <testResource>
+                <directory>src/test-data</directory>
+            </testResource>
+
+            <testResource>
+                <directory>src/test-resources</directory>
+            </testResource>
+        </testResources>
+        
         <plugins>
             <plugin>
                 <artifactId>maven-antrun-plugin</artifactId>
@@ -123,6 +146,13 @@
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>xmlbeans-maven-plugin</artifactId>
                 <configuration>
+                    <!--
+                    FIXME: Remove when using m2 layout
+                    -->
+                    <schemaDirectory>${pom.basedir}/src/schema</schemaDirectory>
+                    <xmlConfigs>
+                        <xmlConfig implementation="java.io.File">${pom.basedir}/src/schema/xmlconfig.xml</xmlConfig>
+                    </xmlConfigs>
                     <sourceSchemas>geronimo-application-1.2.xsd</sourceSchemas>
                 </configuration>
             </plugin>

Modified: geronimo/server/branches/sachin/modules/j2ee-schema/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/j2ee-schema/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/j2ee-schema/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/j2ee-schema/pom.xml Fri Aug 25 06:22:45 2006
@@ -74,6 +74,29 @@
     </dependencies>
     
     <build>
+        <!--
+        FIXME: Convert module to m2 standard layout
+        -->
+        
+        <sourceDirectory>src/java</sourceDirectory>
+        <testSourceDirectory>src/test</testSourceDirectory>
+
+        <resources>
+            <resource>
+                <directory>src/resources</directory>
+            </resource>
+        </resources>
+
+        <testResources>
+            <testResource>
+                <directory>src/test-data</directory>
+            </testResource>
+
+            <testResource>
+                <directory>src/test-resources</directory>
+            </testResource>
+        </testResources>
+        
         <plugins>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>

Modified: geronimo/server/branches/sachin/modules/jetty-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/jetty-builder/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/jetty-builder/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/jetty-builder/pom.xml Fri Aug 25 06:22:45 2006
@@ -60,7 +60,14 @@
             <artifactId>geronimo-jetty</artifactId>
             <version>${pom.version}</version>
         </dependency>
-
+        
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-testsupport</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
     
     <build>

Copied: geronimo/server/branches/sachin/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java (from r436742, geronimo/server/trunk/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java)
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?p2=geronimo/server/branches/sachin/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java&p1=geronimo/server/trunk/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java&r1=436742&r2=436786&rev=436786&view=diff
==============================================================================
--- geronimo/server/trunk/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java (original)
+++ geronimo/server/branches/sachin/modules/jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java Fri Aug 25 06:22:45 2006
@@ -47,6 +47,7 @@
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
+import org.apache.geronimo.deployment.DeployableModule;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
@@ -173,8 +174,8 @@
         return kernel.getGBeanData(templateName);
     }
 
-    protected Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
-        assert moduleFile != null: "moduleFile is null";
+    protected Module createModule(Object plan, DeployableModule deployableModule, String targetPath, URL specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+        assert deployableModule != null: "moduleFile is null";
         assert targetPath != null: "targetPath is null";
         assert !targetPath.endsWith("/"): "targetPath must not end with a '/'";
 
@@ -183,7 +184,7 @@
         WebAppType webApp;
         try {
             if (specDDUrl == null) {
-                specDDUrl = DeploymentUtil.createJarURL(moduleFile, "WEB-INF/web.xml");
+                specDDUrl = deployableModule.resolve("WEB-INF/web.xml");
             }
 
             // read in the entire specDD as a string, we need this for getDeploymentDescriptor
@@ -208,12 +209,12 @@
         check(webApp);
 
         // parse vendor dd
-        JettyWebAppType jettyWebApp = getJettyWebApp(plan, moduleFile, standAlone, targetPath, webApp);
+        JettyWebAppType jettyWebApp = getJettyWebApp(plan, deployableModule, standAlone, targetPath, webApp);
         if (contextRoot == null || contextRoot.trim().equals("")) {
             if (jettyWebApp.isSetContextRoot()) {
                 contextRoot = jettyWebApp.getContextRoot();
             } else {
-                contextRoot = determineDefaultContextRoot(webApp, standAlone, moduleFile, targetPath);
+                contextRoot = determineDefaultContextRoot(webApp, standAlone, deployableModule, targetPath);
             }
         }
 
@@ -222,7 +223,7 @@
         EnvironmentType environmentType = jettyWebApp.getEnvironment();
         Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
         // Note: logic elsewhere depends on the default artifact ID being the file name less extension (ConfigIDExtractor)
-        String warName = new File(moduleFile.getName()).getName();
+        String warName = deployableModule.getRoot().getName();
         if (warName.lastIndexOf('.') > -1) {
             warName = warName.substring(0, warName.lastIndexOf('.'));
         }
@@ -233,9 +234,9 @@
         //look for a webservices dd
         Map portMap = Collections.EMPTY_MAP;
         try {
-            URL wsDDUrl = DeploymentUtil.createJarURL(moduleFile, "WEB-INF/webservices.xml");
-            portMap = getWebServiceBuilder().parseWebServiceDescriptor(wsDDUrl, moduleFile, false, servletNameToPathMap);
-        } catch (MalformedURLException e) {
+            URL wsDDUrl = deployableModule.resolve("WEB-INF/webservices.xml");
+            portMap = getWebServiceBuilder().parseWebServiceDescriptor(wsDDUrl, deployableModule, false, servletNameToPathMap);
+        } catch (IOException e) {
             //no descriptor
         }
         AbstractName moduleName;
@@ -246,10 +247,10 @@
             moduleName = naming.createChildName(earName, targetPath, NameFactory.WEB_MODULE);
         }
 
-        return new WebModule(standAlone, moduleName, environment, moduleFile, targetPath, webApp, jettyWebApp, specDD, contextRoot, portMap, JETTY_NAMESPACE);
+        return new WebModule(standAlone, moduleName, environment, deployableModule, targetPath, webApp, jettyWebApp, specDD, contextRoot, portMap, JETTY_NAMESPACE);
     }
 
-    JettyWebAppType getJettyWebApp(Object plan, JarFile moduleFile, boolean standAlone, String targetPath, WebAppType webApp) throws DeploymentException {
+    JettyWebAppType getJettyWebApp(Object plan, DeployableModule deployableModule, boolean standAlone, String targetPath, WebAppType webApp) throws DeploymentException {
         XmlObject rawPlan = null;
         try {
             // load the geronimo-web.xml from either the supplied plan or from the earFile
@@ -260,11 +261,11 @@
                     if (plan != null) {
                         rawPlan = XmlBeansUtil.parse(((File) plan).toURL(), getClass().getClassLoader());
                     } else {
-                        URL path = DeploymentUtil.createJarURL(moduleFile, "WEB-INF/geronimo-web.xml");
+                        URL path = DeploymentUtil.createJarURL(deployableModule, "WEB-INF/geronimo-web.xml");
                         try {
                             rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
                         } catch (FileNotFoundException e) {
-                            path = DeploymentUtil.createJarURL(moduleFile, "WEB-INF/geronimo-jetty.xml");
+                            path = DeploymentUtil.createJarURL(deployableModule, "WEB-INF/geronimo-jetty.xml");
                             try {
                                 rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
                             } catch (FileNotFoundException e1) {
@@ -284,7 +285,7 @@
                 jettyWebApp = (JettyWebAppType) webPlan.changeType(JettyWebAppType.type);
                 XmlBeansUtil.validateDD(jettyWebApp);
             } else {
-                String defaultContextRoot = determineDefaultContextRoot(webApp, standAlone, moduleFile, targetPath);
+                String defaultContextRoot = determineDefaultContextRoot(webApp, standAlone, deployableModule, targetPath);
                 jettyWebApp = createDefaultPlan(defaultContextRoot);
             }
             return jettyWebApp;
@@ -743,7 +744,7 @@
      * Adds the provided servlets, taking into account the load-on-startup ordering.
      *
      * @param webModuleName   an <code>ObjectName</code> value
-     * @param moduleFile      a <code>JarFile</code> value
+     * @param deployableModule a <code>DeployableModule</code> value
      * @param servletTypes    a <code>ServletType[]</code> value, contains the <code>servlet</code> entries from <code>web.xml</code>.
      * @param servletMappings a <code>Map</code> value
      * @param securityRoles   a <code>Set</code> value
@@ -754,7 +755,7 @@
      * @throws DeploymentException if an error occurs
      */
     private void addServlets(AbstractName webModuleName,
-            JarFile moduleFile,
+            DeployableModule deployableModule,
             ServletType[] servletTypes,
             Map servletMappings,
             Set securityRoles,
@@ -783,7 +784,7 @@
         AbstractName previousServlet = null;
         for (Iterator servlets = loadOrder.iterator(); servlets.hasNext();) {
             ServletType servletType = (ServletType) servlets.next();
-            previousServlet = addServlet(webModuleName, moduleFile, previousServlet, servletType, servletMappings, securityRoles, rolePermissions, portMap, webClassLoader, earContext);
+            previousServlet = addServlet(webModuleName, deployableModule, previousServlet, servletType, servletMappings, securityRoles, rolePermissions, portMap, webClassLoader, earContext);
         }
 
         // JACC v1.0 secion B.19
@@ -792,7 +793,7 @@
 
     /**
      * @param webModuleName
-     * @param moduleFile
+     * @param deployableModule
      * @param previousServlet
      * @param servletType
      * @param servletMappings
@@ -805,7 +806,7 @@
      * @throws DeploymentException
      */
     private AbstractName addServlet(AbstractName webModuleName,
-            JarFile moduleFile,
+            DeployableModule deployableModule,
             AbstractName previousServlet,
             ServletType servletType,
             Map servletMappings,
@@ -842,7 +843,7 @@
                 if (portInfo == null) {
                     throw new DeploymentException("No web service deployment info for servlet name " + servletName); // TODO identify web app in message
                 }
-                getWebServiceBuilder().configurePOJO(servletData, moduleFile, portInfo, servletClassName, webClassLoader);
+                getWebServiceBuilder().configurePOJO(servletData, deployableModule, portInfo, servletClassName, webClassLoader);
             }
         } else if (servletType.isSetJspFile()) {
             servletData = new GBeanData(servletAbstractName, JettyServletHolder.GBEAN_INFO);

Modified: geronimo/server/branches/sachin/modules/jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/jetty/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/jetty/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/jetty/pom.xml Fri Aug 25 06:22:45 2006
@@ -106,15 +106,16 @@
             <artifactId>commons-primitives</artifactId>
         </dependency>
         
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-testsupport</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
     
     <build>
-        <resources>
-            <resource>
-                <directory>src/resources2</directory>
-            </resource>
-        </resources>
-        
         <plugins>
             <plugin>
                 <artifactId>maven-surefire-plugin</artifactId>
@@ -122,7 +123,7 @@
                     <systemProperties>
                         <property>
                             <name>java.security.auth.login.config</name>
-                            <value>${basedir}/src/test-resources/data/login.config</value>
+                            <value>${basedir}/src/test/resources/data/login.config</value>
                         </property>
                     </systemProperties>
                 </configuration>

Modified: geronimo/server/branches/sachin/modules/kernel/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/kernel/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/kernel/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/kernel/pom.xml Fri Aug 25 06:22:45 2006
@@ -85,16 +85,14 @@
             <scope>test</scope>
         </dependency>
         
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-testsupport</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
-    
-    <build>
-        <resources>
-            <resource>
-                <directory>${pom.basedir}/src/META-INF</directory>
-                <targetPath>META-INF</targetPath>
-            </resource>
-        </resources>
-    </build>
     
 </project>
 

Modified: geronimo/server/branches/sachin/modules/naming-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/naming-builder/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/naming-builder/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/naming-builder/pom.xml Fri Aug 25 06:22:45 2006
@@ -108,6 +108,13 @@
             <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
         </dependency>
         
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-testsupport</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
     
     <build>

Modified: geronimo/server/branches/sachin/modules/security-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/security-builder/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/security-builder/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/security-builder/pom.xml Fri Aug 25 06:22:45 2006
@@ -66,7 +66,14 @@
             <artifactId>geronimo-service-builder</artifactId>
             <version>${pom.version}</version>
         </dependency>
-
+        
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-testsupport</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
     
     <build>

Modified: geronimo/server/branches/sachin/modules/security/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/security/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/security/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/security/pom.xml Fri Aug 25 06:22:45 2006
@@ -103,6 +103,13 @@
             <artifactId>hsqldb</artifactId>
             <scope>test</scope>
         </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-testsupport</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
     
     </dependencies>
     
@@ -114,7 +121,7 @@
                     <systemProperties>
                         <property>
                             <name>java.security.auth.login.config</name>
-                            <value>${pom.basedir}/src/test-data/data/login.config</value>
+                            <value>${pom.basedir}/src/test/data/data/login.config</value>
                         </property>
                     </systemProperties>
                     

Modified: geronimo/server/branches/sachin/modules/service-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/service-builder/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/service-builder/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/service-builder/pom.xml Fri Aug 25 06:22:45 2006
@@ -70,7 +70,13 @@
             <artifactId>geronimo-deploy-config</artifactId>
             <version>${pom.version}</version>
         </dependency>
-
+        
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-testsupport</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
 
         <!-- Thirdparty Dependencies -->
         

Copied: geronimo/server/branches/sachin/modules/service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java (from r436742, geronimo/server/trunk/modules/service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java)
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?p2=geronimo/server/branches/sachin/modules/service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java&p1=geronimo/server/trunk/modules/service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java&r1=436742&r2=436786&rev=436786&view=diff
==============================================================================
--- geronimo/server/trunk/modules/service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java (original)
+++ geronimo/server/branches/sachin/modules/service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java Fri Aug 25 06:22:45 2006
@@ -30,11 +30,7 @@
 import javax.xml.namespace.QName;
 
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.ConfigurationBuilder;
-import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.deployment.ModuleIDBuilder;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
+import org.apache.geronimo.deployment.*;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
@@ -96,7 +92,7 @@
         this.serviceBuilders = new NamespaceDrivenBuilderCollection(serviceBuilders);
     }
 
-    public Object getDeploymentPlan(File planFile, JarFile jarFile, ModuleIDBuilder idBuilder) throws DeploymentException {
+    public Object getDeploymentPlan(File planFile, DeployableModule jarFile, ModuleIDBuilder idBuilder) throws DeploymentException {
         if (planFile == null && jarFile == null) {
             return null;
         }
@@ -106,7 +102,7 @@
             if (planFile != null) {
                 xmlObject = XmlBeansUtil.parse(planFile.toURL(), getClass().getClassLoader());
             } else {
-                URL path = DeploymentUtil.createJarURL(jarFile, "META-INF/geronimo-service.xml");
+                URL path = jarFile.resolve("META-INF/geronimo-service.xml");;
                 try {
                     xmlObject = XmlBeansUtil.parse(path, getClass().getClassLoader());
                 } catch (FileNotFoundException e) {
@@ -160,24 +156,24 @@
         }
     }
 
-    public Artifact getConfigurationID(Object plan, JarFile module, ModuleIDBuilder idBuilder) throws IOException, DeploymentException {
+    public Artifact getConfigurationID(Object plan, DeployableModule module, ModuleIDBuilder idBuilder) throws IOException, DeploymentException {
         ModuleType configType = (ModuleType) plan;
         EnvironmentType environmentType = configType.getEnvironment();
         Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
-        idBuilder.resolve(environment, module == null ? "" : new File(module.getName()).getName(), "car");
+        idBuilder.resolve(environment, module == null ? "" : module.getRoot().getName(), "car");
         if(!environment.getConfigId().isResolved()) {
             throw new IllegalStateException("Service Module ID is not fully populated ("+environment.getConfigId()+")");
         }
         return environment.getConfigId();
     }
 
-    public DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object plan, JarFile jar, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws IOException, DeploymentException {
+    public DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object plan, DeployableModule jar, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws IOException, DeploymentException {
         ModuleType configType = (ModuleType) plan;
 
         return buildConfiguration(inPlaceDeployment, configId, configType, jar, configurationStores, artifactResolver, targetConfigurationStore);
     }
 
-    public DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, ModuleType moduleType, JarFile jar, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws DeploymentException, IOException {
+    public DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, ModuleType moduleType, DeployableModule jar, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws DeploymentException, IOException {
         ArtifactType type = moduleType.getEnvironment().isSetModuleId() ? moduleType.getEnvironment().getModuleId() : moduleType.getEnvironment().addNewModuleId();
         type.setArtifactId(configId.getArtifactId());
         type.setGroupId(configId.getGroupId());
@@ -203,7 +199,7 @@
 
             AbstractName moduleName = naming.createRootName(configId, configId.toString(), SERVICE_MODULE);
             context = new DeploymentContext(outfile,
-                    inPlaceDeployment && null != jar ? DeploymentUtil.toFile(jar) : null,
+                    inPlaceDeployment && jar.getRoot().isDirectory() ? jar.getRoot() : null,
                     environment,
                     moduleName,
                     ConfigurationModuleType.SERVICE,
@@ -211,8 +207,12 @@
                     configurationManager,
                     repositories);
             if(jar != null) {
-                File file = new File(jar.getName());
-                context.addIncludeAsPackedJar(URI.create(file.getName()), jar);
+                if(jar instanceof DefaultDeployableModule) {
+                    JarFile jarFile = ((DefaultDeployableModule) jar).getJarFile();
+                    context.addIncludeAsPackedJar(URI.create(jar.getRoot().getName()), jarFile);
+                } else {
+                    //TODO GERONIMO-1526
+                }
             }
 
             serviceBuilders.build(moduleType, context, context);

Modified: geronimo/server/branches/sachin/modules/system/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/system/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/system/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/system/pom.xml Fri Aug 25 06:22:45 2006
@@ -95,19 +95,6 @@
     </dependencies>
     
     <build>
-        
-        <resources>
-            <resource>
-                <directory>${pom.basedir}/src/schema</directory>
-                <targetPath>META-INF/schema</targetPath>
-            </resource>
-            
-            <!-- Include the dynamically generated resources (see below) -->
-            <resource>
-                <directory>${pom.basedir}/target/resources</directory>
-            </resource>
-        </resources>
-        
         <plugins>
             <plugin>
                 <artifactId>maven-antrun-plugin</artifactId>
@@ -124,10 +111,10 @@
                                     <format property="build.year" pattern="yyyy"/>
                                 </tstamp>
                                 
-                                <mkdir dir="${pom.basedir}/target/resources/org/apache/geronimo/system/serverinfo"/>
+                                <mkdir dir="${pom.basedir}/target/classes/org/apache/geronimo/system/serverinfo"/>
                                 
                                 <propertyfile
-                                    file="${pom.basedir}/target/resources/org/apache/geronimo/system/serverinfo/geronimo-version.properties"
+                                    file="${pom.basedir}/target/classes/org/apache/geronimo/system/serverinfo/geronimo-version.properties"
                                     comment="Geronimo version information (generated, do not modify)">
                                     
                                     <entry key="version" value="${pom.version}"/>
@@ -149,13 +136,15 @@
                             <tasks>
                                 <delete dir="${project.build.directory}/tmp"/>
                                 <mkdir dir="${project.build.directory}/tmp"/>
+                                
                                 <mkdir dir="${project.build.directory}/m1"/>
-                                <mkdir dir="${project.build.directory}/m2"/>
                                 <copy todir="${project.build.directory}/m1">
-                                    <fileset dir="${basedir}/src/test-repo/m1"/>
+                                    <fileset dir="${basedir}/src/test/repo/m1"/>
                                 </copy>
+                                
+                                <mkdir dir="${project.build.directory}/m2"/>
                                 <copy todir="${project.build.directory}/m2">
-                                    <fileset dir="${basedir}/src/test-repo/m2"/>
+                                    <fileset dir="${basedir}/src/test/repo/m2"/>
                                 </copy>
                             </tasks>
                         </configuration>

Modified: geronimo/server/branches/sachin/modules/tomcat-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/tomcat-builder/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/tomcat-builder/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/tomcat-builder/pom.xml Fri Aug 25 06:22:45 2006
@@ -129,6 +129,7 @@
             <!--<artifactId>geronimo-servlet_2.4_spec</artifactId>-->
             <!--<scope>test</scope>-->
         <!--</dependency>-->
+        
         <!--WFT??? why is this needed for tests all of a sudden? -->
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
@@ -142,20 +143,16 @@
             <scope>test</scope>
         </dependency>
         
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-testsupport</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
     
     <build>
-        <resources>
-            <!--<resource>-->
-                <!--<directory>src/schema</directory>-->
-                <!--<targetPath>META-INF</targetPath>-->
-                <!--<includes>-->
-                    <!--<include>geronimo-tomcat-1.1.xsd</include>-->
-                    <!--<include>geronimo-tomcat-config-1.0.xsd</include>-->
-                <!--</includes>-->
-            <!--</resource>-->
-        </resources>
-
         <plugins>
             <plugin>
                 <artifactId>maven-surefire-plugin</artifactId>
@@ -167,7 +164,7 @@
                         </property>
                         <property>
                             <name>java.security.auth.login.config</name>
-                            <value>src/test-resources/data/login.config</value>
+                            <value>src/test/resources/data/login.config</value>
                         </property>
                     </systemProperties>
                 </configuration>
@@ -215,14 +212,18 @@
                         </goals>
                         <configuration>
                             <tasks>
-                                <copy todir="${project.build.directory}/var/catalina/conf" file="src/var/web.xml"/>
+                                <copy todir="${project.build.directory}/var/catalina/conf" file="src/test/data/web.xml"/>
                                 <copy todir="${project.build.directory}/var/catalina/webapps">
-                                    <fileset dir="src/test-resources/deployables">
+                                    <fileset dir="src/test/resources/deployables">
                                         <include name="war1/**"/>
                                         <include name="war3/**"/>
                                         <include name="war4/**"/>
                                     </fileset>
                                 </copy>
+                                
+                                <!--
+                                FIXME: Use dependency plugin.
+                                -->
                                 <copy todir="${project.build.directory}/endorsed" flatten="true">
                                     <fileset dir="${settings.localRepository}">
                                         <include name="xerces/xercesImpl/${xercesVersion}/*.jar"/>

Modified: geronimo/server/branches/sachin/modules/tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/tomcat/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/tomcat/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/tomcat/pom.xml Fri Aug 25 06:22:45 2006
@@ -248,6 +248,13 @@
             <artifactId>wadi-tomcat55</artifactId>
         </dependency>
         
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-testsupport</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
     
     <build>
@@ -278,9 +285,9 @@
                         </goals>
                         <configuration>
                             <tasks>
-                                <copy todir="target/var/catalina/conf" file="src/resources/META-INF/geronimo-tomcat/var/catalina/conf/web.xml" />
+                                <copy todir="target/var/catalina/conf" file="src/main/resources/META-INF/geronimo-tomcat/var/catalina/conf/web.xml" />
                                 <copy todir="target/var/catalina/webapps">
-                                    <fileset dir="src/test-resources/deployables">
+                                    <fileset dir="src/test/resources/deployables">
                                         <include name="war1/**" />
                                         <include name="war3/**" />
                                     </fileset>

Modified: geronimo/server/branches/sachin/modules/upgrade/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/upgrade/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/upgrade/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/upgrade/pom.xml Fri Aug 25 06:22:45 2006
@@ -64,6 +64,7 @@
             <artifactId>geronimo-service-builder</artifactId>
             <version>${pom.version}</version>
         </dependency>
+        
     </dependencies>
     
 </project>

Copied: geronimo/server/branches/sachin/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java (from r436742, geronimo/server/trunk/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java)
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java?p2=geronimo/server/branches/sachin/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java&p1=geronimo/server/trunk/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java&r1=436742&r2=436786&rev=436786&view=diff
==============================================================================
--- geronimo/server/trunk/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java (original)
+++ geronimo/server/branches/sachin/modules/web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java Fri Aug 25 06:22:45 2006
@@ -47,6 +47,7 @@
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
+import org.apache.geronimo.deployment.DeployableModule;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.deployment.xbeans.ServiceDocument;
 import org.apache.geronimo.gbean.AbstractName;
@@ -130,15 +131,15 @@
         return dependencies;
     }
 
-    public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
-        return createModule(plan, moduleFile, ".", null, true, null, null, naming, idBuilder);
+    public Module createModule(File plan, DeployableModule deployableModule, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+        return createModule(plan, deployableModule, ".", null, true, null, null, naming, idBuilder);
     }
 
-    public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
-        return createModule(plan, moduleFile, targetPath, specDDUrl, false, (String) moduleContextInfo, earName, naming, idBuilder);
+    public Module createModule(Object plan, DeployableModule deployableModule, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+        return createModule(plan, deployableModule, targetPath, specDDUrl, false, (String) moduleContextInfo, earName, naming, idBuilder);
     }
 
-    protected abstract Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException;
+    protected abstract Module createModule(Object plan, DeployableModule deployableModule, String targetPath, URL specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException;
 
     /**
      * Some servlets will have multiple url patterns.  However, webservice servlets
@@ -160,7 +161,7 @@
         return map;
     }
 
-    protected String determineDefaultContextRoot(WebAppType webApp, boolean isStandAlone, JarFile moduleFile, String targetPath) {
+    protected String determineDefaultContextRoot(WebAppType webApp, boolean isStandAlone, DeployableModule deployableModule, String targetPath) {
 
         if (webApp != null && webApp.getId() != null) {
             return webApp.getId();
@@ -168,7 +169,7 @@
 
         if (isStandAlone) {
             // default configId is based on the moduleFile name
-            return trimPath(new File(moduleFile.getName()).getName());
+            return trimPath(deployableModule.getRoot().getName());
         }
 
         // default configId is based on the module uri from the application.xml
@@ -191,7 +192,7 @@
         return path;
     }
 
-    public void installModule(JarFile earFile, EARContext earContext, Module module, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repositories) throws DeploymentException {
+    public void installModule(DeployableModule ear, EARContext earContext, Module module, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repositories) throws DeploymentException {
         EARContext moduleContext;
         if (module.isStandAlone()) {
             moduleContext = earContext;

Modified: geronimo/server/branches/sachin/modules/webservices/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/webservices/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/webservices/pom.xml (original)
+++ geronimo/server/branches/sachin/modules/webservices/pom.xml Fri Aug 25 06:22:45 2006
@@ -45,14 +45,6 @@
         <url>http://svn.apache.org/viewvc/geronimo/trunk/modules/webservices</url>
     </scm>
     
-    <build>
-        <resources>
-            <resource>
-                <directory>src/resources2</directory>
-            </resource>
-        </resources>
-    </build>
-    
     <dependencies>
         
         <dependency>

Modified: geronimo/server/branches/sachin/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/pom.xml?rev=436786&r1=436785&r2=436786&view=diff
==============================================================================
--- geronimo/server/branches/sachin/pom.xml (original)
+++ geronimo/server/branches/sachin/pom.xml Fri Aug 25 06:22:45 2006
@@ -875,30 +875,6 @@
     </dependencyManagement>
 
     <build>
-        <!--
-
-        FIXME: Need to reorganize modules to use the standard maven module layout
-
-        -->
-        <sourceDirectory>src/java</sourceDirectory>
-        <testSourceDirectory>src/test</testSourceDirectory>
-
-        <resources>
-            <resource>
-                <directory>src/resources</directory>
-            </resource>
-        </resources>
-
-        <testResources>
-            <testResource>
-                <directory>src/test-data</directory>
-            </testResource>
-
-            <testResource>
-                <directory>src/test-resources</directory>
-            </testResource>
-        </testResources>
-
         <pluginManagement>
             <plugins>
                 <plugin>
@@ -915,9 +891,9 @@
                     </executions>
 
                     <configuration>
-                        <schemaDirectory>${pom.basedir}/src/schema</schemaDirectory>
+                        <schemaDirectory>${pom.basedir}/src/main/schema</schemaDirectory>
                         <xmlConfigs>
-                            <xmlConfig implementation="java.io.File">${pom.basedir}/src/schema/xmlconfig.xml</xmlConfig>
+                            <xmlConfig implementation="java.io.File">${pom.basedir}/src/main/schema/xmlconfig.xml</xmlConfig>
                         </xmlConfigs>
                         <download>true</download>
                         <quiet>false</quiet>
@@ -928,13 +904,34 @@
                 NOTE: WAR & JSPC are overridden here (from project-config) to specify non-standard paths.
                       Remove once modules have been reorganized to use the m2 standard layout.
                 -->
-
+                
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>jspc-maven-plugin</artifactId>
+                    <version>1.4.4</version>
+                    <executions>
+                        <execution>
+                            <id>jspc</id>
+                            <goals>
+                                <goal>compile</goal>
+                            </goals>
+                            <configuration>
+                                <warSourceDirectory>${pom.basedir}/src/main/webapp</warSourceDirectory>
+                                <inputWebXml>${pom.basedir}/src/main/webapp/WEB-INF/web.xml</inputWebXml>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+                
+                <!--
+                FIXME: Should not configure war to assume jsp by default
+                -->
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-war-plugin</artifactId>
                     <version>2.0.1</version>
                     <configuration>
-                        <warSourceDirectory>${pom.basedir}/src/webapp</warSourceDirectory>
+                        <warSourceDirectory>${pom.basedir}/src/main/webapp</warSourceDirectory>
                         <webXml>${pom.basedir}/target/jspweb.xml</webXml>
                         <archiveClasses>true</archiveClasses>
                         <archive>
@@ -954,24 +951,6 @@
                             <addMavenDescriptor>false</addMavenDescriptor>
                         </archive>
                     </configuration>
-                </plugin>
-
-                <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>jspc-maven-plugin</artifactId>
-                    <version>1.4.4</version>
-                    <executions>
-                        <execution>
-                            <id>jspc</id>
-                            <goals>
-                                <goal>compile</goal>
-                            </goals>
-                            <configuration>
-                                <warSourceDirectory>${pom.basedir}/src/webapp</warSourceDirectory>
-                                <inputWebXml>${pom.basedir}/src/webapp/WEB-INF/web.xml</inputWebXml>
-                            </configuration>
-                        </execution>
-                    </executions>
                 </plugin>
             </plugins>
         </pluginManagement>



Mime
View raw message