openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1503817 - /openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbArquillianScannerService.java
Date Tue, 16 Jul 2013 18:18:40 GMT
Author: rmannibucau
Date: Tue Jul 16 18:18:40 2013
New Revision: 1503817

URL: http://svn.apache.org/r1503817
Log:
OWB-880 testing archive type from extension

Modified:
    openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbArquillianScannerService.java

Modified: openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbArquillianScannerService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbArquillianScannerService.java?rev=1503817&r1=1503816&r2=1503817&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbArquillianScannerService.java
(original)
+++ openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbArquillianScannerService.java
Tue Jul 16 18:18:40 2013
@@ -39,7 +39,6 @@ import org.jboss.shrinkwrap.api.asset.As
 import org.jboss.shrinkwrap.api.asset.FileAsset;
 import org.jboss.shrinkwrap.api.exporter.ZipExporter;
 import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
 
 /**
  *
@@ -86,13 +85,14 @@ public class OwbArquillianScannerService
             return;
         }
 
-        if (archive instanceof JavaArchive)
+        final String archiveName = archive.getName();
+        if (archiveName.endsWith(".jar"))
         {
-            scanJarArchive((JavaArchive) archive);
+            scanJarArchive(archive);
         }
-        else if (archive instanceof WebArchive)
+        else if (archiveName.endsWith(".war"))
         {
-            scanWebArchive((WebArchive) archive);
+            scanWebArchive(archive);
         }
         else
         {
@@ -127,7 +127,7 @@ public class OwbArquillianScannerService
 
     // --------- private implementation -----------
 
-    private void scanWebArchive(WebArchive archive)
+    private void scanWebArchive(final Archive<?> archive)
     {
         URL webBeansXmlUrl = getBeanXmlUrl(archive, "WEB-INF/beans.xml");
         if (webBeansXmlUrl != null)
@@ -173,7 +173,7 @@ public class OwbArquillianScannerService
 
     }
 
-    private void scanJarArchive(JavaArchive archive)
+    private void scanJarArchive(final Archive<?> archive)
     {
         URL beansXmlUrl = getBeanXmlUrl(archive, "META-INF/beans.xml");
 



Mime
View raw message