我试图使用Play的Typesafe激活器,但遇到了一个问题。我在一个公司网络上,通常使用oss nexus作为依赖代理。我已经下载了play,将其提取到磁盘根目录下的文件夹(C:activator)。当我试着运行它时,它没有得到任何地方,因为它无法到达maven或ivy存储库。
接下来,将存储库配置放在C:usersmyuser。Sbt repository,包含以下内容:
[repositories]
local
my-ivy-proxy-releases: http://myserver:8081/nexus/content/repositories/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
my-maven-proxy-releases: http://myserver:8081/nexus/content/groups/allreps/
跟随我从一些主题中阅读,也将。credentials文件放在C:usersmyuser.ivy.credentials
realm=Sonatype Nexus Repository Manager
host=myserver
user=admin
password=myadminpass
我可以从update .log中看到SBT识别我的nexus存储库并尝试使用它,但不使用我在.credentials中配置的凭据。
这是我的update .log
setting 'ivy.default.settings.dir' to 'jar:file:/C:/activator/activator-launch-1.3.2.jar!/org/apache/ivy/core/settings'
setting 'ivy.basedir' to 'C:WindowsSystem32.'
setting 'ivy.default.conf.dir' to 'jar:file:/C:/activator/activator-launch-1.3.2.jar!/org/apache/ivy/core/settings'
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.SshResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.VsftpResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.version.PatternVersionMatcher in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.trigger.LogTrigger in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.ant.AntBuildTrigger in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.IvyRepResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.signer.bouncycastle.OpenPGPSignatureGenerator in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.conflict.RegexpConflictManager in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.SFTPResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.osgi.updatesite.UpdateSiteResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.ant.AntCallTrigger in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.MirroredURLResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.packager.PackagerResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.DualResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.VfsResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.JarResolver in [] nor Ivy classloader
impossible to define new type: class not found: org.apache.ivy.osgi.obr.OBRResolver in [] nor Ivy classloader
impossible to define glob matcher: org.apache.ivy.plugins.matcher.GlobPatternMatcher was not found.
setting 'jline.esc.timeout' to '0'
setting 'java.runtime.name' to 'Java(TM) SE Runtime Environment'
setting 'sun.boot.library.path' to 'C:Program FilesJavajdk1.8.0_40jrebin'
setting 'java.vm.version' to '25.40-b25'
setting 'user.country.format' to 'PT'
setting 'activator.home' to '//C:/activator'
setting 'java.vm.vendor' to 'Oracle Corporation'
setting 'java.vendor.url' to 'http://java.oracle.com/'
setting 'path.separator' to ';'
setting 'java.vm.name' to 'Java HotSpot(TM) 64-Bit Server VM'
setting 'file.encoding.pkg' to 'sun.io'
setting 'user.country' to 'US'
setting 'user.script' to ''
setting 'sun.java.launcher' to 'SUN_STANDARD'
setting 'sun.os.patch.level' to ''
setting 'java.vm.specification.name' to 'Java Virtual Machine Specification'
setting 'user.dir' to 'C:WindowsSystem32'
setting 'java.runtime.version' to '1.8.0_40-b26'
setting 'java.awt.graphicsenv' to 'sun.awt.Win32GraphicsEnvironment'
setting 'java.endorsed.dirs' to 'C:Program FilesJavajdk1.8.0_40jrelibendorsed'
setting 'os.arch' to 'amd64'
setting 'java.io.tmpdir' to 'C:Usersnetona1AppDataLocalTemp'
setting 'line.separator' to '
'
setting 'java.vm.specification.vendor' to 'Oracle Corporation'
setting 'user.variant' to ''
setting 'os.name' to 'Windows 8.1'
setting 'sun.jnu.encoding' to 'Cp1252'
setting 'java.library.path' to 'C:Program FilesJavajdk1.8.0_40bin;C:WINDOWSSunJavabin;C:WINDOWSsystem32;C:WINDOWS;C:Program FilesJavajdk1.8.0_40bin;C:ProgramDataOracleJavajavapath;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;c:Program Files (x86)Enterprise VaultEVClient;C:devapache-maven-3.3.1bin;C:Program FilesTortoiseHg;C:Program Files (x86)Microsoft SQL Server100ToolsBinnVSShellCommon7IDE;C:Program Files (x86)Microsoft SQL Server100ToolsBinn;C:Program FilesMicrosoft SQL Server100ToolsBinn;C:Program Files (x86)Microsoft SQL Server100DTSBinn;C:Usersnetona1AppDataLocalAndroidandroid-sdkplatform-tools;C:Program FilesTortoiseGitbin;C:Program Filesnodejs;C:Program Files (x86)Gitcmd;C:activator;C:devpathstuff;C:Usersnetona1AppDataRoamingnpm;.'
setting 'java.specification.name' to 'Java Platform API Specification'
setting 'java.class.version' to '52.0'
setting 'sun.management.compiler' to 'HotSpot 64-Bit Tiered Compilers'
setting 'os.version' to '6.3'
setting 'user.home' to 'C:Usersnetona1'
setting 'user.timezone' to 'Europe/London'
setting 'java.awt.printerjob' to 'sun.awt.windows.WPrinterJob'
setting 'file.encoding' to 'Cp1252'
setting 'java.specification.version' to '1.8'
setting 'java.class.path' to 'C:activatoractivator-launch-1.3.2.jar'
setting 'user.name' to 'NETONA1'
setting 'jline.shutdownhook' to 'false'
setting 'java.vm.specification.version' to '1.8'
setting 'sun.java.command' to 'C:activatoractivator-launch-1.3.2.jar'
setting 'java.home' to 'C:Program FilesJavajdk1.8.0_40jre'
setting 'sun.arch.data.model' to '64'
setting 'user.language' to 'en'
setting 'java.specification.vendor' to 'Oracle Corporation'
setting 'user.language.format' to 'pt'
setting 'awt.toolkit' to 'sun.awt.windows.WToolkit'
setting 'java.vm.info' to 'mixed mode'
setting 'java.version' to '1.8.0_40'
setting 'java.ext.dirs' to 'C:Program FilesJavajdk1.8.0_40jrelibext;C:WINDOWSSunJavalibext'
setting 'sun.boot.class.path' to 'C:Program FilesJavajdk1.8.0_40jrelibresources.jar;C:Program FilesJavajdk1.8.0_40jrelibrt.jar;C:Program FilesJavajdk1.8.0_40jrelibsunrsasign.jar;C:Program FilesJavajdk1.8.0_40jrelibjsse.jar;C:Program FilesJavajdk1.8.0_40jrelibjce.jar;C:Program FilesJavajdk1.8.0_40jrelibcharsets.jar;C:Program FilesJavajdk1.8.0_40jrelibjfr.jar;C:Program FilesJavajdk1.8.0_40jreclasses'
setting 'java.vendor' to 'Oracle Corporation'
setting 'sun.stderr.encoding' to 'cp850'
setting 'file.separator' to ''
setting 'java.vendor.url.bug' to 'http://bugreport.sun.com/bugreport/'
setting 'sun.io.unicode.encoding' to 'UnicodeLittle'
setting 'sun.cpu.endian' to 'little'
setting 'sun.stdout.encoding' to 'cp850'
setting 'sun.desktop' to 'windows'
setting 'sun.cpu.isalist' to 'amd64'
setting 'ivy.default.ivy.user.dir' to 'C:Usersnetona1.ivy2'
setting 'ivy.home' to 'C:Usersnetona1.ivy2'
setting 'ivy.cache.dir' to 'C:Usersnetona1.ivy2cache'
no default cache defined: set to C:Usersnetona1.ivy2cache
setting 'ivy.checksums' to 'sha1,md5'
setting 'ivy.basedir' to 'C:Usersnetona1.sbtboot'
setting 'basedir' to 'C:Usersnetona1.sbtboot'
:: resolving dependencies :: org.scala-sbt#boot-jansi;1.0
confs: [default]
validate = true
refresh = false
resolving dependencies for configuration 'default'
== resolving dependencies for org.scala-sbt#boot-jansi;1.0 [default]
loadData of org.scala-sbt#boot-jansi;1.0 of rootConf=default
== resolving dependencies org.scala-sbt#boot-jansi;1.0->org.fusesource.jansi#jansi;1.11 [default->default(compile)]
loadData of org.fusesource.jansi#jansi;1.11 of rootConf=default
using redefined-public to resolve org.fusesource.jansi#jansi;1.11
redefined-public: Checking cache for: dependency: org.fusesource.jansi#jansi;1.11 {default=[default(compile)]}
redefined-public: no namespace defined: using system
no ivy file in cache for org.fusesource.jansi#jansi;1.11: tried C:Usersnetona1.ivy2cacheorg.fusesource.jansijansiivy-1.11.xml
redefined-public: no latest strategy defined: using default
local: no namespace defined: using system
no ivy file in cache for org.fusesource.jansi#jansi;1.11: tried C:Usersnetona1.ivy2cacheorg.fusesource.jansijansiivy-1.11.xml
trying C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11ivysivy.xml
tried C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11ivysivy.xml
local: resource not reachable for org.fusesource.jansi#jansi;1.11: res=C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11ivysivy.xml
trying C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11jarsjansi.jar
tried C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11jarsjansi.jar
local: resource not reachable for org.fusesource.jansi#jansi;1.11: res=C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11jarsjansi.jar
local: no ivy file nor artifact found for org.fusesource.jansi#jansi;1.11
my-ivy-proxy-releases: no namespace defined: using system
no ivy file in cache for org.fusesource.jansi#jansi;1.11: tried C:Usersnetona1.ivy2cacheorg.fusesource.jansijansiivy-1.11.xml
trying http://myserver:8081/nexus/content/repositories/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
tried http://myserver:8081/nexus/content/repositories/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
try to get credentials for: Sonatype Nexus Repository Manager@myserver
authentication: k='Sonatype Nexus Repository Manager@myserver' c='null'
HTTP response status: 401 url=http://myserver:8081/nexus/content/repositories/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
CLIENT ERROR: Unauthorized url=http://myserver:8081/nexus/content/repositories/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
my-ivy-proxy-releases: resource not reachable for org.fusesource.jansi#jansi;1.11: res=http://myserver:8081/nexus/content/repositories/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
my-ivy-proxy-releases: no ivy file found for org.fusesource.jansi#jansi;1.11
my-maven-proxy-releases: no namespace defined: using system
no ivy file in cache for org.fusesource.jansi#jansi;1.11: tried C:Usersnetona1.ivy2cacheorg.fusesource.jansijansiivy-1.11.xml
trying http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
tried http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
try to get credentials for: Sonatype Nexus Repository Manager@myserver
authentication: k='Sonatype Nexus Repository Manager@myserver' c='null'
HTTP response status: 401 url=http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
CLIENT ERROR: Unauthorized url=http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
my-maven-proxy-releases: resource not reachable for org/fusesource/jansi#jansi;1.11: res=http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
trying http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
tried http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
try to get credentials for: Sonatype Nexus Repository Manager@myserver
authentication: k='Sonatype Nexus Repository Manager@myserver' c='null'
HTTP response status: 401 url=http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
CLIENT ERROR: Unauthorized url=http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
my-maven-proxy-releases: resource not reachable for org/fusesource/jansi#jansi;1.11: res=http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
my-maven-proxy-releases: no ivy file nor artifact found for org.fusesource.jansi#jansi;1.11
WARN: module not found: org.fusesource.jansi#jansi;1.11
WARN: ==== local: tried
WARN: C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11ivysivy.xml
WARN: -- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
WARN: C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11jarsjansi.jar
WARN: ==== my-ivy-proxy-releases: tried
WARN: http://myserver:8081/nexus/content/repositories/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
WARN: ==== my-maven-proxy-releases: tried
WARN: http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
WARN: -- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
WARN: http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
Nbr of module to sort : 0
resolved ivy file produced in cache
:: downloading artifacts ::
:: resolution report :: resolve 360ms :: artifacts dl 0ms
WARN: ::::::::::::::::::::::::::::::::::::::::::::::
WARN: :: UNRESOLVED DEPENDENCIES ::
WARN: ::::::::::::::::::::::::::::::::::::::::::::::
WARN: :: org.fusesource.jansi#jansi;1.11: not found
WARN: ::::::::::::::::::::::::::::::::::::::::::::::
Nbr of module to sort : 0
report for org.scala-sbt#boot-jansi;1.0 default produced in C:Usersnetona1.sbtbootresolution-cacheorg.scala-sbt-boot-jansi-default.xml
resolve done (360ms resolve - 0ms download)
:: problems summary ::
:::: WARNINGS
module not found: org.fusesource.jansi#jansi;1.11
==== local: tried
C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11ivysivy.xml
-- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
C:Usersnetona1.ivy2localorg.fusesource.jansijansi1.11jarsjansi.jar
==== my-ivy-proxy-releases: tried
http://myserver:8081/nexus/content/repositories/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
==== my-maven-proxy-releases: tried
http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
-- artifact org.fusesource.jansi#jansi;1.11!jansi.jar:
http://myserver:8081/nexus/content/groups/allreps/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.fusesource.jansi#jansi;1.11: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
java.lang.RuntimeException: not found
at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:238)
at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:292)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:714)
at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:799)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:722)
at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:594)
at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:234)
at xsbt.boot.Update.xsbt$boot$Update$$lockedApply(Update.scala:106)
at xsbt.boot.Update$$anon$4.call(Update.scala:100)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at xsbt.boot.Update.apply(Update.scala:101)
at xsbt.boot.Launch.update(Launch.scala:352)
at xsbt.boot.Launch$$anonfun$jansiLoader$1.apply(Launch.scala:178)
at scala.Option.getOrElse(Option.scala:120)
at xsbt.boot.Launch.jansiLoader$2f324eef(Launch.scala:173)
at xsbt.boot.Launch.<init>(Launch.scala:150)
at xsbt.boot.Launcher$.apply(Launch.scala:366)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: Error retrieving required libraries
at xsbt.boot.Pre$.error(Pre.scala:26)
at xsbt.boot.Update.xsbt$boot$Update$$lockedApply(Update.scala:106)
at xsbt.boot.Update$$anon$4.call(Update.scala:100)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at xsbt.boot.Update.apply(Update.scala:101)
at xsbt.boot.Launch.update(Launch.scala:352)
at xsbt.boot.Launch$$anonfun$jansiLoader$1.apply(Launch.scala:178)
at scala.Option.getOrElse(Option.scala:120)
at xsbt.boot.Launch.jansiLoader$2f324eef(Launch.scala:173)
at xsbt.boot.Launch.<init>(Launch.scala:150)
at xsbt.boot.Launcher$.apply(Launch.scala:366)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: Error retrieving required libraries
谁能告诉我正确的配置是什么?我仍然无法通过激活器安装步骤
您需要在插件中添加这一行。SBT(位于/project/plugins.sbt)文件:
credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
另外,为了从你的仓库中获取插件,你需要传递-Dsbt.override.build。调用activator或sbt时Repos =true。您可以设置环境变量SBT_OPTS,例如:
SBT_OPTS="-Dsbt.override.build.repos=true"
如果你遇到任何问题,请告诉我。祝你好运