Переглянути джерело

remove dependency on commons-collections4, trim down jar file

tags/v1.4.39
Jonathan Cobb 3 роки тому
джерело
коміт
b4246c7806
6 змінених файлів з 120 додано та 10 видалено
  1. +113
    -3
      bubble-server/pom.xml
  2. +2
    -2
      bubble-server/src/main/java/bubble/cloud/auth/AuthenticationDriver.java
  3. +2
    -2
      bubble-server/src/main/java/bubble/rule/bblock/BubbleBlockRuleDriver.java
  4. +1
    -1
      bubble-web
  5. +1
    -1
      utils/cobbzilla-utils
  6. +1
    -1
      utils/cobbzilla-wizard

+ 113
- 3
bubble-server/pom.xml Переглянути файл

@@ -327,16 +327,126 @@
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<!-- Exclude signed jars to avoid errors
see: http://stackoverflow.com/a/6743609/1251543
-->
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<!-- Exclude signed jars to avoid errors, see: http://stackoverflow.com/a/6743609/1251543 -->
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>

<!-- We don't use these whole dependencies, brought in by other dependencies -->
<exclude>org.mongodb:*</exclude>
<exclude>com.github.jmkgreen.morphia:*</exclude>
<exclude>org.elasticsearch:*</exclude>
<exclude>fr.opensagres.xdocreport:*</exclude>
<exclude>com.codeborne:*</exclude>
<exclude>jtidy:*</exclude>
<exclude>xalan:*</exclude>
<exclude>net.sf.saxon:*</exclude>
<exclude>org.apache.ant:*</exclude>

<!-- Exclude other stuff by path -->
<exclude>META-INF/maven/**</exclude>
<exclude>META-INF/services/fr.opensagres**</exclude>
<exclude>aj/org/objectweb/**</exclude>
<exclude>com/ctc/wstx/api/EmptyElementHandler.class</exclude>
<exclude>com/ctc/wstx/api/InvalidCharHandler.class</exclude>
<exclude>com/ctc/wstx/api/ValidatorConfig.class</exclude>
<exclude>com/ctc/wstx/api/WstxOutputProperties.class</exclude>
<exclude>com/ctc/wstx/cfg/ErrorConsts.class</exclude>
<exclude>com/ctc/wstx/cfg/XmlConsts.class</exclude>
<exclude>com/ctc/wstx/compat/QNameCreator.class</exclude>
<exclude>com/ctc/wstx/dom/**</exclude>
<exclude>com/ctc/wstx/dtd/**</exclude>
<exclude>com/ctc/wstx/msv/**</exclude>
<exclude>com/ctc/wstx/osgi/**</exclude>
<exclude>com/ctc/wstx/sax/**</exclude>
<exclude>com/ctc/wstx/shaded/msv/org_isorelax/catalog/**</exclude>
<exclude>com/ctc/wstx/shaded/msv/org_isorelax/dispatcher/**</exclude>
<exclude>com/ctc/wstx/shaded/msv/org_isorelax/jaxp/**</exclude>
<exclude>com/ctc/wstx/shaded/msv/org_isorelax/verifier/**</exclude>
<exclude>com/ctc/wstx/shaded/msv/org_jp_gr_xml/**</exclude>
<exclude>com/ctc/wstx/shaded/msv/relaxng_datatype/**</exclude>
<exclude>com/ctc/wstx/shaded/msv/xsd_util/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/datatype/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/driver/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/grammar/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/reader/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/reader/trex/classic/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/relaxns/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/scanner/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/util/xml/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/verifier/**</exclude>
<exclude>com/ctc/wstx/shaded/msv_core/writer/**</exclude>
<exclude>com/github/jmkgreen/**</exclude>
<exclude>com/google/common/collect/**</exclude>
<exclude>com/mongodb/**</exclude>
<exclude>com/opencsv/**</exclude>
<exclude>com/twilio/rest/**</exclude>
<exclude>fr/opensagres/**</exclude>
<exclude>io/jsonwebtoken/**</exclude>
<exclude>javax/servlet/descriptor/**</exclude>
<exclude>javax/servlet/http/**</exclude>
<exclude>lib/README.txt/**</exclude>
<exclude>lib/darwin-x86-amd64/**</exclude>
<exclude>lombok/bytecode/**</exclude>
<exclude>lombok/core/**</exclude>
<exclude>lombok/delombok/**</exclude>
<exclude>lombok/eclipse/**</exclude>
<exclude>lombok/experimental/**</exclude>
<exclude>lombok/extern/**</exclude>
<exclude>lombok/installer/**</exclude>
<exclude>lombok/javac/**</exclude>
<exclude>lombok/launch/**</exclude>
<exclude>net/fortuna/**</exclude>
<exclude>net/sf/saxon/**</exclude>
<exclude>org/apache/commons/math3/**</exclude>
<exclude>org/apache/fontbox/**</exclude>
<exclude>org/apache/pdfbox/**</exclude>
<exclude>org/apache/poi/**</exclude>
<exclude>org/apache/tools/ant/**</exclude>
<exclude>org/apache/velocity/**</exclude>
<exclude>org/apache/xalan/**</exclude>
<exclude>org/apache/xmlbeans/**</exclude>
<exclude>org/eclipse/jetty/client/**</exclude>
<exclude>org/eclipse/jetty/favicon.ico/**</exclude>
<exclude>org/eclipse/jetty/http/**</exclude>
<exclude>org/eclipse/jetty/io/**</exclude>
<exclude>org/eclipse/jetty/proxy/**</exclude>
<exclude>org/eclipse/jetty/security/**</exclude>
<exclude>org/eclipse/jetty/server/handler/**</exclude>
<exclude>org/eclipse/jetty/server/jmx/**</exclude>
<exclude>org/eclipse/jetty/server/nio/**</exclude>
<exclude>org/eclipse/jetty/server/resource/**</exclude>
<exclude>org/eclipse/jetty/server/session/**</exclude>
<exclude>org/eclipse/jetty/servlet/**</exclude>
<exclude>org/eclipse/jetty/util/annotation/**</exclude>
<exclude>org/eclipse/jetty/util/compression/**</exclude>
<exclude>org/eclipse/jetty/util/log/**</exclude>
<exclude>org/eclipse/jetty/util/preventers/**</exclude>
<exclude>org/eclipse/jetty/util/resource/**</exclude>
<exclude>org/eclipse/jetty/util/security/**</exclude>
<exclude>org/eclipse/jetty/util/ssl/**</exclude>
<exclude>org/eclipse/jetty/util/statistic/**</exclude>
<exclude>org/eclipse/jetty/util/thread/**</exclude>
<exclude>org/eclipse/jetty/version/**</exclude>
<exclude>org/eclipse/jetty/webapp/**</exclude>
<exclude>org/eclipse/jetty/xml/**</exclude>
<exclude>org/hibernate/internal/jaxb/**</exclude>
<exclude>org/openqa/selenium/**</exclude>
<exclude>org/openxmlformats/**</exclude>
<exclude>org/springframework/orm/hibernate3/**</exclude>
<exclude>org/springframework/orm/hibernate5/**</exclude>
<exclude>org/springframework/orm/jdo/**</exclude>
<exclude>schemaorg_apache_xmlbeans/**</exclude>
<exclude>schemasMicrosoftComOfficeExcel/**</exclude>
<exclude>schemasMicrosoftComOfficeOffice/**</exclude>
<exclude>schemasMicrosoftComOfficePowerpoint/**</exclude>
<exclude>schemasMicrosoftComOfficeWord/**</exclude>
<exclude>schemasMicrosoftComVml/**</exclude>
<exclude>w3c/mathml/**</exclude>
</excludes>
</filter>
</filters>


+ 2
- 2
bubble-server/src/main/java/bubble/cloud/auth/AuthenticationDriver.java Переглянути файл

@@ -30,8 +30,8 @@ import bubble.server.BubbleConfiguration;
import bubble.service.account.StandardAccountMessageService;
import bubble.service.message.MessageService;
import com.github.jknack.handlebars.Handlebars;
import org.apache.commons.collections4.map.SingletonMap;
import org.apache.commons.lang3.ArrayUtils;
import org.cobbzilla.util.collection.MapBuilder;
import org.cobbzilla.util.handlebars.HandlebarsUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -209,7 +209,7 @@ public interface AuthenticationDriver extends CloudServiceDriver {
static String localePath(final String locale, String templatePath, Handlebars hbs) {
final String key = locale+":"+templatePath;
return _localePaths.computeIfAbsent(key,
k -> HandlebarsUtil.apply(hbs, templatePath, new SingletonMap<>(CTX_LOCALE, locale), '[', ']'));
k -> HandlebarsUtil.apply(hbs, templatePath, MapBuilder.build(CTX_LOCALE, locale), '[', ']'));
}

String HTML_MESSAGE_HBS = "htmlMessage.hbs";


+ 2
- 2
bubble-server/src/main/java/bubble/rule/bblock/BubbleBlockRuleDriver.java Переглянути файл

@@ -22,8 +22,8 @@ import bubble.service.stream.AppRuleHarness;
import bubble.service.stream.ConnectionCheckResponse;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.map.SingletonMap;
import org.cobbzilla.util.collection.ExpirationMap;
import org.cobbzilla.util.collection.MapBuilder;
import org.cobbzilla.util.http.URIUtil;
import org.cobbzilla.util.string.StringUtil;
import org.glassfish.grizzly.http.server.Request;
@@ -407,7 +407,7 @@ public class BubbleBlockRuleDriver extends TrafficAnalyticsRuleDriver
// Now that we know the content type, re-check the BlockList
final String contentType = filterRequest.getContentType();
final BlockDecision decision = getBlockList().getDecision(request.getFqdn(), request.getUri(), contentType, request.getReferer(), true);
final Map<String, Object> filterCtx = new SingletonMap<>(FILTER_CTX_DECISION, decision);
final Map<String, Object> filterCtx = MapBuilder.build(FILTER_CTX_DECISION, decision);
if (log.isDebugEnabled()) log.debug(prefix+"preprocess decision was "+decision+", but now we know contentType="+contentType);
switch (decision.getDecisionType()) {
case block:


+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit 4b0fbd0d37e7335d6b0d93cc9b65bea416e9d5ec
Subproject commit 3c892f6b4dc931c657a28f58f79330dd36273e75

+ 1
- 1
utils/cobbzilla-utils

@@ -1 +1 @@
Subproject commit a765cf0ac5e8000c381b5542d3b007600d2eda0a
Subproject commit 8d6947849d8522613f6f4d85438a7caf573940dc

+ 1
- 1
utils/cobbzilla-wizard

@@ -1 +1 @@
Subproject commit 103dbe59235db53b06c251302dc839b24f480602
Subproject commit 36035cd8abd4254e1c44a8672fd61ec0d74380e0

Завантаження…
Відмінити
Зберегти