geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r434144 - in /geronimo/sandbox/car-maven-plugin: ./ src/main/java/org/apache/geronimo/plugin/ src/main/java/org/apache/geronimo/plugin/car/
Date Wed, 23 Aug 2006 19:56:44 GMT
Author: gnodet
Date: Wed Aug 23 12:56:43 2006
New Revision: 434144

URL: http://svn.apache.org/viewvc?rev=434144&view=rev
Log:
Check in car-maven-plugin for G 1.1

Added:
    geronimo/sandbox/car-maven-plugin/
      - copied from r432624, geronimo/trunk/m2-plugins/car-maven-plugin/
    geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/MojoSupport.java
Modified:
    geronimo/sandbox/car-maven-plugin/pom.xml
    geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java
    geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java

Modified: geronimo/sandbox/car-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/car-maven-plugin/pom.xml?rev=434144&r1=432624&r2=434144&view=diff
==============================================================================
--- geronimo/sandbox/car-maven-plugin/pom.xml (original)
+++ geronimo/sandbox/car-maven-plugin/pom.xml Wed Aug 23 12:56:43 2006
@@ -22,51 +22,65 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.geronimo.plugins</groupId>
-        <artifactId>plugins</artifactId>
-        <version>1.2-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
+        <groupId>org.apache</groupId>
+        <artifactId>apache</artifactId>
+        <version>3</version>
     </parent>
 
+    <groupId>org.apache.geronimo.plugins</groupId>
     <artifactId>car-maven-plugin</artifactId>
     <name>Geronimo Maven2 Plugins :: CAR</name>
     <packaging>maven-plugin</packaging>
+    <version>1.1-SNAPSHOT</version>
+    
+    <properties>
+        <geronimo-version>1.1</geronimo-version>
+        <geronimo-qname-spec-version>1.0.1</geronimo-qname-spec-version>
+        <maven-version>2.0.4</maven-version>
+    </properties>
     
     <dependencies>
-        
+
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-system</artifactId>
-            <version>${pom.version}</version>
+            <version>${geronimo-version}</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-common</artifactId>
+            <version>${geronimo-version}</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-kernel</artifactId>
+            <version>${geronimo-version}</version>
         </dependency>
         
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-service-builder</artifactId>
-            <version>${pom.version}</version>
+            <version>${geronimo-version}</version>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-deploy-tool</artifactId>
-            <version>${pom.version}</version>
-            
-            <!-- exclude transitive deps -->
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.geronimo.modules</groupId>
-                    <artifactId>geronimo-util</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.geronimo.modules</groupId>
-                    <artifactId>geronimo-deploy-jsr88</artifactId>
-                </exclusion>
-            </exclusions>
+            <version>${geronimo-version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-deployment</artifactId>
+            <version>${geronimo-version}</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-qname_1.1_spec</artifactId>
+            <version>${geronimo-qname-spec-version}</version>
         </dependency>
         
         <dependency>
@@ -80,6 +94,34 @@
         </dependency>
         
         <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>${maven-version}</version>
+            <type>jar</type>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-project</artifactId>
+            <version>${maven-version}</version>
+            <type>jar</type>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-artifact</artifactId>
+            <version>${maven-version}</version>
+            <type>jar</type>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-utils</artifactId>
+            <version>1.2</version>
+            <type>jar</type>
+        </dependency>
+        
+        <dependency>
             <groupId>velocity</groupId>
             <artifactId>velocity</artifactId>
             <version>1.4</version>
@@ -88,31 +130,55 @@
         <dependency>
             <groupId>commons-cli</groupId>
             <artifactId>commons-cli</artifactId>
+            <version>1.0</version>
         </dependency>
         
         <dependency>
             <groupId>xerces</groupId>
             <artifactId>xercesImpl</artifactId>
+            <version>2.8.0</version>
         </dependency>
 
         <dependency>
             <groupId>xerces</groupId>
             <artifactId>xmlParserAPIs</artifactId>
+            <version>2.6.2</version>
         </dependency>
 
         <dependency>
             <groupId>xstream</groupId>
             <artifactId>xstream</artifactId>
+            <version>1.1.3</version>
         </dependency>
 
         <dependency>
             <groupId>xpp3</groupId>
             <artifactId>xpp3</artifactId>
+            <version>1.1.3.4.O</version>
         </dependency>
         
         <dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
+            <version>1.0.4</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>xmlbeans</groupId>
+            <artifactId>xbean</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>stax</groupId>
+            <artifactId>stax-api</artifactId>
+            <version>1.0.1</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>cglib</groupId>
+            <artifactId>cglib-nodep</artifactId>
+            <version>2.1_3</version>
         </dependency>
         
     </dependencies>

Added: geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/MojoSupport.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/MojoSupport.java?rev=434144&view=auto
==============================================================================
--- geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/MojoSupport.java
(added)
+++ geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/MojoSupport.java
Wed Aug 23 12:56:43 2006
@@ -0,0 +1,60 @@
+/*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.plugin;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.logging.Log;
+
+/**
+ * Support for Mojo implementations.
+ *
+ * @version $Id: MojoSupport.java 422054 2006-07-14 21:25:59Z jdillon $
+ */
+public abstract class MojoSupport
+    extends AbstractMojo
+{
+    protected Log log;
+
+    protected void init() {
+        log = getLog();
+    }
+
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        init();
+
+        try {
+            doExecute();
+        }
+        catch (Exception e) {
+            if (e instanceof MojoExecutionException) {
+                throw (MojoExecutionException)e;
+            }
+            else if (e instanceof MojoFailureException) {
+                throw (MojoFailureException)e;
+            }
+            else {
+                throw new MojoExecutionException(e.getMessage(), e);
+            }
+        }
+    }
+
+    protected void doExecute() throws Exception {
+        // Sub-class should override
+    }
+}

Modified: geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java?rev=434144&r1=432624&r2=434144&view=diff
==============================================================================
--- geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java
(original)
+++ geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PackageMojo.java
Wed Aug 23 12:56:43 2006
@@ -21,7 +21,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.geronimo.deployment.PluginBootstrap2;
 import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
 import org.apache.geronimo.system.repository.Maven2Repository;
 
@@ -179,13 +178,6 @@
      */
     private String classpathPrefix = null;
 
-    /**
-     * True to enable the bootshell when packaging.
-     *
-     * @parameter
-     */
-    private boolean bootstrap = false;
-
     //
     // Mojo
     //
@@ -211,12 +203,7 @@
 
         generateExplicitVersionProperties(explicitResolutionProperties);
         
-        if (bootstrap) {
-            executeBootShell();
-        }
-        else {
-            executePackageBuilderShell();
-        }
+        executePackageBuilderShell();
 
         // Build the archive
         File archive = createArchive();
@@ -237,22 +224,6 @@
             dir = new File(dir, project.getArtifactId() + "-" + project.getVersion() + ".car");
 
         return dir;
-    }
-
-    public void executeBootShell() throws Exception {
-        log.debug("Starting bootstrap shell...");
-
-        PluginBootstrap2 boot = new PluginBootstrap2();
-
-        boot.setBuildDir(outputDirectory);
-        boot.setCarFile(getArtifactInRepositoryDir());
-        boot.setLocalRepo(repository);
-        boot.setPlan(planFile);
-
-        // Generate expanded so we can use Maven to generate the archive
-        boot.setExpanded(true);
-
-        boot.bootstrap();
     }
 
     public void executePackageBuilderShell() throws Exception {

Modified: geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java?rev=434144&r1=432624&r2=434144&view=diff
==============================================================================
--- geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java
(original)
+++ geronimo/sandbox/car-maven-plugin/src/main/java/org/apache/geronimo/plugin/car/PlanProcessorMojo.java
Wed Aug 23 12:56:43 2006
@@ -61,7 +61,7 @@
 {
     private static final String ENVIRONMENT_LOCAL_NAME = "environment";
 
-    private static final QName ENVIRONMENT_QNAME = new QName("http://geronimo.apache.org/xml/ns/deployment-1.2",
"environment");
+    private static final QName ENVIRONMENT_QNAME = new QName("http://geronimo.apache.org/xml/ns/deployment-1.1",
ENVIRONMENT_LOCAL_NAME);
 
     /**
      * @parameter expression="${basedir}/src/plan"
@@ -86,7 +86,13 @@
      * @required
      */
     private File targetFile;
-
+    
+    /**
+     * @parameter expression="1.2"
+     * @required     
+     */    
+    private String geronimoVersion;
+    
     private VelocityContext createContext() {
         VelocityContext context = new VelocityContext();
 
@@ -157,7 +163,7 @@
         xmlCursor.toFirstChild();
         QName childName = xmlCursor.getName();
         Environment oldEnvironment;
-
+        
         if (childName != null && childName.getLocalPart().equals(ENVIRONMENT_LOCAL_NAME))
{
             convertElement(xmlCursor, ENVIRONMENT_QNAME.getNamespaceURI());
             XmlObject xmlObject = xmlCursor.getObject();



Mime
View raw message