[jboss-cvs] JBossAS SVN: r62026 - trunk/server/src/main/org/jboss/deployment.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 3 08:16:07 EDT 2007
Author: thomas.diesler at jboss.com
Date: 2007-04-03 08:16:06 -0400 (Tue, 03 Apr 2007)
New Revision: 62026
Modified:
trunk/server/src/main/org/jboss/deployment/EARStructure.java
Log:
Fix duplicate j2eeModule when defined in jboss-app.xml but no application.xml
Modified: trunk/server/src/main/org/jboss/deployment/EARStructure.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/EARStructure.java 2007-04-03 12:15:10 UTC (rev 62025)
+++ trunk/server/src/main/org/jboss/deployment/EARStructure.java 2007-04-03 12:16:06 UTC (rev 62026)
@@ -249,21 +249,22 @@
Class-Path header in a manifest file.
* TODO: rewrite using vfs
*/
- private void scanEar(VirtualFile root, J2eeApplicationMetaData j2eeMetaData)
- throws IOException
+ private void scanEar(VirtualFile root, J2eeApplicationMetaData j2eeMetaData) throws IOException
{
List<VirtualFile> archives = root.getChildren();
- if( archives != null )
+ if (archives != null)
{
String earPath = root.getPathName();
- for(VirtualFile archive : archives)
+ for (VirtualFile vfArchive : archives)
{
- String module = earRelativePath(earPath, archive.getPathName());
- int type = typeFromSuffix(module, archive);
- if( type >= 0 )
+ String filename = earRelativePath(earPath, vfArchive.getPathName());
+ // Check if the module already exists, i.e. it is declared in jboss-app.xml
+ J2eeModuleMetaData moduleMetaData = j2eeMetaData.getModule(filename);
+ int type = typeFromSuffix(filename, vfArchive);
+ if (type >= 0 && moduleMetaData == null)
{
- J2eeModuleMetaData mod = new J2eeModuleMetaData(type, module);
- j2eeMetaData.addModule(mod);
+ moduleMetaData = new J2eeModuleMetaData(type, filename);
+ j2eeMetaData.addModule(moduleMetaData);
}
}
}
More information about the jboss-cvs-commits
mailing list