geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r512761 - /geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Date Wed, 28 Feb 2007 14:12:21 GMT
Author: sppatel
Date: Wed Feb 28 06:12:21 2007
New Revision: 512761

URL: http://svn.apache.org/viewvc?view=rev&rev=512761
Log:
if no dd and manifest contains main-class then consider it an appclient

Modified:
    geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?view=diff&rev=512761&r1=512760&r2=512761
==============================================================================
--- geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Wed Feb 28 06:12:21 2007
@@ -33,8 +33,10 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.jar.Attributes;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
+import java.util.jar.Manifest;
 import java.util.zip.ZipEntry;
 
 import javax.xml.namespace.QName;
@@ -760,7 +762,8 @@
                         } else if (entry.getName().endsWith(".jar") && !isLibraryEntry(application,
entry)) {
                             try {
                                 NestedJarFile moduleFile = new NestedJarFile(earFile, entry.getName());
-                                if (moduleFile.getEntry("META-INF/application-client.xml")
!= null) {
+                                Manifest manifest = moduleFile.getManifest();
+                                if (moduleFile.getEntry("META-INF/application-client.xml")
!= null || (manifest != null && manifest.getMainAttributes().getValue(Attributes.Name.MAIN_CLASS)
!= null)) {
                                     if (getAppClientConfigBuilder() == null) {
                                         throw new DeploymentException("Cannot deploy app
client; No app client deployer defined: " + entry.getName());
                                     }



Mime
View raw message