1

如果我有

libraryDependencies += "org.apache.opennlp" % "opennlp-tools" % "1.5.2-incubating"

build.sbt,我得到一个错误:

[warn]  module not found: jwnl#jwnl;1.3.3
[warn] ==== local: tried
[warn]   C:\Users\Alexey\.ivy2/local/jwnl/jwnl/1.3.3/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/jwnl/jwnl/1.3.3/jwnl-1.3.3.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: jwnl#jwnl;1.3.3: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/E:/OpenCorporaSegmenter/}default-af76b3/*:update: sbt.ResolveExce
ption: unresolved dependency: jwnl#jwnl;1.3.3: not found
[error] Total time: 2 s, completed 22.02.2013 11:53:16

原因显然是https://issues.apache.org/jira/browse/OPENNLP-510,但将依赖替换为

libraryDependencies += "org.cleartk" % "cleartk-opennlp-tools" % "0.10.2"

(不包括 JWNL),如那里的评论中所建议的,仍然会产生相同的错误。有没有办法避免这个问题?

4

1 回答 1

1

“要排除依赖项的某些传递依赖项,请使用 excludeAll 或 exclude 方法......” -有关详细信息,请参阅http://www.scala-sbt.org/release/docs/Detailed-Topics/Library-Management.html .

于 2013-11-28T00:14:07.173 回答