geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pra...@apache.org
Subject svn commit: r471806 - in /geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module: DeployModuleMojo.java ModuleMojoSupport.java StartStopUndeployMojoSupport.java
Date Mon, 06 Nov 2006 18:13:56 GMT
Author: prasad
Date: Mon Nov  6 10:13:55 2006
New Revision: 471806

URL: http://svn.apache.org/viewvc?view=rev&rev=471806
Log:
GERONIMO-2513
Allow deployment of just a plan.xml only.

Modified:
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/ModuleMojoSupport.java
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/StartStopUndeployMojoSupport.java

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java?view=diff&rev=471806&r1=471805&r2=471806
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/DeployModuleMojo.java
Mon Nov  6 10:13:55 2006
@@ -76,8 +76,9 @@
     protected void doExecute() throws Exception {
         List completed = new ArrayList();
 
-        if (moduleArchive != null) {
+        if (moduleArchive != null || modulePlan != null) {
             log.info("Using non-artifact based module archive: " + moduleArchive);
+            log.info("Using non-artifact based plan: " + modulePlan);
 
             TargetModuleID[] ids = distribute(moduleArchive, modulePlan);
             completed.add(ids);
@@ -142,9 +143,9 @@
     }
 
     private TargetModuleID[] distribute(final File file, final File plan) throws Exception
{
-        assert file != null;
+        //assert file != null;
         
-        log.info("Distributing module artifact: " + file);
+        log.info("Distributing module artifact: " + file + " with plan " + plan);
 
         DeploymentManager manager = getDeploymentManager();
         Target[] targets = manager.getTargets();

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/ModuleMojoSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/ModuleMojoSupport.java?view=diff&rev=471806&r1=471805&r2=471806
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/ModuleMojoSupport.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/ModuleMojoSupport.java
Mon Nov  6 10:13:55 2006
@@ -53,10 +53,11 @@
 
     /**
      * List of module artifact configurations.  Artifacts need to point to jar | war | ear
| rar archive.
+     * Module artifact's configurations should match the moduleId specified in the plan,
if plan exists.
      *
      * @parameter
      */
-    protected ModuleConfig[] modules = null;
+    protected ModuleConfig[] modules;
 
     /**
      * Cached deployment manager.

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/StartStopUndeployMojoSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/StartStopUndeployMojoSupport.java?view=diff&rev=471806&r1=471805&r2=471806
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/StartStopUndeployMojoSupport.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/module/StartStopUndeployMojoSupport.java
Mon Nov  6 10:13:55 2006
@@ -20,6 +20,7 @@
 package org.apache.geronimo.mavenplugins.geronimo.module;
 
 import java.util.Arrays;
+import java.util.List;
 import java.util.ArrayList;
 
 import org.apache.geronimo.mavenplugins.geronimo.ModuleConfig;
@@ -52,6 +53,9 @@
             log.info("Using non-artifact based module id: " + moduleId);
 
             // Add the single module to the list
+            //
+            // FIXME Should be able to handle multiple moduleIds
+            //
             ModuleConfig moduleConfig = createModuleConfigFromId(moduleId);
             if (modules == null) {
                 modules = new ModuleConfig[] {
@@ -59,9 +63,10 @@
                 };
             }
             else {
-                ArrayList list = (ArrayList) Arrays.asList(modules);
-                list.add(moduleConfig);
-                modules = (ModuleConfig[]) list.toArray(new ModuleConfig[list.size()]);
+                List list = Arrays.asList(modules);
+                ArrayList aList = new ArrayList(list);
+                aList.add(moduleConfig);
+                modules = (ModuleConfig[]) aList.toArray(new ModuleConfig[list.size()]);
             }
         }
         else if (modules == null || modules.length == 0) {



Mime
View raw message