[jboss-cvs] JBossAS SVN: r66270 - trunk/server/src/main/org/jboss/deployment.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 19 02:34:49 EDT 2007
Author: scott.stark at jboss.org
Date: 2007-10-19 02:34:49 -0400 (Fri, 19 Oct 2007)
New Revision: 66270
Modified:
trunk/server/src/main/org/jboss/deployment/EARContentsDeployer.java
trunk/server/src/main/org/jboss/deployment/EARStructure.java
Log:
Handle ears without descriptors
Modified: trunk/server/src/main/org/jboss/deployment/EARContentsDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/EARContentsDeployer.java 2007-10-19 05:22:42 UTC (rev 66269)
+++ trunk/server/src/main/org/jboss/deployment/EARContentsDeployer.java 2007-10-19 06:34:49 UTC (rev 66270)
@@ -70,7 +70,7 @@
{
setStage(DeploymentStages.PARSE);
setRelativeOrder(appParsingOrder+1);
- setOutput(JBoss50AppMetaData.class);
+ setOutput(JBossAppMetaData.class);
}
public boolean isRequiresEarSuffix()
@@ -138,7 +138,7 @@
{
try
{
- JBoss50AppMetaData j2eeMetaData = new JBoss50AppMetaData();
+ JBossAppMetaData j2eeMetaData = new JBoss50AppMetaData();
// TODO: need to scan for annotationss
scanEar(unit, file, j2eeMetaData);
@@ -170,7 +170,7 @@
discovered above using one of the JAR file reference mechanisms such as the
Class-Path header in a manifest file.
*/
- private void scanEar(VFSDeploymentUnit unit, VirtualFile root, JBoss50AppMetaData j2eeMetaData)
+ private void scanEar(VFSDeploymentUnit unit, VirtualFile root, JBossAppMetaData j2eeMetaData)
throws IOException
{
List<VirtualFile> archives = root.getChildren();
@@ -178,6 +178,11 @@
{
String earPath = root.getPathName();
ModulesMetaData modules = j2eeMetaData.getModules();
+ if (modules == null)
+ {
+ modules = new ModulesMetaData();
+ j2eeMetaData.setModules(modules);
+ }
for (VirtualFile vfArchive : archives)
{
String filename = earRelativePath(earPath, vfArchive.getPathName());
Modified: trunk/server/src/main/org/jboss/deployment/EARStructure.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/EARStructure.java 2007-10-19 05:22:42 UTC (rev 66269)
+++ trunk/server/src/main/org/jboss/deployment/EARStructure.java 2007-10-19 06:34:49 UTC (rev 66270)
@@ -170,7 +170,13 @@
in.close();
}
}
-
+ // Need a metadata instance and there will not be one if there are no descriptors
+ if (appMetaData == null)
+ {
+ appMetaData = new JBossAppMetaData();
+ specMetaData = new EarMetaData();
+ appMetaData.setOverridenMetaData(specMetaData);
+ }
// Add the ear lib contents to the classpath
String libDir = appMetaData.getLibraryDirectory() == null ? "lib" : appMetaData.getLibraryDirectory();
try
@@ -277,6 +283,11 @@
{
String earPath = root.getPathName();
ModulesMetaData modules = appMetaData.getModules();
+ if (modules == null)
+ {
+ modules = new ModulesMetaData();
+ appMetaData.setModules(modules);
+ }
for (VirtualFile vfArchive : archives)
{
String filename = earRelativePath(earPath, vfArchive.getPathName());
More information about the jboss-cvs-commits
mailing list