geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r524717 - in /geronimo/server/trunk/maven-plugins: ./ car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ geronimo-maven-plugin/src/main/java/or...
Date Mon, 02 Apr 2007 03:39:22 GMT
Author: jdillon
Date: Sun Apr  1 20:39:19 2007
New Revision: 524717

URL: http://svn.apache.org/viewvc?view=rev&rev=524717
Log:
Replace genesis plugin-support with mojo plugin-support
*FIX SOME EVIL INDENT TOO*

Modified:
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/AbstractCarMojo.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ClasspathElement.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ImportConfig.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallArtifactsMojo.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Maven2RepositoryAdapter.java
    geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/AssemblyConfig.java
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/GeronimoMojoSupport.java
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ModuleConfig.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/server/StartServerMojo.java
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/WaitForServerMojo.java
    geronimo/server/trunk/maven-plugins/pom.xml
    geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/pom.xml
    geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/ResultsSummaryMojo.java
    geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/SurefireXMLGeneratorMojo.java

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/AbstractCarMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/AbstractCarMojo.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/AbstractCarMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/AbstractCarMojo.java
Sun Apr  1 20:39:19 2007
@@ -28,11 +28,11 @@
 import java.util.Properties;
 import java.util.Map;
 
-import org.apache.geronimo.genesis.MojoSupport;
-import org.apache.geronimo.genesis.util.ArtifactItem;
-import org.apache.geronimo.genesis.dependency.DependencyHelper;
-import org.apache.geronimo.genesis.dependency.DependencyTree;
-import org.apache.geronimo.genesis.dependency.DependencyTree.Node;
+import org.codehaus.mojo.pluginsupport.MojoSupport;
+import org.codehaus.mojo.pluginsupport.util.ArtifactItem;
+import org.codehaus.mojo.pluginsupport.dependency.DependencyHelper;
+import org.codehaus.mojo.pluginsupport.dependency.DependencyTree;
+import org.codehaus.mojo.pluginsupport.dependency.DependencyTree.Node;
 
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ClasspathElement.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ClasspathElement.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ClasspathElement.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ClasspathElement.java
Sun Apr  1 20:39:19 2007
@@ -19,7 +19,7 @@
 
 package org.apache.geronimo.mavenplugins.car;
 
-import org.apache.geronimo.genesis.util.ArtifactItem;
+import org.codehaus.mojo.pluginsupport.util.ArtifactItem;
 
 /**
  * Represents a Maven-artifact with additional classpath prefix details to build a
@@ -58,11 +58,11 @@
         this.classpathPrefix = classpathPrefix;
     }
 
-	public String getEntry() {
-		return entry;
-	}
+    public String getEntry() {
+        return entry;
+    }
 
-	public void setEntry(String entry) {
-		this.entry = entry;
-	}
+    public void setEntry(final String entry) {
+        this.entry = entry;
+    }
 }

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ImportConfig.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ImportConfig.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ImportConfig.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ImportConfig.java
Sun Apr  1 20:39:19 2007
@@ -19,7 +19,7 @@
 
 package org.apache.geronimo.mavenplugins.car;
 
-import org.apache.geronimo.genesis.util.ArtifactItem;
+import org.codehaus.mojo.pluginsupport.util.ArtifactItem;
 
 /**
  * ???

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallArtifactsMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallArtifactsMojo.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallArtifactsMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallArtifactsMojo.java
Sun Apr  1 20:39:19 2007
@@ -22,7 +22,7 @@
 import org.apache.geronimo.kernel.repository.WriteableRepository;
 import org.apache.geronimo.system.repository.Maven2Repository;
 
-import org.apache.geronimo.genesis.util.ArtifactItem;
+import org.codehaus.mojo.pluginsupport.util.ArtifactItem;
 
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.artifact.Artifact;

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/InstallModulesMojo.java
Sun Apr  1 20:39:19 2007
@@ -34,7 +34,8 @@
 import org.apache.geronimo.system.repository.Maven2Repository;
 import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
 import org.apache.geronimo.system.resolver.ExplicitDefaultArtifactResolver;
-import org.apache.geronimo.genesis.dependency.DependencyTree;
+
+import org.codehaus.mojo.pluginsupport.dependency.DependencyTree;
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
 
@@ -65,7 +66,8 @@
  * @goal install-modules
  */
 public class InstallModulesMojo
-        extends AbstractCarMojo {
+    extends AbstractCarMojo
+{
     /**
      * The location of the target repository.
      *
@@ -132,7 +134,7 @@
 
         Maven2RepositoryAdapter.ArtifactLookup lookup = new ArtifactLookupImpl(new HashMap());
         sourceRepo = new Maven2RepositoryAdapter(dependencies, lookup);
-//        sourceRepo = new Maven2RepositoryAdapter(new File(sourceRepository.getBasedir()));
+        // sourceRepo = new Maven2RepositoryAdapter(new File(sourceRepository.getBasedir()));
         sourceStore = new RepositoryConfigurationStore(sourceRepo);
 
         FileUtils.forceMkdir(targetRepositoryDirectory);

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Maven2RepositoryAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Maven2RepositoryAdapter.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Maven2RepositoryAdapter.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/Maven2RepositoryAdapter.java
Sun Apr  1 20:39:19 2007
@@ -29,7 +29,8 @@
 import org.apache.geronimo.kernel.repository.Version;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.genesis.dependency.DependencyTree;
+
+import org.codehaus.mojo.pluginsupport.dependency.DependencyTree;
 
 /**
  * Helps adapt Geronimo repositories to Maven repositories for packaging building.

Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/PackageMojo.java
Sun Apr  1 20:39:19 2007
@@ -29,14 +29,15 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.codehaus.mojo.pluginsupport.util.ArtifactItem;
+import org.codehaus.mojo.pluginsupport.dependency.DependencyTree;
+
 import org.apache.geronimo.deployment.PluginBootstrap2;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.ReferencePatterns;
-import org.apache.geronimo.genesis.util.ArtifactItem;
-import org.apache.geronimo.genesis.dependency.DependencyTree;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.KernelRegistry;
@@ -389,33 +390,32 @@
         StringBuffer buff = new StringBuffer();
 
         for (int i=0; i < classpath.length; i++) {
-        	
-        	String entry = classpath[i].getEntry();
-        	if(entry != null) {
-        		buff.append(entry);
-        	} else {
-        		Artifact artifact = getArtifact(classpath[i]);
-
-        		//
-        		// TODO: Need to optionally get all transitive dependencies... but dunno how to
get that intel from m2
-        		//
-
-        		String prefix = classpath[i].getClasspathPrefix();
-        		if (prefix == null) {
-        			prefix = classpathPrefix;
-        		}
-
-        		if (prefix != null) {
-        			buff.append(prefix);
-
-        			if (!prefix.endsWith("/")) {
-        				buff.append("/");
-        			}
-        		}
-
-        		File file = artifact.getFile();
-        		buff.append(file.getName());
-        	}
+            String entry = classpath[i].getEntry();
+            if (entry != null) {
+                buff.append(entry);
+            } else {
+                Artifact artifact = getArtifact(classpath[i]);
+
+                //
+                // TODO: Need to optionally get all transitive dependencies... but dunno
how to get that intel from m2
+                //
+
+                String prefix = classpath[i].getClasspathPrefix();
+                if (prefix == null) {
+                    prefix = classpathPrefix;
+                }
+
+                if (prefix != null) {
+                    buff.append(prefix);
+
+                    if (!prefix.endsWith("/")) {
+                        buff.append("/");
+                    }
+                }
+
+                File file = artifact.getFile();
+                buff.append(file.getName());
+            }
 
             if (i + 1< classpath.length) {
                 buff.append(" ");
@@ -437,15 +437,15 @@
      * Reference to the kernel that will last the lifetime of this classloader.
      * The KernelRegistry keeps soft references that may be garbage collected.
      */
-    private  Kernel kernel;
+    private Kernel kernel;
 
-    private  AbstractName targetConfigStoreAName;
+    private AbstractName targetConfigStoreAName;
 
-    private  AbstractName targetRepositoryAName;
+    private AbstractName targetRepositoryAName;
 
     private boolean targetSet;
 
-    private  DependencyTree dependencies = new DependencyTree();
+    private DependencyTree dependencies = new DependencyTree();
 
     public void buildPackage() throws Exception {
         log.info("Packaging module configuration: " + planFile);
@@ -675,6 +675,5 @@
     /**
      * Map of G artifact to M artifact which have already been resolved.
      */
-//    private static Map presolvedArtifacts = new HashMap();
-
+    // private static Map presolvedArtifacts = new HashMap();
 }

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/AssemblyConfig.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/AssemblyConfig.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/AssemblyConfig.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/AssemblyConfig.java
Sun Apr  1 20:39:19 2007
@@ -19,7 +19,7 @@
 
 package org.apache.geronimo.mavenplugins.geronimo;
 
-import org.apache.geronimo.genesis.util.ArtifactItem;
+import org.codehaus.mojo.pluginsupport.util.ArtifactItem;
 
 /**
  * Assembly artifact configuration.

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/GeronimoMojoSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/GeronimoMojoSupport.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/GeronimoMojoSupport.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/GeronimoMojoSupport.java
Sun Apr  1 20:39:19 2007
@@ -22,7 +22,7 @@
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 
-import org.apache.geronimo.genesis.ant.AntMojoSupport;
+import org.codehaus.mojo.pluginsupport.ant.AntMojoSupport;
 
 /**
  * Support for Geronimo mojos.

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ModuleConfig.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ModuleConfig.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ModuleConfig.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/ModuleConfig.java
Sun Apr  1 20:39:19 2007
@@ -20,7 +20,7 @@
 package org.apache.geronimo.mavenplugins.geronimo;
 
 import java.io.File;
-import org.apache.geronimo.genesis.util.ArtifactItem;
+import org.codehaus.mojo.pluginsupport.util.ArtifactItem;
 
 /**
  * Module artifact configuration.
@@ -46,5 +46,4 @@
     public File getPlan() {
         return plan;
     }
-
 }

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=524717&r1=524716&r2=524717
==============================================================================
--- 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
Sun Apr  1 20:39:19 2007
@@ -37,7 +37,7 @@
 import org.apache.geronimo.mavenplugins.geronimo.ModuleConfig;
 import org.apache.geronimo.mavenplugins.geronimo.reporting.ReportingMojoSupport;
 
-import org.apache.geronimo.genesis.util.ArtifactItem;
+import org.codehaus.mojo.pluginsupport.util.ArtifactItem;
 
 import org.apache.maven.plugin.MojoExecutionException;
 
@@ -64,7 +64,6 @@
      */
     private DeploymentManager deploymentManager;
 
-
     /**
      * Whether to stop or proceed when errors and failures are encountered
      *
@@ -72,7 +71,6 @@
      */
     protected boolean stopOnFailure = false;
 
-
     /**
      * Get a deployment manager; if the manager was previosuly initialized then that cached
instance is used.
      *
@@ -240,34 +238,34 @@
         assert modules != null;
 
         for (int i=0; i<modules.length; i++) {
-           String moduleId = getModuleId(modules[i]);
-        
-           if (isModuleStarted(moduleId)) {
-               log.warn("Module is already started: " + moduleId);
-               continue;
-               //throw new MojoExecutionException("Module is already started: " + moduleId);
-           }
-
-           DeploymentManager manager = getDeploymentManager();
-           Target[] targets = manager.getTargets();
-           TargetModuleID[] targetIds = manager.getNonRunningModules(null, targets);
-
-           TargetModuleID[] found = findModules(moduleId, targetIds);
-
-           if (found.length == 0) {
-               throw new MojoExecutionException("Module is not deployed: " + moduleId);
-           }
+            String moduleId = getModuleId(modules[i]);
+            
+            if (isModuleStarted(moduleId)) {
+                log.warn("Module is already started: " + moduleId);
+                continue;
+                //throw new MojoExecutionException("Module is already started: " + moduleId);
+            }
+            
+            DeploymentManager manager = getDeploymentManager();
+            Target[] targets = manager.getTargets();
+            TargetModuleID[] targetIds = manager.getNonRunningModules(null, targets);
 
-           log.info("Starting module: " + moduleId);
-           ProgressObject progress = manager.start(found);
+            TargetModuleID[] found = findModules(moduleId, targetIds);
 
-           DeploymentStatus status = waitFor(progress);
-           if (status.isFailed()) {
-               throw new MojoExecutionException("Failed to start module: " + moduleId);
-           }
+            if (found.length == 0) {
+                throw new MojoExecutionException("Module is not deployed: " + moduleId);
+            }
 
-           log.info("Started module(s):");
-           logModules(found, "    ");
+            log.info("Starting module: " + moduleId);
+            ProgressObject progress = manager.start(found);
+            
+            DeploymentStatus status = waitFor(progress);
+            if (status.isFailed()) {
+                throw new MojoExecutionException("Failed to start module: " + moduleId);
+            }
+            
+            log.info("Started module(s):");
+            logModules(found, "    ");
         }
     }
 
@@ -278,7 +276,7 @@
         Target[] targets = manager.getTargets();
         TargetModuleID[] targetIds = manager.getRunningModules(null, targets);
 
-         for (int i=0; i<modules.length; i++) {
+        for (int i=0; i<modules.length; i++) {
            String moduleId = getModuleId(modules[i]);
            if (!isModuleStarted(moduleId)) {
                log.info("Module is already stopped: " + moduleId);
@@ -302,7 +300,7 @@
 
            log.info("Stopped module(s):");
            logModules(found, "    ");
-         }
+        }
     }
 
     protected void undeployModule() throws Exception {
@@ -356,5 +354,4 @@
             }
         }
     }
-
 }

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
Sun Apr  1 20:39:19 2007
@@ -35,7 +35,8 @@
 
 import org.apache.tools.ant.taskdefs.Java;
 
-import org.apache.geronimo.genesis.util.ObjectHolder;
+import org.codehaus.mojo.pluginsupport.util.ObjectHolder;
+
 import org.apache.geronimo.mavenplugins.geronimo.ServerProxy;
 
 import org.codehaus.plexus.util.FileUtils;

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/WaitForServerMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/WaitForServerMojo.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/WaitForServerMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/WaitForServerMojo.java
Sun Apr  1 20:39:19 2007
@@ -20,7 +20,8 @@
 
 import org.apache.maven.plugin.MojoExecutionException;
 
-import org.apache.geronimo.genesis.util.ObjectHolder;
+import org.codehaus.mojo.pluginsupport.util.ObjectHolder;
+
 import org.apache.geronimo.mavenplugins.geronimo.ServerProxy;
 import org.apache.geronimo.mavenplugins.geronimo.reporting.ReportingMojoSupport;
 

Modified: geronimo/server/trunk/maven-plugins/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/pom.xml?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/pom.xml (original)
+++ geronimo/server/trunk/maven-plugins/pom.xml Sun Apr  1 20:39:19 2007
@@ -37,7 +37,6 @@
     <packaging>pom</packaging>
     
     <dependencies>
-        
         <dependency>
             <groupId>org.apache.geronimo.testsupport</groupId>
             <artifactId>testsupport-common</artifactId>
@@ -46,22 +45,20 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.genesis.plugins</groupId>
+            <groupId>org.codehaus.mojo</groupId>
             <artifactId>plugin-support</artifactId>
+            <version>1.0-alpha-1</version>
         </dependency>
-        
     </dependencies>
     
     <build>
         <pluginManagement>
             <plugins>
-                
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-plugin-plugin</artifactId>
                     <version>2.2</version>
                 </plugin>
-                
             </plugins>
         </pluginManagement>
     </build>

Modified: geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/pom.xml?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/pom.xml (original)
+++ geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/pom.xml Sun Apr  1 20:39:19
2007
@@ -38,10 +38,6 @@
     
     <dependencies>
         <dependency>
-            <groupId>org.apache.geronimo.genesis.plugins</groupId>
-            <artifactId>plugin-support</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.maven</groupId>
             <artifactId>maven-settings</artifactId>
             <version>2.0.4</version>

Modified: geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/ResultsSummaryMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/ResultsSummaryMojo.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/ResultsSummaryMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/ResultsSummaryMojo.java
Sun Apr  1 20:39:19 2007
@@ -43,11 +43,10 @@
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.dom.DOMSource; 
-import javax.xml.transform.stream.StreamResult; 
+import javax.xml.transform.stream.StreamResult;
 
-
-import org.apache.geronimo.genesis.MojoSupport;
-import org.apache.geronimo.genesis.ant.AntHelper;
+import org.codehaus.mojo.pluginsupport.MojoSupport;
+import org.codehaus.mojo.pluginsupport.ant.AntHelper;
 
 import org.apache.maven.model.DistributionManagement;
 import org.apache.maven.project.MavenProject;
@@ -73,7 +72,7 @@
  * @version $Rev$ $Date$
  */
 public class ResultsSummaryMojo
-extends MojoSupport
+    extends MojoSupport
 {
     /**
      * @component
@@ -118,7 +117,6 @@
      */
     private String password;
 
-
     /**
      * The passphrase
      * 
@@ -147,7 +145,6 @@
      */
     private int numberShown;
 
-
     private NumberFormat numberFormat = NumberFormat.getInstance();
 
     private static final int PCENT = 100;
@@ -170,7 +167,6 @@
 
         scp = (Scp)ant.createTask("scp");
 
-
         String siteId = project.getDistributionManagement().getSite().getId();
         server = settings.getServer(siteId);
 
@@ -182,25 +178,25 @@
     }
 
     private String getKeyFile() {
-       if (keyFile != null) {
-           return keyFile;
-       }
-       else if (server != null && server.getPrivateKey() != null) {
-           return server.getPrivateKey();
-       }
-
-       return "/home/" + getUsername() + "/.ssh/id_dsa";
+        if (keyFile != null) {
+            return keyFile;
+        }
+        else if (server != null && server.getPrivateKey() != null) {
+            return server.getPrivateKey();
+        }
+        
+        return "/home/" + getUsername() + "/.ssh/id_dsa";
     }
 
     private String getUsername() {
-       if (username != null) {
-           return username;
-       }
-       else if (server != null && server.getUsername() != null) {
-           return server.getUsername();
-       }
-
-       return System.getProperty("user.name");
+        if (username != null) {
+            return username;
+        }
+        else if (server != null && server.getUsername() != null) {
+            return server.getUsername();
+        }
+        
+        return System.getProperty("user.name");
     }
 
     private String getPassword() {
@@ -225,35 +221,28 @@
         return " ";
     }
 
-
-
     /**
      * called by execute from super
      */
     protected void doExecute() throws Exception {
-
         if (buildNumber == null) {
             log.warn("No build number specified; returning");
             return;
         }
 
         File currentSiteDirectory = new File(targetDirectory, "/site");
-        if ( !currentSiteDirectory.exists() )
-        {
+        if (!currentSiteDirectory.exists()) {
             log.warn("No site directory here; returning");
             return;
         }
 
-
         // Download ResultsSummary.html and parse it.
         File resultsFile = null;
-        try
-        {
+        try {
             downloadHTML();
             resultsFile = new File(targetDirectory, resultsFileName);            
         }
-        catch ( Exception e )
-        {
+        catch (Exception e) {
             log.warn("Download failed. " + e.getMessage());
         }
 
@@ -261,10 +250,7 @@
         tidy.setQuiet(true);
         tidy.setShowWarnings(false);
 
-
-
-        if ( resultsFile == null || !resultsFile.exists() )
-        {
+        if ( resultsFile == null || !resultsFile.exists() ) {
             log.info( resultsFileName + " could not be downloaded. Using the template to
create anew");
             resultsFile = new File(project.getBasedir(), "src/main/resources/" + resultsFileName);
         }
@@ -274,30 +260,25 @@
         is.close();
 
         File reportsDir = new File(targetDirectory, "surefire-reports");
-        if ( !reportsDir.exists() )
-        {
+        if ( !reportsDir.exists() ) {
             log.warn("No surefire-reports directory here");
             return;
         }
 
         ArrayList files = (ArrayList) FileUtils.getFiles(reportsDir, "TEST-*.xml", null,
true);
-        if ( files.size() > 0 )
-        {
+        if ( files.size() > 0 ) {
             document = insertNewColumn(document);
-            if ( document == null )
-            {
+            if ( document == null ) {
                 throw new MojoFailureException("Main table cannot be found in the " + resultsFileName
+ ". The file may be corrupted");
             }
         }
 
-        for ( Iterator itr=files.iterator(); itr.hasNext(); )
-        {
+        for ( Iterator itr=files.iterator(); itr.hasNext(); ) {
             File file = (File) itr.next();
             log.debug("working on " + file.getAbsolutePath() );
             document = processFile(document, file);
         }
 
-
         // Use a Transformer for output
         TransformerFactory tFactory = TransformerFactory.newInstance();
         Transformer transformer = tFactory.newTransformer();
@@ -323,19 +304,16 @@
         // delete the temp file.
         tempFile.delete();
 
-        try
-        {
+        try {
             uploadHTML(resultsFile);
         }
-        catch ( Exception e )
-        {
+        catch ( Exception e ) {
             log.warn("Upload failed. " + e.getMessage());
         }
     }
 
 
-    private String getRemoteUri()
-    {
+    private String getRemoteUri() {
         String siteUri = project.getDistributionManagement().getSite().getUrl();
 
         // chop off the protocol
@@ -433,7 +411,6 @@
         return document;
     }
 
-
     private Document processFile(Document document, File file)
     {
         String pcent = getResultsFromFile(file);
@@ -447,7 +424,6 @@
         return document;
     }
 
-
     /**
      * Load the surefire-report xml file as an ANT xml property and get the values of the
results
      * compute percentage
@@ -473,7 +449,6 @@
         return pcent;
     }
 
-
     /**
      * http://ant.apache.org/manual/CoreTasks/xmlproperty.html
      */
@@ -490,7 +465,6 @@
         log.debug("Loaded xml file as ant property with prefix " + prefix);
     }
 
-
     /**
      * compute percentage
      */
@@ -509,8 +483,6 @@
         return numberFormat.format( percentage );
     }
 
-
-
     /**
      * Insert the rest of the column. If there is no matching row for the suite name, create
a new row.
      */
@@ -568,10 +540,8 @@
         log.debug("inserted column");
 
         return document;
-
     }
 
-
     /**
      * Get a child element identified by an ID
      */
@@ -600,7 +570,6 @@
         return foundElement;
     }
 
-
     /**
      * Removes the oldest test column(s) from the table based on the value set in 'numberShown'
variable
      */
@@ -634,5 +603,4 @@
 
         return new_cols;
     }
-
 }

Modified: geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/SurefireXMLGeneratorMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/SurefireXMLGeneratorMojo.java?view=diff&rev=524717&r1=524716&r2=524717
==============================================================================
--- geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/SurefireXMLGeneratorMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/testsuite-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/testsuite/SurefireXMLGeneratorMojo.java
Sun Apr  1 20:39:19 2007
@@ -24,8 +24,8 @@
 
 import java.util.ArrayList;
 
-import org.apache.geronimo.genesis.MojoSupport;
-import org.apache.geronimo.genesis.ant.AntHelper;
+import org.codehaus.mojo.pluginsupport.MojoSupport;
+import org.codehaus.mojo.pluginsupport.ant.AntHelper;
 
 import org.apache.maven.project.MavenProject;
 
@@ -45,7 +45,7 @@
  * @version $Rev$ $Date$
  */
 public class SurefireXMLGeneratorMojo
-extends MojoSupport
+    extends MojoSupport
 {
     /**
      * @component
@@ -61,15 +61,15 @@
     private File currentReportsDirectory;
 
     /**
-    * @parameter default-value="${project.basedir}"
-    * @read-only
-    */
+     * @parameter default-value="${project.basedir}"
+     * @read-only
+     */
     private File currentBaseDirectory;
 
     /**
-    * @parameter default-value="${project.parent.basedir}/target"
-    * @read-only
-    */
+     * @parameter default-value="${project.parent.basedir}/target"
+     * @read-only
+     */
     private File parentBuildDirectory;
 
     private File parentReportsDirectory;
@@ -80,8 +80,8 @@
      * Such a parent project whose packaging is set to pom will not transfer the surefire
data to it's parent.
      * So we will directly write to the grandparent's surefire-reports dir.
      * 
-    * @parameter default-value="false"
-    */
+     * @parameter default-value="false"
+     */
     private boolean grandParent;
 
     //
@@ -117,7 +117,6 @@
     }
 
     protected void doExecute() throws Exception {
-
         if ( !currentReportsDirectory.exists() )
         {
             log.info("No surefire-reports directory here");
@@ -185,8 +184,6 @@
         }
     }
 
-
-
     /**
      * http://ant.apache.org/manual/CoreTasks/xmlproperty.html
      */
@@ -202,7 +199,6 @@
         xmlProperty.execute();
     }
 
-
     /**
      * (over)writes the surefire xml file in the parent's surefire-reports dir
      */
@@ -221,5 +217,4 @@
 
         return;
     }
-
 }



Mime
View raw message