[jboss-cvs] JBossAS SVN: r104698 - in projects/jboss-deployers/trunk: deployers-vfs/src/test/java/org/jboss/test/deployers and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 11 19:01:05 EDT 2010
Author: alesj
Date: 2010-05-11 19:01:04 -0400 (Tue, 11 May 2010)
New Revision: 104698
Modified:
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BaseDeployersVFSTest.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/support/SearchDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/test/FaceletsUnitTestCase.java
projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java
projects/jboss-deployers/trunk/pom.xml
Log:
Fix VFS url handling.
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BaseDeployersVFSTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BaseDeployersVFSTest.java 2010-05-11 22:08:24 UTC (rev 104697)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BaseDeployersVFSTest.java 2010-05-11 23:01:04 UTC (rev 104698)
@@ -90,17 +90,19 @@
throw new IllegalArgumentException("Null url");
return new URL("jar:" + url + "!/").toString();
}
+
/**
* Get a vfs url string from a path
*
- * @param path
+ * @param path the path
* @return the url
- * @throws Exception
+ * @throws Exception for any error
*/
protected String getVfsURL(String path) throws Exception
{
URL url = getResource(path);
- return url.toString();
+ VirtualFile file = VFS.getChild(url);
+ return file.toURL().toString();
}
/**
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/support/SearchDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/support/SearchDeployer.java 2010-05-11 22:08:24 UTC (rev 104697)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/support/SearchDeployer.java 2010-05-11 23:01:04 UTC (rev 104698)
@@ -21,9 +21,7 @@
*/
package org.jboss.test.deployers.vfs.deployer.facelets.support;
-import java.io.IOException;
import java.net.URL;
-import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
@@ -31,6 +29,8 @@
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
/**
* This deployer's purpose is to trigger
@@ -66,10 +66,16 @@
URL[] foundUrls = Classpath.search(unit.getClassLoader(), prefix, suffix);
if (foundUrls != null)
{
- urls.addAll(Arrays.asList(foundUrls));
+ Set<VirtualFile> files = new HashSet<VirtualFile>();
+ for (URL url : foundUrls)
+ {
+ VirtualFile file = VFS.getChild(url);
+ if (files.add(file))
+ urls.add(url);
+ }
}
}
- catch (IOException e)
+ catch (Exception e)
{
DeploymentException.rethrowAsDeploymentException("Error doing facelets search, prefix=" + prefix + ", suffix=" + suffix, e);
}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/test/FaceletsUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/test/FaceletsUnitTestCase.java 2010-05-11 22:08:24 UTC (rev 104697)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/test/FaceletsUnitTestCase.java 2010-05-11 23:01:04 UTC (rev 104698)
@@ -24,8 +24,6 @@
import java.net.URL;
import java.util.Set;
-import junit.framework.Test;
-import junit.framework.TestSuite;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
import org.jboss.classloader.plugins.system.DefaultClassLoaderSystem;
import org.jboss.classloader.spi.ClassLoaderSystem;
@@ -43,6 +41,9 @@
import org.jboss.test.deployers.vfs.deployer.AbstractDeployerUnitTest;
import org.jboss.test.deployers.vfs.deployer.facelets.support.SearchDeployer;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
/**
* FaceletsUnitTestCase.
*
@@ -65,8 +66,6 @@
protected void setUp() throws Exception
{
super.setUp();
- // Uncomment this to test VFS nested jar copy handling
- //System.setProperty(VFSUtils.FORCE_COPY_KEY, "true");
addStructureDeployer(main, new WARStructure());
}
@@ -130,6 +129,7 @@
public void testExplodedFacelets() throws Throwable
{
+ // TODO -- getting duplicates with exploded deployment
testFacelets("exploded.jar", 3);
}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java 2010-05-11 22:08:24 UTC (rev 104697)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java 2010-05-11 23:01:04 UTC (rev 104698)
@@ -29,7 +29,6 @@
import java.util.List;
import java.util.Map;
-import junit.framework.Test;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.deployer.kernel.Properties2BeansDeployer;
@@ -45,6 +44,8 @@
import org.jboss.vfs.spi.FileSystem;
import org.jboss.xb.binding.JBossXBException;
+import junit.framework.Test;
+
/**
* Validate deployers.
*
@@ -163,6 +164,11 @@
public void close() throws IOException
{
}
+
+ public File getMountSource()
+ {
+ return null;
+ }
});
return file;
Modified: projects/jboss-deployers/trunk/pom.xml
===================================================================
--- projects/jboss-deployers/trunk/pom.xml 2010-05-11 22:08:24 UTC (rev 104697)
+++ projects/jboss-deployers/trunk/pom.xml 2010-05-11 23:01:04 UTC (rev 104698)
@@ -21,13 +21,13 @@
</scm>
<properties>
- <version.jboss.vfs>3.0.0.CR3</version.jboss.vfs>
+ <version.jboss.vfs>3.0.0.CR5</version.jboss.vfs>
<version.jboss.reflect>2.2.0.Alpha4</version.jboss.reflect>
<version.jboss.classpool>1.0.0.Alpha4</version.jboss.classpool>
<version.jboss.man>2.1.1.SP1</version.jboss.man>
<version.jboss.mdr>2.2.0.Alpha2</version.jboss.mdr>
- <version.jboss.kernel>2.2.0.Alpha9</version.jboss.kernel>
- <version.jboss.classloader>2.2.0.Alpha4</version.jboss.classloader>
+ <version.jboss.kernel>2.2.0.Alpha10</version.jboss.kernel>
+ <version.jboss.classloader>2.2.0-SNAPSHOT</version.jboss.classloader>
<version.jboss.classloading.spi>5.1.0.SP1</version.jboss.classloading.spi>
<version.jboss.common.core>2.2.17.GA</version.jboss.common.core>
<version.jboss.logging.spi>2.2.0.CR1</version.jboss.logging.spi>
@@ -36,7 +36,7 @@
<version.jboss.aop>2.1.0.CR3</version.jboss.aop>
<version.org.jboss.test>1.1.1.GA</version.org.jboss.test>
<version.junit>4.4</version.junit>
- <version.javassist>3.11.0.GA</version.javassist>
+ <version.javassist>3.12.0.GA</version.javassist>
<version.stax.staxapi>1.0</version.stax.staxapi>
<version.ant.junit>1.6.5</version.ant.junit>
<version.jboss.byteman>1.0.3.CP01</version.jboss.byteman>
More information about the jboss-cvs-commits
mailing list