[jboss-cvs] JBossAS SVN: r110326 - in projects/reloaded/trunk/vdf-bootstrap-minimal: src/test/java/org/jboss/reloaded/api and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jan 11 18:46:16 EST 2011
Author: ALRubinger
Date: 2011-01-11 18:46:16 -0500 (Tue, 11 Jan 2011)
New Revision: 110326
Added:
projects/reloaded/trunk/vdf-bootstrap-minimal/src/test/resources/test.jar
Modified:
projects/reloaded/trunk/vdf-bootstrap-minimal/pom.xml
projects/reloaded/trunk/vdf-bootstrap-minimal/src/test/java/org/jboss/reloaded/api/MainDeployerViaBootstrapUnitTest.java
Log:
[RELOADED-16] Remove dependency upon ShrinkWrap
Modified: projects/reloaded/trunk/vdf-bootstrap-minimal/pom.xml
===================================================================
--- projects/reloaded/trunk/vdf-bootstrap-minimal/pom.xml 2011-01-11 21:51:38 UTC (rev 110325)
+++ projects/reloaded/trunk/vdf-bootstrap-minimal/pom.xml 2011-01-11 23:46:16 UTC (rev 110326)
@@ -25,7 +25,6 @@
<version.org.jboss_jbossxb>2.0.2.Beta2</version.org.jboss_jbossxb>
<version.org.jboss_jboss.common.core>2.2.17.GA</version.org.jboss_jboss.common.core>
<version.junit_junit>4.7</version.junit_junit>
- <version.org.jboss.shrinkwrap>1.0.0-alpha-10</version.org.jboss.shrinkwrap>
<version.org.jboss.threads>2.0.0.CR4</version.org.jboss.threads>
</properties>
@@ -168,25 +167,6 @@
<artifactId>jboss-common-core</artifactId>
<version>${version.org.jboss_jboss.common.core}</version>
</dependency>
-
- <!-- org.jboss.shrinkwrap -->
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-api</artifactId>
- <version>${version.org.jboss.shrinkwrap}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-impl-base</artifactId>
- <version>${version.org.jboss.shrinkwrap}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-extension-vfs3</artifactId>
- <version>${version.org.jboss.shrinkwrap}</version>
- <scope>provided</scope>
- </dependency>
<!-- Test Dependencies -->
<dependency>
Modified: projects/reloaded/trunk/vdf-bootstrap-minimal/src/test/java/org/jboss/reloaded/api/MainDeployerViaBootstrapUnitTest.java
===================================================================
--- projects/reloaded/trunk/vdf-bootstrap-minimal/src/test/java/org/jboss/reloaded/api/MainDeployerViaBootstrapUnitTest.java 2011-01-11 21:51:38 UTC (rev 110325)
+++ projects/reloaded/trunk/vdf-bootstrap-minimal/src/test/java/org/jboss/reloaded/api/MainDeployerViaBootstrapUnitTest.java 2011-01-11 23:46:16 UTC (rev 110326)
@@ -1,6 +1,5 @@
package org.jboss.reloaded.api;
-import java.io.File;
import java.util.List;
import junit.framework.TestCase;
@@ -13,9 +12,6 @@
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.logging.Logger;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.exporter.ZipExporter;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.vfs.VFS;
import org.jboss.vfs.VirtualFile;
import org.junit.Test;
@@ -94,25 +90,18 @@
.getTarget();
TestCase.assertNotNull(MainDeployer.class.getName() + " instance was not installed into MC", mainDeployer);
- // Construct a test JAR
- final JavaArchive testJar = ShrinkWrap.create(NAME_ARCHIVE, JavaArchive.class).addClass(this.getClass());
-
- // Flush out to a real File
- final File tmpFile = File.createTempFile(testJar.getName(), EXTENSION_TMP);
- testJar.as(ZipExporter.class).exportZip(tmpFile, true);
- tmpFile.deleteOnExit();
-
// Deploy the test JAR
- final VirtualFile vFile = VFS.getChild(tmpFile.toURI());
+ final String testJarName = "test.jar";
+ final VirtualFile vFile = VFS.getChild(Thread.currentThread().getContextClassLoader().getResource(testJarName)
+ .toURI());
final VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(vFile);
mainDeployer.addDeployment(deployment);
mainDeployer.process();
mainDeployer.checkComplete();
// Obtain the last deployed
- DeploymentUnit lastDeployed = cachingDeployer.lastDeployed;
- final String path = vFile.toURI().toURL().getPath();
- TestCase.assertEquals(path.substring(path.lastIndexOf('/') + 1, path.length()), lastDeployed.getSimpleName());
+ final DeploymentUnit lastDeployed = cachingDeployer.lastDeployed;
+ TestCase.assertTrue("Last JAR deployed was not our test JAR",lastDeployed.getSimpleName().equals(testJarName));
// Undeploy
mainDeployer.undeploy(deployment);
Added: projects/reloaded/trunk/vdf-bootstrap-minimal/src/test/resources/test.jar
===================================================================
(Binary files differ)
Property changes on: projects/reloaded/trunk/vdf-bootstrap-minimal/src/test/resources/test.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the jboss-cvs-commits
mailing list