我正在尝试运行这个sbt项目(基于play framework 2.4) https://github.com/pac4j/play-pac4j-scala-demo
我正在使用"激活器运行"命令。我的激活器版本是1.3.6
我确实看到sbt使用的默认maven仓库中的项目。但是,上面的日志似乎表明它没有找到。
https://repo1.maven.org/maven2/com/nimbusds/nimbus-jose-jwt/
我尝试清除常春藤缓存目录。但是,这似乎没有帮助。
输出
/Users/arun/workspace/samples/play-pac4j-scala-demo>activator run
[info] Loading global plugins from /Users/arun/.sbt/0.13/plugins
[info] Updating {file:/Users/arun/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Loading project definition from /Users/arun/workspace/samples/play-pac4j-scala-demo/project
[info] Updating {file:/Users/arun/workspace/samples/play-pac4j-scala-demo/project/}play-pac4j-scala-demo-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to play-pac4j-scala-demo (in build file:/Users/arun/workspace/samples/play-pac4j-scala-demo/)
[info] Updating {file:/Users/arun/workspace/samples/play-pac4j-scala-demo/}root...
[info] Resolving com.nimbusds#nimbus-jose-jwt;[4.0,] ...
[warn] module not found: com.nimbusds#nimbus-jose-jwt;[4.0,]
[warn] ==== local: tried
[warn] /Users/arun/.ivy2/local/com.nimbusds/nimbus-jose-jwt/[4.0,]/ivys/ivy.xml
[warn] ==== activator-launcher-local: tried
[warn] /usr/local/Cellar/typesafe-activator/1.3.5/libexec/repository/com.nimbusds/nimbus-jose-jwt/[4.0,]/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn] /Users/arun/Downloads/activator-dist-1.3.6/repository/com.nimbusds/nimbus-jose-jwt/[4.0,]/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/nimbusds/nimbus-jose-jwt/[4.0,]/nimbus-jose-jwt-[4.0,].pom
[warn] ==== typesafe-releases: tried
[warn] http://repo.typesafe.com/typesafe/releases/com/nimbusds/nimbus-jose-jwt/[4.0,]/nimbus-jose-jwt-[4.0,].pom
[warn] ==== typesafe-ivy-releasez: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.nimbusds/nimbus-jose-jwt/[4.0,]/ivys/ivy.xml
[warn] ==== Maven2 Local: tried
[warn] file:/Users/arun/.m2/repository/com/nimbusds/nimbus-jose-jwt/[4.0,]/nimbus-jose-jwt-[4.0,].pom
[warn] ==== Atlassian Releases: tried
[warn] https://maven.atlassian.com/public/com/nimbusds/nimbus-jose-jwt/[4.0,]/nimbus-jose-jwt-[4.0,].pom
[warn] ==== Sonatype snapshots repository: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/nimbusds/nimbus-jose-jwt/[4.0,]/nimbus-jose-jwt-[4.0,].pom
[warn] ==== Pablo repo: tried
[warn] https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/nimbusds/nimbus-jose-jwt/[4.0,]/nimbus-jose-jwt-[4.0,].pom
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.nimbusds#nimbus-jose-jwt;[4.0,]: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
...
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.nimbusds#nimbus-jose-jwt;[4.0,]: not found
[error] Total time: 26 s, completed Sep 16, 2015 5:46:27 PM
答案 0 :(得分:2)
问题出在[4.0,]
。
Ivy Version Matchers不支持this issue中报告的[4.0,]
。
在Maven Version Range中,没有明确说明,但似乎接受[4.0,]
。
我认为它应该是[4.0,)
,这意味着version >= 4.0
,都被常春藤和maven所接受。
使用sbt-dependency-graph插件,您可以看到问题出在com.nimbusds:oauth2-oidc-sdk:5.0-alpha2
。
[info] +-org.pac4j:pac4j-oidc:1.8.0-SNAPSHOT
[info] | +-com.nimbusds:oauth2-oidc-sdk:5.0-alpha2
...
[info] | | +-com.nimbusds:nimbus-jose-jwt:[4.0,] (error: not found) (evicted by: 4.0)
查看此项目的pom.xml,您可以找到
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>[4.0,]</version>
</dependency>
也许你可以给他们一个issue来将[4.0,]
替换为[4.0,)
。
~/.ivy2/cache/com.nimbusds/oauth2-oidc-sdk/ivy-5.0-alpha2.xml
缓存com.nimbusds:oauth2-oidc-sdk:5.0-alpha2
后,解决方法正在修改sbt
。
替换行
<dependency org="com.nimbusds" name="nimbus-jose-jwt" rev="[4.0,]" force="true" conf="compile->compile(*),master(compile);runtime->runtime(*)"/>
~~~~~~~~~~~~
到rev="[4.0,)"
并再次运行sbt
。