Scala Dependency and SBT
Recently, I met a problem that our Scala Project keep logging these Error Messages
SLF4J: Found binding in [jar:file:/Users/carl/.ivy2/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class][ERROR] SLF4J: Found binding in [jar:file:/Users/carl/.ivy2/cache/org.slf4j/slf4j-simple/jars/slf4j-simple-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
From the documents, the default configuration for transitivity
intransitive(), notTransitive()
I guess the default configuration is intransitive(), and we have a lot of dependencies, so I do not which dependency bring me this conflicts.
So I need to put notTransitive() to every dependency.
for example:
"com.googlecode.flyway" % "flyway-core" % "2.2.1" notTransitive()
The I found the conflict was brought by kafka
"org.apache.kafka" % "kafka_2.10" % “0.8.0"
So I change the kafka as follow:
"org.apache.kafka" % "kafka_2.10" % "0.8.0" exclude("org.slf4j", "slf4j-simple"),
A command to show all the jar dependencies in our projects without publish-loca or something else is as follow:
>show compile:dependency-classpath
And here is another thing, conflict-managers
http://ant.apache.org/ivy/history/latest-milestone/settings/conflict-managers.html
conflictManager := ConflictManager.strict
References:
sbt document library management
http://www.scala-sbt.org/0.13.2/docs/Detailed-Topics/Library-Management.html
http://www.scala-sbt.org/0.13.2/api/index.html#sbt.ConflictManager$
Conflict Type Management
http://ant.apache.org/ivy/history/latest-milestone/settings/conflict-managers.html
- 浏览: 2552370 次
- 性别:
- 来自: 成都
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
相关推荐
scala 编译工具 sbt 安装包。 Little or no configuration required for simple projects Scala-based build definition that can use the full flexibility of Scala code Accurate incremental recompilation ...
`sbt-dependency-graph` 是一个针对 Scala 项目的 SBT(Simple Build Tool)插件,它允许开发者直观地了解他们的项目中的依赖关系。在软件开发中,尤其是在大型复杂项目中,理解库和模块之间的依赖关系至关重要,...
在SBT中: libraryDependencies += "com.jsuereth" %% "scala-arm" % "2.0" 或(如果出于某种原因要手动指定Scala版本) libraryDependencies += "com.jsuereth" % "scala-arm_2.11" % "2.0" libraryDependencies ...
`sbt-dependency-check` 是一个针对 Scala 和 SBT(Scala Build Tool)项目的开源插件,它集成了解决安全问题的 OWASP DependencyCheck 工具。该插件的主要目的是帮助开发人员在构建过程中自动检查项目依赖项是否...
安装将以下行添加到这些文件之一: 专案专用档案位于project/plugins.sbt 在您的全局文件~/.sbt/1.0/plugins/plugins.sbt为SBT 1.0addSbtPlugin( " org.jmotor.sbt " % " sbt-dependency-updates " % " 1.2.1 " )或~...
SBT libraryDependencies + = " com.datasift.dropwizard.scala " %% " dropwizard-scala-core " % " 1.0.0-1 " 玛文 在您的POM中包含dropwizard-scala-core工件: < dependency> < groupId>...
`sbt-eviction-rules` 是一个针对 Scala 项目的 sbt(Simple Build Tool)插件,专门用于增强和优化依赖管理过程中的版本冲突处理。在 Scala 开发中,由于其丰富的库生态,项目往往依赖多个库,而这些库之间可能存在...
在实际项目中,我们可能还需要配置 Scala 的测试框架,如 SBT(Scala Build Tool)中的 Scalatest。在 `pom.xml` 中添加 Scalatest 依赖: ```xml <!-- ... --> <dependency> <groupId>org.scalatest ...
< groupId>com.github.ywilkof</ groupId> < artifactId>spark-jobs-rest-client</ artifactId> < version>1.3.9</ version></ dependency>SBT "com.github.ywilkof" % "spark-jobs-rest-client" % "1.3.9"...
接下来,创建一个 Scala 项目,并添加以下依赖到你的构建文件(如 sbt 或 Maven)中,以支持 Kafka 和 Scala 库: 对于 SBT(Scala Build Tool): ```scala libraryDependencies ++= Seq( "org.apache.kafka" %% ...
制造者 Fabricator是随机字符串,数字等的极简主义生成器,可帮助减少某些单调性,... 如果您想在scala项目中使用它,则只需build.sbt添加到build.sbt文件中: 注意:从版本2.1.5 scala 2.10开始已弃用。 您可以获取
模数12 适用于Midi和Music XML文件的Sql查询引擎 开发指令 # Clean up dependency cache sbt clean ...# I am not proscribing using VSCode, but dotty and sbt supports it natively. sbt launchIDE
只要安装了它,就可以运行以下命令来打包 JAR 并将它们安装到本地 Maven 存储库中: sbt clean publish包括如果您在本地发布此库,则可以将其包含在任何 Maven 项目中,如下所示: <dependency> <groupId>...
安装使用Maven: <dependency> <groupId>com.github.jannvck</groupId> <artifactId>rdfp_2.11</artifactId> <version>1.0</version></dependency>或使用SBT添加到您的build.sbt文件中: libraryDependencies ...
获取 beamly.core.lang 添加此 sbt 依赖项: "com.beamly" %% "beamly-core-lang" % "0.5.0" 或 Maven 依赖: < dependency> < groupId>com.beamly</ groupId> < artifactId>beamly-core-lang_${scala.binary}...
dependency> Slab适用于Scala 2.11和2.12入门最简单的入门方法是遵循以下指南:该文档也可用:运行示例项目确保已安装sbt和npm,然后: $> npm install$> npm start贡献请阅读执照根据版权版权所有:copyright:Criteo...
1. **获取依赖库**: 在有网络的环境中,通常会使用`sbt`(Scala Build Tool)来管理和下载项目依赖。`.ivy2`目录通常存储了`sbt`管理的库文件。你需要确保这些库已经被下载并复制到离线环境的相应位置。 2. **设置...
巴厘岛DI为Scala Bali ...入门如果使用SBT,则需要在项目中添加以下依赖项: libraryDependencies + = " global.namespace.bali " %% " bali-scala " % " 0.2.0 " % Provided 请注意,这是一个仅编译时的依赖关系-在B
SBT依赖 libraryDependencies += "com.springml" % "spark-sftp_2.11" % "1.1.3" 与Spark Shell一起使用 可以使用--packages命令行选项将此软件包添加到Spark。 例如,在启动spark shell时将其包括在内: