openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1850662 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java
Date Mon, 07 Jan 2019 16:05:29 GMT
Author: rmannibucau
Date: Mon Jan  7 16:05:29 2019
New Revision: 1850662

URL: http://svn.apache.org/viewvc?rev=1850662&view=rev
Log:
MEECROWAVE-173 avoid to exclude too much geronimo jars

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java?rev=1850662&r1=1850661&r2=1850662&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java
Mon Jan  7 16:05:29 2019
@@ -18,16 +18,16 @@
  */
 package org.apache.meecrowave.openwebbeans;
 
-import org.apache.meecrowave.Meecrowave;
-import org.apache.tomcat.JarScanFilter;
-import org.apache.tomcat.JarScanType;
+import static java.util.Optional.ofNullable;
+import static java.util.stream.Collectors.toSet;
 
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.stream.Stream;
 
-import static java.util.Optional.ofNullable;
-import static java.util.stream.Collectors.toSet;
+import org.apache.meecrowave.Meecrowave;
+import org.apache.tomcat.JarScanFilter;
+import org.apache.tomcat.JarScanType;
 
 public class KnownJarsFilter implements JarScanFilter {
     private final Collection<String> forceIncludes = new HashSet<String>() {{
@@ -119,7 +119,11 @@ public class KnownJarsFilter implements
         add("FastInfoset");
         add("freeemarker-");
         add("fusemq-leveldb-");
-        add("geronimo-");
+        add("geronimo-connector-");
+        add("geronimo-j2ee");
+        add("geronimo-jpa");
+        add("geronimo-javamail");
+        add("geronimo-transaction");
         add("google-");
         add("gpars-");
         add("gragent.jar");
@@ -353,6 +357,11 @@ public class KnownJarsFilter implements
 
     @Override
     public boolean check(final JarScanType jarScanType, final String jarName) {
-        return forceIncludes.stream().anyMatch(jarName::startsWith) || excludes.stream().noneMatch(jarName::startsWith);
+        return forceIncludes.stream().anyMatch(jarName::startsWith) ||
+                (excludes.stream().noneMatch(jarName::startsWith) && !isGeronimoSpecJar(jarName));
+    }
+
+    private boolean isGeronimoSpecJar(final String jarName) {
+        return jarName.startsWith("geronimo") && jarName.contains("_spec");
     }
 }



Mime
View raw message