geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r602280 - in /geronimo/server/trunk: ./ assemblies/geronimo-boilerplate-minimal/ assemblies/geronimo-boilerplate-minimal/src/main/assembly/ assemblies/geronimo-boilerplate-minimal/src/main/underlay/META-INF/ assemblies/geronimo-boilerplate-...
Date Sat, 08 Dec 2007 00:17:54 GMT
Author: djencks
Date: Fri Dec  7 16:17:52 2007
New Revision: 602280

URL: http://svn.apache.org/viewvc?rev=602280&view=rev
Log:
GERONIMO-3607 cleanup, reduce size of boilerplate plugin by using repo instead

Removed:
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/META-INF/
Modified:
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/pom.xml
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/assembly/boilerplate.xml
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/gsh-classworlds.conf
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/pom.xml?rev=602280&r1=602279&r2=602280&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/pom.xml (original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/pom.xml Fri Dec  7 16:17:52
2007
@@ -24,61 +24,71 @@
 
     <modelVersion>4.0.0</modelVersion>
 
+<!--
     <parent>
         <groupId>org.apache.geronimo.assemblies</groupId>
         <artifactId>assemblies</artifactId>
         <version>2.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
+-->
+    <parent>
+        <groupId>org.apache.geronimo.configs</groupId>
+        <artifactId>configs</artifactId>
+        <version>2.1-SNAPSHOT</version>
+<!--<relativePath>../pom.xml</relativePath>-->
+    </parent>
 
+    <groupId>org.apache.geronimo.assemblies</groupId>
     <artifactId>geronimo-boilerplate-minimal</artifactId>
     <name>Geronimo Assemblies :: Boilerplate Minimal</name>
     <packaging>resource-bundle</packaging>
+    <!--<packaging>jar</packaging>-->
 
     <description>
         Provides boilerplate files for all Geronimo minimal server (Little-G) assemblies.
     </description>
 
     <dependencies>
-        
+
         <!-- lib/gshell Dependencies -->
-        
+
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-commands</artifactId>
             <version>${version}</version>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-bootstrap</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-cli</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-embeddable</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-whisper</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.gshell.remote</groupId>
             <artifactId>gshell-remote-client</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.gshell.remote</groupId>
             <artifactId>gshell-remote-common</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.gshell.remote</groupId>
             <artifactId>gshell-remote-server</artifactId>
@@ -88,82 +98,98 @@
             <groupId>org.apache.mina</groupId>
             <artifactId>mina-core</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.mina</groupId>
             <artifactId>mina-filter-ssl</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>jcl104-over-slf4j</artifactId>
         </dependency>
-        
+
+        <dependency>
+            <groupId>org.codehaus.groovy</groupId>
+            <artifactId>groovy-all</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ant</groupId>
+            <artifactId>ant-launcher</artifactId>
+        </dependency>
+
+
         <!-- lib Dependencies -->
-        
+
         <dependency>
             <groupId>asm</groupId>
             <artifactId>asm</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>asm</groupId>
             <artifactId>asm-commons</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>cglib</groupId>
             <artifactId>cglib-nodep</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>commons-cli</groupId>
             <artifactId>commons-cli</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>log4j</groupId>
             <artifactId>log4j</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>xpp3</groupId>
             <artifactId>xpp3</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>com.thoughtworks.xstream</groupId>
             <artifactId>xstream</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-cli</artifactId>
             <version>${version}</version>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-kernel</artifactId>
             <version>${version}</version>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-deploy-jsr88-bootstrapper</artifactId>
             <version>${version}</version>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-transformer</artifactId>
@@ -194,54 +220,54 @@
         <!--
         FIXME: Bad idea for plugins
         -->
-<!--
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-impl</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-stax-api_1.0_spec</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>woodstox</groupId>
-            <artifactId>wstx-asl</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-activation_1.1_spec</artifactId>
-        </dependency>
--->
+        <!--
+                <dependency>
+                    <groupId>javax.xml.bind</groupId>
+                    <artifactId>jaxb-api</artifactId>
+                </dependency>
+
+                <dependency>
+                    <groupId>com.sun.xml.bind</groupId>
+                    <artifactId>jaxb-impl</artifactId>
+                </dependency>
+
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+                </dependency>
+
+                <dependency>
+                    <groupId>woodstox</groupId>
+                    <artifactId>wstx-asl</artifactId>
+                </dependency>
+
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-activation_1.1_spec</artifactId>
+                </dependency>
+        -->
 
         <!-- lib/endorsed Dependencies -->
-        
+
         <dependency>
             <groupId>org.apache.yoko</groupId>
             <artifactId>yoko-spec-corba</artifactId>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.yoko</groupId>
             <artifactId>yoko-rmi-spec</artifactId>
         </dependency>
-        
+
         <!-- bin Dependencies (executable jars) -->
-        
+
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>j2ee-system</artifactId>
             <version>${version}</version>
             <type>car</type>
         </dependency>
-        
+
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>shutdown</artifactId>
@@ -257,7 +283,7 @@
         </dependency>
 
     </dependencies>
-    
+
     <build>
         <plugins>
             <plugin>
@@ -272,7 +298,7 @@
                         </goals>
                         <configuration>
                             <outputDirectory>${project.build.directory}/schema</outputDirectory>
-                            
+
                             <artifactItems>
                                 <artifactItem>
                                     <groupId>org.apache.geronimo.modules</groupId>
@@ -334,7 +360,7 @@
                     </execution>
                 </executions>
             </plugin>
-            
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
@@ -358,7 +384,7 @@
                             </tasks>
                         </configuration>
                     </execution>
-                    
+
                     <execution>
                         <id>install-underlay</id>
                         <phase>process-classes</phase>
@@ -378,7 +404,37 @@
                     </execution>
                 </executions>
             </plugin>
-            
+
+            <plugin>
+                <groupId>org.apache.geronimo.plugins</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-plugin-metadata</id>
+                        <phase>generate-resources</phase>
+                        <!--<phase>process-resources</phase>-->
+                        <goals>
+                            <goal>prepare-metadata</goal>
+                        </goals>
+                        <configuration>
+                            <useMavenDependencies>
+                                <value>true</value>
+                                <includeVersion>true</includeVersion>
+                            </useMavenDependencies>
+                            <category>Geronimo Core</category>
+                            <instance>
+                                <plugin-artifact>
+                                    <module-id>
+                                        <type>jar</type>
+                                    </module-id>
+                                    <copy-file relative-to="geronimo" dest-dir=""></copy-file>
+                                </plugin-artifact>
+                            </instance>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-assembly-plugin</artifactId>
@@ -387,6 +443,7 @@
                     <execution>
                         <id>boilerplate</id>
                         <phase>compile</phase>
+                        <!--<phase>package</phase>-->
                         <goals>
                             <goal>directory-inline</goal>
                         </goals>

Modified: geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/assembly/boilerplate.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/assembly/boilerplate.xml?rev=602280&r1=602279&r2=602280&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/assembly/boilerplate.xml
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/assembly/boilerplate.xml
Fri Dec  7 16:17:52 2007
@@ -34,22 +34,22 @@
             <useStrictFiltering>true</useStrictFiltering>
             <includes>
                 <include>org.apache.geronimo.modules:geronimo-commands</include>
-                <include>org.apache.geronimo.gshell:gshell-embeddable</include>
-                <include>org.apache.geronimo.gshell:gshell-cli</include>
+                <!--<include>org.apache.geronimo.gshell:gshell-embeddable</include>-->
+                <!--<include>org.apache.geronimo.gshell:gshell-cli</include>-->
 
                 <!-- rsh related commands -->
-                <include>org.apache.geronimo.gshell:gshell-whisper</include>
-                <include>org.apache.geronimo.gshell.remote:gshell-remote-client</include>
-                <include>org.apache.geronimo.gshell.remote:gshell-remote-common</include>
-                <include>org.apache.geronimo.gshell.remote:gshell-remote-server</include>
-                <include>org.apache.mina:mina-core</include>
-                <include>org.apache.mina:mina-filter-ssl</include>
+                <!--<include>org.apache.geronimo.gshell:gshell-whisper</include>-->
+                <!--<include>org.apache.geronimo.gshell.remote:gshell-remote-client</include>-->
+                <!--<include>org.apache.geronimo.gshell.remote:gshell-remote-common</include>-->
+                <!--<include>org.apache.geronimo.gshell.remote:gshell-remote-server</include>-->
+                <!--<include>org.apache.mina:mina-core</include>-->
+                <!--<include>org.apache.mina:mina-filter-ssl</include>-->
 
-                <include>org.codehaus.groovy:groovy-all</include>
-                <include>org.apache.ant:ant</include>
-                <include>org.apache.ant:ant-launcher</include>
-                <include>org.slf4j:slf4j-log4j12</include>
-                <include>org.slf4j:jcl104-over-slf4j</include>
+                <!--<include>org.codehaus.groovy:groovy-all</include>-->
+                <!--<include>org.apache.ant:ant</include>-->
+                <!--<include>org.apache.ant:ant-launcher</include>-->
+                <!--<include>org.slf4j:slf4j-log4j12</include>-->
+                <!--<include>org.slf4j:jcl104-over-slf4j</include>-->
             </includes>
         </dependencySet>
 
@@ -89,6 +89,7 @@
                 <include>org.apache.geronimo.modules:geronimo-cli</include>
                 <include>org.apache.geronimo.modules:geronimo-kernel</include>
                 <include>org.apache.geronimo.modules:geronimo-deploy-jsr88-bootstrapper</include>
+                <include>org.apache.geronimo.configs:jsr88-deploymentfactory</include>
                 <include>org.apache.geronimo.modules:geronimo-transformer</include>
                 <!--<include>org.apache.geronimo.specs:geronimo-stax-api_1.0_spec</include>-->
                 <!--<include>org.apache.geronimo.specs:geronimo-activation_1.1_spec</include>-->
@@ -112,7 +113,7 @@
                 <include>org.apache.geronimo.configs:client-system</include>
             </includes>
         </dependencySet>
-       
+
         <dependencySet>
             <outputDirectory>bin</outputDirectory>
             <outputFileNameMapping>server.jar</outputFileNameMapping>

Modified: geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/gsh-classworlds.conf
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/gsh-classworlds.conf?rev=602280&r1=602279&r2=602280&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/gsh-classworlds.conf
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/gsh-classworlds.conf
Fri Dec  7 16:17:52 2007
@@ -26,7 +26,20 @@
 [gshell]
     load ${gshell.home}/etc
     load ${gshell.home}/lib/gshell/*.jar
-    
+    load ${gshell.home}/repository/org/apache/ant/ant/1.7.0/ant-*.jar
+    load ${gshell.home}/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-*.jar
+    load ${gshell.home}/repository/org/apache/geronimo/gshell/gshell-cli/1.0-alpha-1-SNAPSHOT/gshell-cli-*.jar
+    load ${gshell.home}/repository/org/apache/geronimo/gshell/gshell-embeddable/1.0-alpha-1-SNAPSHOT/gshell-embeddable-*.jar
+    load ${gshell.home}/repository/org/apache/geronimo/gshell/remote/gshell-remote-client/1.0-alpha-1-SNAPSHOT/gshell-remote-client-*.jar
+    load ${gshell.home}/repository/org/apache/geronimo/gshell/remote/gshell-remote-common/1.0-alpha-1-SNAPSHOT/gshell-remote-common-*.jar
+    load ${gshell.home}/repository/org/apache/geronimo/gshell/remote/gshell-remote-server/1.0-alpha-1-SNAPSHOT/gshell-remote-server-*.jar
+    load ${gshell.home}/repository/org/apache/geronimo/gshell/gshell-whisper/1.0-alpha-1-SNAPSHOT/gshell-whisper-*.jar
+    load ${gshell.home}/repository/org/apache/mina/mina-core/1.1.2/mina-core-*.jar
+    load ${gshell.home}/repository/org/apache/mina/mina-filter-ssl/1.1.2/mina-filter-ssl-*.jar
+    load ${gshell.home}/repository/org/codehaus/groovy/groovy-all/1.1-rc-1/groovy-all-*.jar
+    load ${gshell.home}/repository/org/slf4j/slf4j-log4j12/1.4.3/slf4j-log4j12-*.jar
+    load ${gshell.home}/repository/org/slf4j/jcl104-over-slf4j/1.4.3/jcl104-over-slf4j-*.jar
+
     ##
     ## HACK: For now pick these up from the normal lib/*
     ##

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java?rev=602280&r1=602279&r2=602280&view=diff
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PluginMetadataGeneratorMojo.java
Fri Dec  7 16:17:52 2007
@@ -32,8 +32,10 @@
 import org.apache.geronimo.system.plugin.model.LicenseType;
 import org.apache.geronimo.system.plugin.model.PluginArtifactType;
 import org.apache.geronimo.system.plugin.model.PluginType;
-import org.apache.geronimo.system.plugin.model.ConfigXmlContentType;
 import org.apache.maven.model.License;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.PluginExecution;
+import org.apache.maven.model.Resource;
 import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
@@ -50,7 +52,7 @@
     /**
      * Directory for generated plugin metadata file.
      *
-     * @parameter expression="${project.build.directory}/resources/META-INF"
+     * @parameter expression="${project.build.directory}/resources/"
      * @required
      */
     protected File targetDir = null;
@@ -58,7 +60,7 @@
     /**
      * Name of generated plugin metadata file.
      *
-     * @parameter default-value="geronimo-plugin.xml"
+     * @parameter default-value="META-INF/geronimo-plugin.xml"
      * @required
      */
     protected String pluginMetadataFileName = null;
@@ -66,10 +68,10 @@
     /**
      * Full path of generated plugin metadata file.
      *
-     * @parameter expression="${project.build.directory}/resources/META-INF/geronimo-plugin.xml"
+     * @ parameter expression="${project.build.directory}/resources/META-INF/geronimo-plugin.xml"
      * @required
      */
-    protected File targetFile = null;
+//    protected File targetFile = null;
 
     /**
      * Whether licenses (copied from maven licence elements) are OSI approved.
@@ -134,7 +136,16 @@
         }
 
         PluginArtifactType instance;
-        Xpp3Dom dom = (Xpp3Dom) ((org.apache.maven.model.Plugin)project.getModel().getBuild().getPluginsAsMap().get(
"org.apache.geronimo.plugins:car-maven-plugin")).getConfiguration();
+        Plugin plugin = (Plugin) project.getModel().getBuild().getPluginsAsMap().get("org.apache.geronimo.plugins:car-maven-plugin");
+        Xpp3Dom dom;
+        if (plugin.getExecutions().isEmpty()) {
+            dom = (Xpp3Dom) plugin.getConfiguration();
+        } else {
+            if (plugin.getExecutions().size() > 1) {
+                throw new IllegalStateException("Cannot determine correct configuration for
PluginMetadataGeneratorMojo: " + plugin.getExecutionsAsMap().keySet());
+            }
+            dom = (Xpp3Dom) ((PluginExecution)plugin.getExecutions().get(0)).getConfiguration();
+        }
         Xpp3Dom instanceDom = dom.getChild("instance");
 
         if (instanceDom == null || instanceDom.getChild("plugin-artifact") == null) {
@@ -186,17 +197,27 @@
         artifactType.setGroupId(project.getGroupId());
         artifactType.setArtifactId(project.getArtifactId());
         artifactType.setVersion(project.getVersion());
-        artifactType.setType(project.getArtifact().getType());
+        ArtifactType existingArtifact = instance.getModuleId();
+        if (existingArtifact != null && existingArtifact.getType() != null) {
+            artifactType.setType(existingArtifact.getType());
+        } else {
+            artifactType.setType(project.getArtifact().getType());
+        }
         instance.setModuleId(artifactType);
         addDependencies(instance);
         targetDir.mkdirs();
+        File targetFile = new File(targetDir.toURI().resolve(pluginMetadataFileName));
+        targetFile.getParentFile().mkdirs();
         FileOutputStream out = new FileOutputStream(targetFile);
         try {
             PluginXmlUtil.writePluginMetadata(metadata, out);
         } finally {
             out.close();
         }
-        getProject().getResources().add(targetFile);
+        Resource resource = new Resource();
+        resource.setDirectory(targetDir.getPath());
+        resource.addInclude(pluginMetadataFileName);
+        getProject().getResources().add(resource);
     }
 
     private void addDependencies(PluginArtifactType instance) {

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?rev=602280&r1=602279&r2=602280&view=diff
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Fri Dec  7 16:17:52 2007
@@ -1631,6 +1631,19 @@
             </dependency>
 
             <dependency>
+                <groupId>org.apache.ant</groupId>
+                <artifactId>ant</artifactId>
+                <version>1.7.0</version>
+             </dependency>
+
+             <dependency>
+                 <groupId>org.apache.ant</groupId>
+                 <artifactId>ant-launcher</artifactId>
+                 <version>1.7.0</version>
+             </dependency>
+
+
+            <dependency>
                 <groupId>org.apache.pluto</groupId>
                 <artifactId>pluto-portal-driver</artifactId>
                 <version>${plutoVersion}</version>



Mime
View raw message