Playframework 为什么可以';t activator在本地maven存储库中解析自定义依赖项?
我正在使用Java编写一个Play2.3.2应用程序 我对mail chimp java api包装库进行了扩展,并使用Playframework 为什么可以';t activator在本地maven存储库中解析自定义依赖项?,playframework,sbt,mailchimp,playframework-2.3,typesafe-activator,Playframework,Sbt,Mailchimp,Playframework 2.3,Typesafe Activator,我正在使用Java编写一个Play2.3.2应用程序 我对mail chimp java api包装库进行了扩展,并使用2.0.1.2-beta更改了模块版本 我已将模块安装到本地maven存储库中。然后,我尝试从我的Play应用程序的构建中引用它,但是Play shell(activator update)中的update命令给了我以下错误: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: U
2.0.1.2-beta
更改了模块版本
我已将模块安装到本地maven存储库中。然后,我尝试从我的Play应用程序的构建中引用它,但是Play shell(activator update
)中的update
命令给了我以下错误:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.ecwid#ecwid-mailchimp;2.0.1.2-beta: several problems occurred while resolving dependency: com.ecwid#ecwid-mailchimp;2.0.1.2-beta {compile=[default(compile)]}:
[warn] URI has an authority component
[warn] URI has an authority component
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: com.ecwid#ecwid-mailchimp;2.0.1.2-beta: several problems occurred while resolving dependency: com.ecwid#ecwid-mailchimp;2.0.1.2-beta {compile=[default(compile)]}:
URI has an authority component
URI has an authority component
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
...
[error] (*:update) sbt.ResolveException: unresolved dependency: com.ecwid#ecwid-mailchimp;2.0.1.2-beta: several problems occurred while resolving dependency: com.ecwid#ecwid-mailchimp;2.0.1.2-beta {compile=[default(compile)]}:
[error] URI has an authority component
[error] URI has an authority component
这是我的rilevant在build.sbt
文件中的一部分:
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
"Local Play Repository" at "file://$HOME/.ivy2/local",
"Local Maven Repository" at "file://$HOME/.m2/repository"
)
libraryDependencies ++= Seq(
"com.ecwid" % "ecwid-mailchimp" % "2.0.1.2-beta"
)
有什么问题???当您遇到错误时,sbt会告诉您运行
last*:update
以查看完整输出:
[trace] Stack trace suppressed: run last *:update for the full output.
在复制案例时,我发现last*:update
非常有用,因为它向我展示了:
[debug] CLIENT ERROR: Not Found url=https://oss.sonatype.org/content/repositories/snapshots/com/ecwid/ecwid-mailchimp/2.0.1.2-beta/ecwid-mailchimp-2.0.1.2-beta.pom
[debug] sonatype-snapshots: no ivy file found for com.ecwid#ecwid-mailchimp;2.0.1.2-beta
[debug] tried file://$HOME/.ivy2/local/com/ecwid/ecwid-mailchimp/2.0.1.2-beta/ecwid-mailchimp-2.0.1.2-beta.pom
[debug] problem occurred while resolving dependency: com.ecwid#ecwid-mailchimp;2.0.1.2-beta {compile=[default(compile)]} with Local Play Repository: java.lang.IllegalArgumentException: URI has an authority component
[debug] at java.io.File.<init>(File.java:423)
[debug] at sbt.IO$.toFile(IO.scala:76)
[debug] at sbt.ConvertResolver$LocalIfFileRepo.getResource(ConvertResolver.scala:222)
或者,为了方便起见:
resolvers += Resolver.mavenLocal
使用以下build.sbt
:
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.mavenLocal
)
libraryDependencies ++= Seq(
"com.ecwid" % "ecwid-mailchimp" % "2.0.1.2-beta"
)
update
被暂停,无法解析com.ecwid#ecwid mailchimp;2.0.1.2-beta版
这是另一个问题:
> update
[info] Updating {file:/Users/jacek/sandbox/uri-authority/}uri-authority...
[info] Resolving com.ecwid#ecwid-mailchimp;2.0.1.2-beta ...
[warn] module not found: com.ecwid#ecwid-mailchimp;2.0.1.2-beta
[warn] ==== local: tried
[warn] /Users/jacek/.ivy2/local/com.ecwid/ecwid-mailchimp/2.0.1.2-beta/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/ecwid/ecwid-mailchimp/2.0.1.2-beta/ecwid-mailchimp-2.0.1.2-beta.pom
[warn] ==== sonatype-snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/ecwid/ecwid-mailchimp/2.0.1.2-beta/ecwid-mailchimp-2.0.1.2-beta.pom
[warn] ==== Maven2 Local: tried
[warn] file:/Users/jacek/.m2/repository/com/ecwid/ecwid-mailchimp/2.0.1.2-beta/ecwid-mailchimp-2.0.1.2-beta.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.ecwid#ecwid-mailchimp;2.0.1.2-beta: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.ecwid:ecwid-mailchimp:2.0.1.2-beta (/Users/jacek/sandbox/uri-authority/build.sbt#L7-10)
[warn] +- default:uri-authority_2.10:0.1-SNAPSHOT
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.ecwid#ecwid-mailchimp;2.0.1.2-beta: not found
[error] Total time: 1 s, completed Sep 30, 2014 11:39:21 PM
> update
[info] Updating {file:/Users/jacek/sandbox/uri-authority/}uri-authority...
[info] Resolving com.ecwid#ecwid-mailchimp;2.0.1.2-beta ...
[warn] module not found: com.ecwid#ecwid-mailchimp;2.0.1.2-beta
[warn] ==== local: tried
[warn] /Users/jacek/.ivy2/local/com.ecwid/ecwid-mailchimp/2.0.1.2-beta/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/ecwid/ecwid-mailchimp/2.0.1.2-beta/ecwid-mailchimp-2.0.1.2-beta.pom
[warn] ==== sonatype-snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/ecwid/ecwid-mailchimp/2.0.1.2-beta/ecwid-mailchimp-2.0.1.2-beta.pom
[warn] ==== Maven2 Local: tried
[warn] file:/Users/jacek/.m2/repository/com/ecwid/ecwid-mailchimp/2.0.1.2-beta/ecwid-mailchimp-2.0.1.2-beta.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.ecwid#ecwid-mailchimp;2.0.1.2-beta: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.ecwid:ecwid-mailchimp:2.0.1.2-beta (/Users/jacek/sandbox/uri-authority/build.sbt#L7-10)
[warn] +- default:uri-authority_2.10:0.1-SNAPSHOT
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: com.ecwid#ecwid-mailchimp;2.0.1.2-beta: not found
[error] Total time: 1 s, completed Sep 30, 2014 11:39:21 PM