[jboss-cvs] JBossAS SVN: r101510 - projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 25 23:05:57 EST 2010
Author: johnbailey
Date: 2010-02-25 23:05:56 -0500 (Thu, 25 Feb 2010)
New Revision: 101510
Modified:
projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java
Log:
[JBDEPLOY-242] - Update to DeclaredStructure to properly mount archives before checking for jboss-structure.xml
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java 2010-02-26 04:05:28 UTC (rev 101509)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java 2010-02-26 04:05:56 UTC (rev 101510)
@@ -23,9 +23,11 @@
import java.io.IOException;
import java.net.URL;
+import java.util.Set;
import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer;
+import org.jboss.deployers.vfs.plugins.structure.jar.JARStructure;
import org.jboss.deployers.vfs.spi.structure.StructureContext;
import org.jboss.vfs.VirtualFile;
import org.jboss.xb.binding.Unmarshaller;
@@ -38,17 +40,40 @@
* @author Scott.Stark at jboss.org
* @version $Revision: 1.1 $
*/
-public class DeclaredStructure extends AbstractVFSStructureDeployer
+public class DeclaredStructure extends AbstractVFSArchiveStructureDeployer
{
/**
- * Set the relative order to 0 by default.
+ * Set of suffixes used to determine if an archive mount is needed
*/
+ private final Set<String> suffixes;
+
+ /**
+ * Construct with a default jar suffixes
+ */
public DeclaredStructure()
{
+ this(JARStructure.DEFAULT_JAR_SUFFIXES);
+ }
+
+ /**
+ * Set the relative order to 0 by default.
+ */
+ public DeclaredStructure(Set<String> suffixes)
+ {
setRelativeOrder(0);
+ this.suffixes = suffixes;
}
+
+ @Override
+ protected boolean hasValidSuffix(String name)
+ {
+ int idx = name.lastIndexOf('.');
+ if (idx == -1)
+ return false;
+ return suffixes.contains(name.substring(idx).toLowerCase());
+ }
- public boolean determineStructure(StructureContext structureContext) throws DeploymentException
+ public boolean doDetermineStructure(StructureContext structureContext) throws DeploymentException
{
VirtualFile file = structureContext.getFile();
try
More information about the jboss-cvs-commits
mailing list