代码之家  ›  专栏  ›  技术社区  ›  Ajmal Ahammed

在play framework 2.5.5中使用莴苣4.4

  •  0
  • Ajmal Ahammed  · 技术社区  · 9 年前

    我看到一个 java.nio.channels.UnresolvedAddressException

    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>4.0.20.Final</version>
    </dependency>
    

    我能够通过使用着色jar解决maven项目中的问题,其中依赖项被重新定位到 com.lambdaworks https://github.com/lettuce-io/lettuce-core#binariesdownload . 为了使用着色jar,将“分类器”属性添加到值为“着色”的莴苣依赖项定义中,并且还指定了一个排除列表。如何使用build实现相同的功能。sbt?

    根据 http://www.scala-sbt.org/0.13/docs/Library-Management.html#Exclude+Transitive+Dependencies ,我可以在生成中指定排除。sbt,但不确定如何设置分类器属性。仅凭排除列表,这似乎不起作用。

    1 回复  |  直到 9 年前
        1
  •  0
  •   Ajmal Ahammed    9 年前

    shaded 分类器和 exclusions 在构建中。sbt如下:

      "biz.paluch.redis" % "lettuce" % "4.4.0.Final" classifier "shaded" excludeAll(
        ExclusionRule(organization = "io.reactivex", artifact="rxjava"),
        ExclusionRule(organization = "org.latencyutils", artifact="LatencyUtils"),
        ExclusionRule(organization = "io.netty", artifact="netty-common"),
        ExclusionRule(organization = "io.netty", artifact="netty-transport"),
        ExclusionRule(organization = "io.netty", artifact="netty-handler"),
        ExclusionRule(organization = "io.netty", artifact="netty-codec"),
        ExclusionRule(organization = "com.google.guava", artifact="guava"),
        ExclusionRule(organization = "io.netty", artifact="netty-transport-native-epoll"),
        ExclusionRule(organization = "io.apache.commons", artifact="commons-pool2"))
    )