tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1196338 - in /openejb/trunk/openejb: arquillian-tomee/arquillian-tomee-embedded/ arquillian-tomee/arquillian-tomee-moviefun-example/ arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/ assembly/tomee/tom...
Date Tue, 01 Nov 2011 22:42:31 GMT
Author: rmannibucau
Date: Tue Nov  1 22:42:30 2011
New Revision: 1196338

URL: http://svn.apache.org/viewvc?rev=1196338&view=rev
Log:
trying to align arquillian/shrinkwrap versions

Modified:
    openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-embedded/pom.xml
    openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/pom.xml
    openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesEJBTest.java
    openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesHtmlUnitTest.java
    openejb/trunk/openejb/assembly/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java

Modified: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-embedded/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-embedded/pom.xml?rev=1196338&r1=1196337&r2=1196338&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-embedded/pom.xml (original)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-embedded/pom.xml Tue Nov  1 22:42:30
2011
@@ -117,6 +117,11 @@
     	<artifactId>shrinkwrap-descriptors-impl</artifactId>
     	<version>${version.shrinkwrap.descriptor}</version>
     </dependency>
+    <dependency>
+    	<groupId>org.jboss.shrinkwrap.descriptors</groupId>
+    	<artifactId>shrinkwrap-descriptors-api</artifactId>
+    	<version>${version.shrinkwrap.descriptor}</version>
+    </dependency>
 
     <dependency>
       <groupId>org.eclipse.jdt.core.compiler</groupId>

Modified: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/pom.xml?rev=1196338&r1=1196337&r2=1196338&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/pom.xml (original)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/pom.xml Tue Nov
 1 22:42:30 2011
@@ -62,26 +62,6 @@
 	         <configuration>
 	            <artifactItems>
 	               <artifactItem>
-	                  <groupId>commons-beanutils</groupId>
-	                  <artifactId>commons-beanutils</artifactId>
-	                  <version>1.8.3</version>
-	               </artifactItem>
-	               <artifactItem>
-	                  <groupId>commons-codec</groupId>
-	                  <artifactId>commons-codec</artifactId>
-	                  <version>1.3</version>
-	               </artifactItem>
-	               <artifactItem>
-	                  <groupId>commons-collections</groupId>
-	                  <artifactId>commons-collections</artifactId>
-	                  <version>3.2</version>
-	               </artifactItem>
-	               <artifactItem>
-	                  <groupId>commons-digester</groupId>
-	                  <artifactId>commons-digester</artifactId>
-	                  <version>1.8</version>
-	               </artifactItem>
-	               <artifactItem>
 	                  <groupId>commons-logging</groupId>
 	                  <artifactId>commons-logging</artifactId>
 	                  <version>1.1.1</version>
@@ -104,11 +84,6 @@
 	               </artifactItem>
 	               -->
 	               <artifactItem>
-	                  <groupId>org.apache.myfaces.core</groupId>
-	                  <artifactId>myfaces-impl</artifactId>
-	                  <version>2.1.2</version>
-	               </artifactItem>
-	               <artifactItem>
 	                  <groupId>taglibs</groupId>
 	                  <artifactId>standard</artifactId>
 	                  <version>1.1.2</version>
@@ -196,6 +171,11 @@
     	<scope>test</scope>
     </dependency>
     <dependency>
+    	<groupId>org.jboss.shrinkwrap.descriptors</groupId>
+    	<artifactId>shrinkwrap-descriptors-impl</artifactId>
+    	<version>${version.shrinkwrap.descriptor}</version>
+    </dependency>
+    <dependency>
     	<groupId>org.apache.openejb</groupId>
     	<artifactId>tomee-embedded</artifactId>
     	<version>1.0.0-beta-2-SNAPSHOT</version>

Modified: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesEJBTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesEJBTest.java?rev=1196338&r1=1196337&r2=1196338&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesEJBTest.java
(original)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesEJBTest.java
Tue Nov  1 22:42:30 2011
@@ -31,6 +31,7 @@ import org.jboss.shrinkwrap.api.spec.Web
 import org.jboss.shrinkwrap.impl.base.asset.ClassLoaderAsset;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.superbiz.moviefun.setup.ExampleDataProducer;
@@ -43,10 +44,11 @@ import javax.inject.Inject;
 @RunWith(Arquillian.class)
 public class MoviesEJBTest {
 	@Deployment public static WebArchive createDeployment() {
-		return ShrinkWrap.create(WebArchive.class, "test.war").addClasses(Movie.class, MoviesImpl.class,
Movies.class, MoviesRemote.class, MoviesEJBTest.class, Setup.class, Examples.class, ExampleDataProducer.class)
-				.addAsResource(new ClassLoaderAsset("META-INF/ejb-jar.xml") , "META-INF/ejb-jar.xml")
-        		.addAsResource(new ClassLoaderAsset("META-INF/persistence.xml") , "META-INF/persistence.xml")
-        		.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
+		return ShrinkWrap.create(WebArchive.class, "test.war")
+                .addClasses(Movie.class, MoviesImpl.class, Movies.class, MoviesRemote.class,
MoviesEJBTest.class, Setup.class, Examples.class, ExampleDataProducer.class)
+                .addAsResource(new ClassLoaderAsset("META-INF/ejb-jar.xml"), "META-INF/ejb-jar.xml")
+                .addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml")
+                .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
 	}
 
 	@EJB private Movies movies;

Modified: openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesHtmlUnitTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesHtmlUnitTest.java?rev=1196338&r1=1196337&r2=1196338&view=diff
==============================================================================
--- openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesHtmlUnitTest.java
(original)
+++ openejb/trunk/openejb/arquillian-tomee/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/MoviesHtmlUnitTest.java
Tue Nov  1 22:42:30 2011
@@ -68,7 +68,7 @@ public class MoviesHtmlUnitTest {
         }
 
         FileUtils.copyDirectory(new File("target/classes"), new File(file, "WEB-INF/classes"));
-	FileUtils.copyDirectory(new File("target/test-libs"), new File(file, "WEB-INF/lib"));
+	    FileUtils.copyDirectory(new File("target/test-libs"), new File(file, "WEB-INF/lib"));
         FileUtils.copyDirectory(new File("src/main/webapp"), file);
 
         return file;

Modified: openejb/trunk/openejb/assembly/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/assembly/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java?rev=1196338&r1=1196337&r2=1196338&view=diff
==============================================================================
--- openejb/trunk/openejb/assembly/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java
(original)
+++ openejb/trunk/openejb/assembly/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEEWebappLoader.java
Tue Nov  1 22:42:30 2011
@@ -1,6 +1,7 @@
 package org.apache.tomee.catalina;
 
 import org.apache.catalina.LifecycleException;
+import org.apache.catalina.loader.WebappClassLoader;
 import org.apache.catalina.loader.WebappLoader;
 import org.apache.naming.resources.DirContextURLStreamHandler;
 import org.apache.openejb.util.ArrayEnumeration;
@@ -58,12 +59,15 @@ public class TomEEWebappLoader extends W
          * @throws IOException
          */
         @Override public Enumeration<URL> getResources(final String name) throws IOException
{
-            Enumeration<URL> appClassLoaderResources = app.getResources(name);
-            Enumeration<URL> webappClassLoaderResources = webapp.getResources(name);
-
             Set<URL> urls = new HashSet<URL>();
+
             // /!\ order is important here
-            add(urls, webappClassLoaderResources);
+            if (webapp instanceof WebappClassLoader && ((WebappClassLoader) webapp).isStarted()
|| webapp.getParent() == null) { // we set a parent so if it is null webapp was detroyed
+                Enumeration<URL> webappClassLoaderResources = webapp.getResources(name);
+                add(urls, webappClassLoaderResources);
+            }
+
+            Enumeration<URL> appClassLoaderResources = app.getResources(name);
             add(urls, appClassLoaderResources);
 
             return new ArrayEnumeration(urls);



Mime
View raw message