Я создаю POC, где я пытаюсь загрузить зависимости из моего корпоративного репозитория (JFrog), где мой файл сборки: -
build.sbt: -
name := "sbt-test4"
version := "0.1"
scalaVersion := "2.12.8"
resolvers ++= Seq {
"Artifactory" at "https://someurl/artifactory/packagename"
}
credentials += Credentials(new File("credentials.properties"))
libraryDependencies += "ccp.mts.aerospike" % "mts-aerospike_2.12" % "0.2"
credentials.properties: -
realm=Artifactory Realm
host=https://<url>/artifactory
user=<user-id>
password=<password>
Теперь я выполняю следующие команды: -
java -Dhttp.proxyHost=162.158.20.9 -Dhttps.proxyHost=162.158.20.9
-Dhttp.proxyPort=8300 -Dhttps.proxyPort=8300 -Dhttp.nonProxyHosts="*.company.net" -Dhttps.nonProxyHosts="*.company.net" -jar C:\Users\xxxx.xxx034\.IntelliJIdea2018.2\config\plugins\Scala\launcher\sbt-launch.jar
>sbt update
эту информацию прокси, которую я пытался передать, используя саму команду и "sbtconfig.txt" и "sbtopts "files.
Четная информация, которую я передал через переменные evn, такие как: -
JAVA_OPTS = $ JAVA_OPTS -Dhttp.proxyHost = 162.158.20.9 -Dhttps.proxyHost = 162.158.20.9 -Dhttp.proxyPort = 8300 -Dhttps.proxyPort = 8300 -Dhttp.proxyUser = uid-Dhttp.proxyPassword = пароль -Dhttps.proxyUser = uid-Dhttps.proxyPassword = пароль
SBT_OPTS = $ SBT_pTh.pro162.158.20.9 -Dhttp.proxyPort = 8300 -Dhttp.proxyUser = uid -Dhttp.proxyPassword = пароль -Dhttps.proxyHost = 162.158.20.9 -Dhttps.proxyPort = 8300 -Dhttps.proxyUser = uid -Dasshttps.pro
но все-таки я не могу получитьзависимости от удаленных репозиториев.Я также упомянул: -
SBT 0.13.11 не может загрузить зависимости за прокси
И это журнал ошибок: -
[info] Set current project to sbt-test4 (in build file:/D:/workspace/scala-intellij/sbt-test4/)
[info] Updating ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: ccp.mts.aerospike#mts-aerospike_2.12;0.2: Artifactory: unable to get resource for ccp/mts/aerospike#mts-aerospike_2.12;0.2: res=https://xxxxxxxxxxxx/artifactory/xxxxxxxxx/ccp/mts/aerospike/mts-aerospike_2.12/0.2/mts-aerospike_2.12-0.2.pom: java.io.IOException: Unexpected response code for CONNECT: 502
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] ccp.mts.aerospike:mts-aerospike_2.12:0.2 (D:\workspace\scala-intellij\sbt-test4\build.sbt#L13-14)
[warn] +- default:sbt-test4_2.12:0.1
[error] sbt.librarymanagement.ResolveException: unresolved dependency: ccp.mts.aerospike#mts-aerospike_2.12;0.2: Artifactory: unable to get resource for ccp/mts/aerospike#mts-aerospike_2.12;0.2: res=https://xxxxxx/artifactory/xxxxxx/ccp/mts/aerospike/mts-aerospike_2.12/0.2/mts-aerospike_2.12-0.2.pom: java.io.IOException: Unexpected response code for CONNECT: 502
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2561)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: ccp.mts.aerospike#mts-aerospike_2.12;0.2: Artifactory: unable to get resource for ccp/mts/aerospike#mts-aerospike_2.12;0.2: res=https://xxxxxxx/artifactory/xxxxxxx/ccp/mts/aerospike/mts-aerospike_2.12/0.2/mts-aerospike_2.12-0.2.pom: java.io.IOException: Unexpected response code for CONNECT: 502
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:332)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:208)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2561)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (update) sbt.librarymanagement.ResolveException: unresolved dependency: ccp.mts.aerospike#mts-aerospike_2.12;0.2: Artifactory: unable to get resource for ccp/mts/aerospike#mts-aerospike_2.12;0.2: res=https://xxxxxxxx/artifactory/xxxxxxx/ccp/mts/aerospike/mts-aerospike_2.12/0.2/mts-aerospike_2.12-0.2.pom: java.io.IOException: Unexpected response code for CONNECT: 502
[error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: unresolved dependency: ccp.mts.aerospike#mts-aerospike_2.12;0.2: Artifactory: unable to get resource for ccp/mts/aerospike#mts-aerospike_2.12;0.2: res=https://xxxxxxxxxxx/artifactory/xxxxxxxxxxx/ccp/mts/aerospike/mts-aerospike_2.12/0.2/mts-aerospike_2.12-0.2.pom: java.io.IOException: Unexpected response code for CONNECT: 502
[error] Total time: 3 s, completed Feb 1, 2019 12:43:15 PM
[info] shutting down server
Picked up _JAVA_OPTIONS: -Xmx1024m
Здесь независимо от того, что URL (в журнале ошибок) использует sbt, чтобы загрузить загрузки, тот же URL, который я нажимаю в браузере, и после предоставления учетных данных пользователя я могу загрузить зависимости.
, пожалуйста, дайте мне знатьесли у кого-то есть решение для этого.