geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r470169 - in /geronimo/server/trunk: configs/online-deployer/ maven-plugins/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/
Date Thu, 02 Nov 2006 01:29:39 GMT
Author: sppatel
Date: Wed Nov  1 17:29:39 2006
New Revision: 470169

URL: http://svn.apache.org/viewvc?view=rev&rev=470169
Log:
allow additonal cp entries to be added to manifest, need to add server.jar to online deployer
to be able to load j2ee-system during offline deployment

Modified:
    geronimo/server/trunk/configs/online-deployer/pom.xml
    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/PackageMojo.java

Modified: geronimo/server/trunk/configs/online-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/online-deployer/pom.xml?view=diff&rev=470169&r1=470168&r2=470169
==============================================================================
--- geronimo/server/trunk/configs/online-deployer/pom.xml (original)
+++ geronimo/server/trunk/configs/online-deployer/pom.xml Wed Nov  1 17:29:39 2006
@@ -137,6 +137,9 @@
                             <artifactId>xmlParserAPIs</artifactId>
                             <classpathPrefix>../lib/endorsed</classpathPrefix>
                         </element>
+                        <element>
+                            <entry>server.jar</entry>
+                        </element>
                     </classpath>
                     <classpathPrefix>../lib</classpathPrefix>
                 </configuration>

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=470169&r1=470168&r2=470169
==============================================================================
--- 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
Wed Nov  1 17:29:39 2006
@@ -22,7 +22,7 @@
 import org.apache.geronimo.genesis.util.ArtifactItem;
 
 /**
- * Represents a Maven-artifact with additional classparh prefix details to build a
+ * Represents a Maven-artifact with additional classpath prefix details to build a
  * jar's Manifest Class-Path.
  *
  * @version $Rev:385659 $ $Date$
@@ -36,6 +36,13 @@
      * @parameter
      */
     private String classpathPrefix;
+    
+    /**
+     * @parameter
+     * 
+     * Entry name used in replacement for ArtifactItem that is not resolved
+     */
+    private String entry;
 
     /**
      * @return Returns the classpath prefix.
@@ -50,4 +57,12 @@
     public void setClasspathPrefix(final String classpathPrefix) {
         this.classpathPrefix = classpathPrefix;
     }
+
+	public String getEntry() {
+		return entry;
+	}
+
+	public void setEntry(String entry) {
+		this.entry = entry;
+	}
 }

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=470169&r1=470168&r2=470169
==============================================================================
--- 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
Wed Nov  1 17:29:39 2006
@@ -21,46 +21,42 @@
 
 import java.io.File;
 import java.net.URI;
-
-import java.util.List;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.HashSet;
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.geronimo.deployment.PluginBootstrap2;
-import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
-import org.apache.geronimo.system.repository.Maven2Repository;
-import org.apache.geronimo.system.resolver.ExplicitDefaultArtifactResolver;
+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.kernel.Kernel;
-import org.apache.geronimo.kernel.KernelRegistry;
 import org.apache.geronimo.kernel.KernelFactory;
+import org.apache.geronimo.kernel.KernelRegistry;
 import org.apache.geronimo.kernel.Naming;
-import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
-import org.apache.geronimo.kernel.log.GeronimoLogging;
-import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
-import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.KernelConfigurationManager;
-import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.ReferencePatterns;
-import org.apache.geronimo.gbean.AbstractNameQuery;
-
-import org.apache.geronimo.genesis.util.ArtifactItem;
-
+import org.apache.geronimo.kernel.log.GeronimoLogging;
+import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
+import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
+import org.apache.geronimo.system.repository.Maven2Repository;
+import org.apache.geronimo.system.resolver.ExplicitDefaultArtifactResolver;
 import org.apache.maven.archiver.MavenArchiveConfiguration;
 import org.apache.maven.archiver.MavenArchiver;
-import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
-
-import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.archiver.jar.JarArchiver;
+import org.codehaus.plexus.util.FileUtils;
 
 /**
  * Build a Geronimo Configuration using the local Maven infrastructure.
@@ -352,27 +348,33 @@
         StringBuffer buff = new StringBuffer();
 
         for (int i=0; i < classpath.length; i++) {
-            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(" ");



Mime
View raw message