sbt fails to download jna-4.1.0.jar Connection reset - scala

I have a new SBT/Scala setup with an existing Play/Scala project. When I try and run activator clean in the folder, I get the error below:
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo1.maven.org/maven2/net/java/dev/jna/jna/4.1.0/jna
-4.1.0.jar ...
[warn] [FAILED ] net.java.dev.jna#jna;4.1.0!jna.jar: Connection reset (1178
4ms)
[warn] [FAILED ] net.java.dev.jna#jna;4.1.0!jna.jar: (0ms)
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/net.java.dev.jna/jna/4.
1.0/jars/jna.jar
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/net.java.dev.jn
a/jna/4.1.0/jars/jna.jar
[warn] ==== local: tried
[warn] C:\Users\xxxxxxxxxxxx\.ivy2\local\net.java.dev.jna\jna\4.1.0\jars\jna.
jar
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar
[warn] ==== activator-launcher-local: tried
[warn] C:\Projects\xxxxxxxxxxxx\repository\net.java.dev.j
na\jna\4.1.0\jars\jna.jar
[warn] ==== typesafe-releases: tried
[warn] https://repo.typesafe.com/typesafe/releases/net/java/dev/jna/jna/4.1.0/
jna-4.1.0.jar
[warn] ==== typesafe-ivy-releasez: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/net.java.dev.jna/jna/4.
1.0/jars/jna.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: net.java.dev.jna#jna;4.1.0!jna.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: download failed: net.java.dev.jna#jna;4.1.0!jna.jar
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRet
ries$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 sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:128)
at sbt.IvySbt.withIvy(Ivy.scala:125)
at sbt.IvySbt$Module.withModule(Ivy.scala:156)
at sbt.IvyActions$.updateEither(IvyActions.scala:168)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala
:1439)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala
:1435)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$90.apply(Defaults.scala:1
470)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$90.apply(Defaults.scala:1
468)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1473)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1467)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1490)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1417)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1369)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:22
8)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:22
8)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestric
tions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51
1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: download failed: net.java.dev.jna#jna;4
.1.0!jna.jar
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
If I try and paste the URL https://repo1.maven.org/maven2/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar for the jar in my browser, I am able to download the jar.
I tried to delete both .sbt and .ivy folders and then ran the command again, but got the same error.
Not sure what is going on?
Thanks in advance.
Update
I ran the build from activator UI and enabled debug output. Here is what I found:
Activator first tries to download https://repo.typesafe.com/typesafe/ivy-releases/net.java.dev.jna/jna/4.1.0/jars/jna.jar
which really does not exist. Copy and paste the URL in a browser, and it says not found.
It then tries https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/net.java.dev.jna/jna/4.1.0/jars/jna.jar and fails for the same reason.
It then tries https://repo1.maven.org/maven2/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar which succeeds and it starts to download, but fails with the error below:
[info] downloading https://repo1.maven.org/maven2/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar ...
downloading https://repo1.maven.org/maven2/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar ...
public: downloading https://repo1.maven.org/maven2/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar
[warn] [FAILED ] net.java.dev.jna#jna;4.1.0!jna.jar: Connection reset (22821ms)
[FAILED ] net.java.dev.jna#jna;4.1.0!jna.jar: Connection reset (22821ms)
tried http://repo.typesafe.com/typesafe/releases/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar
CLIENT ERROR: Not Found url=http://repo.typesafe.com/typesafe/releases/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar
tried http://repo.typesafe.com/typesafe/ivy-releases/net.java.dev.jna/jna/4.1.0/jars/jna.jar
CLIENT ERROR: Not Found url=http://repo.typesafe.com/typesafe/ivy-releases/net.java.dev.jna/jna/4.1.0/jars/jna.jar
Not sure whats causing that connection reset?
UPDATE 2: It turns out that the jar in question, has a DLL file in it. I'm wondering if it is the Netscaler/Antivirus that is causing the issue. Have logged a call with the Network admins.

I can get information that you did not set the Local Maven Repository as one of your repositories which means your sbt project will not search the dependency in your local maven repository which is a place that storing your maven dependency jars. If your sbt project can not download the jar from internet by itself. You can give a help by doing the following things:
First, add the following statement in your build.sbt
resolvers += ("Local Maven Repository" at "file:///"+Path.userHome.absolutePath+"/.m2/repository")
Second, download the dependency jar by yourself from maven repository. As for your question, the download link is there
Then, publish the jar to your local maven repository by using the following command assuming that the jar file is in the directory ~
mvn install:install-file -Dfile=~/jna-4.1.0.jar -DgroupId=net.java.dev.jna -DartifactId=jna -Dversion=4.1.0 -Dpackaging=jar
Lastly, refresh your sbt project.
if you find mvn command not found, please install it.
A reference which I gived answer to another question may help you.
Good luck

Related

Proxy settings for SBT from IntelliJ

I am trying to use Scala/Spark from IntelliJ in Windows 7, but it IntelliJ (and SBT command line) fails to download files. I am behind a proxy server.
[info] Updating {file:/D:/Users/user1/IdeaProjects/untitled17/project/}untitled17-build...
[warn] [FAILED ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): typesafe-ivy-releases: unable to get resource for org.apache.logging.log4j#log4j-core;2.8.1: res=https://repo.typesafe.com/typesafe/ivy-releases/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar: java.io.IOException: Failed to authenticate with proxy (452ms)
[warn] [FAILED ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): sbt-plugin-releases: unable to get resource for org.apache.logging.log4j#log4j-core;2.8.1: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar: java.io.IOException: Failed to authenticate with proxy (157ms)
[warn] [FAILED ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): public: unable to get resource for org/apache/logging/log4j#log4j-core;2.8.1: res=https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar: java.io.IOException: Failed to authenticate with proxy (115ms)
[warn] Detected merged artifact: [FAILED ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar): (0ms).
[warn] ==== typesafe-ivy-releases: tried
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar
[warn] ==== local: tried
[warn] d:\Users\user1\.ivy2\local\org.apache.logging.log4j\log4j-core\2.8.1\test-jars\log4j-core-tests.jar
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar
[warn] ==== local-preloaded-ivy: tried
[warn] d:\Users\user1\.sbt\preloaded\org.apache.logging.log4j\log4j-core\2.8.1\test-jars\log4j-core-tests.jar
[warn] ==== local-preloaded: tried
[warn] file:/d:/Users/user1/.sbt/preloaded/org/apache/logging/log4j/log4j-core/2.8.1/log4j-core-2.8.1-tests.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] sbt.librarymanagement.ResolveException: download failed: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
Similar problems were already reported here.
Already tried:
SBT versions 0.13.16, 1.0.3 and 1.1.1
setting proxy properties JAVA_OPTS, SBT_OPTS, sbtconfigtxt
-Dhttp.proxyHost=*
-Dhttp.proxyPort=*
-Dhttp.proxyUser=*
-Dhttp.proxyPassword=*
-Dhttps.proxyHost=*
-Dhttps.proxyPort=*
-Dhttps.proxyUser=*
-Dhttps.proxyPassword=*
without success
verified the issue in SBT:
d:\Users\user1>sbt.bat
[info] Loading project definition from D:\Users\user1\project
[info] Updating {file:/D:/Users/user1/project/}user1-build...
[warn] [FAILED ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(t
est-jar): typesafe-ivy-releases: unable to get resource for org.apache.logging.l
og4j#log4j-core;2.8.1: res=https://repo.typesafe.com/typesafe/ivy-releases/org.a
pache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar: java.io.IOE
xception: Failed to authenticate with proxy (353ms)
[warn] [FAILED ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(t
est-jar): sbt-plugin-releases: unable to get resource for org.apache.logging.log
4j#log4j-core;2.8.1: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases
/org.apache.logging.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar: java.
io.IOException: Failed to authenticate with proxy (8ms)
[warn] [FAILED ] org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(t
est-jar): public: unable to get resource for org/apache/logging/log4j#log4j-core
;2.8.1: res=https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2
.8.1/log4j-core-2.8.1-tests.jar: java.io.IOException: Failed to authenticate wit
h proxy (8ms)
[warn] Detected merged artifact: [FAILED ] org.apache.logging.log4j#log4j-c
ore;2.8.1!log4j-core.jar(test-jar): (0ms).
[warn] ==== typesafe-ivy-releases: tried
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.apache.logg
ing.log4j/log4j-core/2.8.1/test-jars/log4j-core-tests.jar
[warn] ==== local: tried
[warn] d:\Users\user1\.ivy2\local\org.apache.logging.log4j\log4j-core\2.8.1\
test-jars\log4j-core-tests.jar
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.8.
1/log4j-core-2.8.1-tests.jar
[warn] ==== local-preloaded-ivy: tried
[warn] d:\Users\user1\.sbt\preloaded\org.apache.logging.log4j\log4j-core\2.8
.1\test-jars\log4j-core-tests.jar
[warn] ==== local-preloaded: tried
[warn] file:/d:/Users/user1/.sbt/preloaded/org/apache/logging/log4j/log4j-co
re/2.8.1/log4j-core-2.8.1-tests.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.apache.logging.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] sbt.librarymanagement.ResolveException: download failed: org.apache.logg
ing.log4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve
(IvyActions.scala:331)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEit
her$1(IvyActions.scala:205)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withMod
ule$1(Ivy.scala:229)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.
scala:190)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$libraryman
agement$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$$withCh
annelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Lock
s.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.scal
a: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.s
cala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:185)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:182)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.s
cala:228)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyAc
tions.scala:190)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyD
ependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyR
esolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.s
cala:38)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(Libr
aryManagement.scala:91)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(Libr
aryManagement.scala:104)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(Libr
aryManagement.scala:104)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adap
ted(LibraryManagement.scala:87)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagemen
t.scala:118)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFuncti
ons.scala:42)
[error] at sbt.std.Transform$$anon$4.work(System.scala:64)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.sc
ala:16)
[error] at sbt.Execute.work(Execute.scala:266)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(Con
currentRestrictions.scala:167)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:32
)
[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(ThreadPoolE
xecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool
Executor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? [error] (*:update)
sbt.librarymanagement.ResolveException: download failed: org.apache.logging.log
4j#log4j-core;2.8.1!log4j-core.jar(test-jar)
If you're convinced that this is a proxy issue (and not, say, a temporary network connection problem), then here are your alternatives...
As you mention, you can define a JVM_OPTS environment variable specifying JVM proxy configuration options. Just to be clear, it's best if this is defined globally (via the Environment Variables dialog in the Windows System applet, since it looks like you're using Windows). If you're not sure how to do this, let me know. It's important to realize that your existing processes will not pick up changes made to global environment variables - the simplest solution is just to close and restart them.
Another alternative is to put the JVM options into a .jvmopts file in the root folder of your SBT project. (It's a good idea to put project-specific JVM options in this file, but not such a good idea to put machine- or site-specific options - such as proxy settings - into such a file. Clearly, if you need login credentials to configure your proxy, don't go this route!) If you pick this option, you need one setting on each line of the file. SBT will read any such settings each time it runs.
Either way, it's not clear from your question whether you have specified the JVM proxy settings correctly, since * is not a valid value for any of them. (If you've just used * to replace your actual settings, fair enough.) You'll know best what your proxy settings should be, but - if you have setup system proxy settings for your machine in Windows - often the simplest way to configure Java applications to use a proxy is to use the following setting:
JAVA_OPTS=-Djava.net.useSystemProxies=true
or create a .jvmopts file with these contents:
-Djava.net.useSystemProxies=true
If you haven't set up system proxy information, you'll need to be more explicit:
JAVA_OPTS=-Dhttp.proxyHost=my.proxyhost.com -Dhttp.proxyPort=80 -Dhttps.proxyHost=my.proxyhost.com -Dhttps.proxyPort=443
or, in .jvmopts:
-Dhttp.proxyHost=my.proxyhost.com
-Dhttp.proxyPort=80
-Dhttps.proxyHost=my.proxyhost.com
-Dhttps.proxyPort=443
Note also that if your proxy uses SOCKS instead of HTTP, then the relevant settings will be:
JAVA_OPTS=-DsocksProxyHost=my.proxyhost.com -DsocksProxyPort=8080
or, in .jvmopts:
-DsocksProxyHost=my.proxyhost.com
-DsocksProxyPort=8080
Obviously, you'll need to replace these host addresses and port numbers with those for your proxy. (If your domain authenticates you to the proxy server, you shouldn't need to specify username and password settings.)
That should ensure SBT works from the command line, and for the occasions that you execute SBT tasks from within IntelliJ (as a run configuration).
However, IntelliJ also has it's own proxy settings, which it uses when running SBT internally. You'll need to configure this too. You can access the IntelliJ proxy settings via the File/Settings... menu option, then looking under Appearance & Behavior/System Settings/HTTP Proxy (or type 'proxy' into the setting search box):
Let me know how you get on...
For me, proxy settings (no matter if they were set at Intellij, SBT.conf or environment variables), did not work.
​A couple of considerations that solved this issue (for me at least):
​
​- if you use SBT 0.13.16 (not newer that that)
​- set Use Auto Import
​
​Then, no "FAILED DOWNLOADS" messages appear.

SBT cannot resolve dependency on AWS EC2 instance to 3rd party repository over HTTPS

I installed SBT on my EC2 instance.
In my last commit I added new dependency - Flyway. It uses 3rd party repository - https://flywaydb.org/repo
When I run sbt run on EC2 I get ssl error:
[error] Server access Error: Received fatal alert: handshake_failure url=https://flywaydb.org/repo/org/flywaydb/flyway-sbt_2.10_0.13/4.0/flyway-sbt-4.0.pom
It works on my dev PC.
I tried:
exporting cert from flywaydb.org site and adding it to my keystore on EC2. No luck
updating java from 1.7 to 1.8
upgrading packages of Amazon Linux
I ran out of ideas. Why it might not work on EC2?
info] Loading project definition from /home/ec2-user/backendgenerated/project
[info] Updating {file:/home/ec2-user/backendgenerated/project/}backendgenerated-build...
[info] Resolving org.flywaydb#flyway-sbt;4.0 ...
[error] Server access Error: Received fatal alert: handshake_failure url=https://flywaydb.org/repo/org/flywaydb/flyway-sbt_2.10_0.13/4.0/flyway-sbt-4.0.pom
[warn] module not found: org.flywaydb#flyway-sbt;4.0
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/org.flywaydb/flyway-sbt/scala_2.10/sbt_0.13/4.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.flywaydb/flyway-sbt/scala_2.10/sbt_0.13/4.0/ivys/ivy.xml
[warn] ==== local: tried
[warn] /home/ec2-user/.ivy2/local/org.flywaydb/flyway-sbt/scala_2.10/sbt_0.13/4.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/flywaydb/flyway-sbt_2.10_0.13/4.0/flyway-sbt-4.0.pom
[warn] ==== Flyway: tried
[warn] https://flywaydb.org/repo/org/flywaydb/flyway-sbt_2.10_0.13/4.0/flyway-sbt-4.0.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.flywaydb#flyway-sbt;4.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] org.flywaydb:flyway-sbt:4.0 (scalaVersion=2.10, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.flywaydb:flyway-sbt:4.0 (scalaVersion=2.10, sbtVersion=0.13) (/home/ec2-user/backendgenerated/project/plugins.sbt#L13-14)
[warn] +- default:backendgenerated-build:0.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
sbt.ResolveException: unresolved dependency: org.flywaydb#flyway-sbt;4.0: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
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 sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:128)
at sbt.IvySbt.withIvy(Ivy.scala:125)
at sbt.IvySbt$Module.withModule(Ivy.scala:156)
at sbt.IvyActions$.updateEither(IvyActions.scala:168)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1439)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1435)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$90.apply(Defaults.scala:1470)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$90.apply(Defaults.scala:1468)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1473)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1467)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1490)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1417)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1369)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.flywaydb#flyway-sbt;4.0: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
In the end I created new EC2 instance with Ubuntu AMI, installed newest scala, newest sbt and it just worked.

Installing sbt-eclipse - unresolved dependency: com.typesafe.sbt

I'm trying to get started with the Lift framework using these instructions and installing the sbt-eclipse plugin is giving me problems. First, I did this on my Ubuntu 14.04 computer to install sbt:
wget http://apt.typesafe.com/repo-deb-build-0002.deb
sudo dpkg -i repo-deb-build-0002.deb
sudo apt-get update
sudo apt-get install sbt
The install worked. Then I went to /home/johnmichaelreed/.sbt/0.13 and created a file called "plugins.sbt" and copy-pasted in:
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
Now before I created that file, I could run "sbt" in the terminal without errors and exit. But after adding it, I had problems with that dependency.
I downloaded Lift 2.6 TAR and in the sample app lift_basic I opened "/project/" and "build.properties" and inside that file I made it say:
sbt.version=0.13.7
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
When I ran .sbt in the lift_basic app folder or "sbt" (no dot), I got this ugly message...
user#computer:~/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic$ ls
build.sbt project sbt-launch-0.13.8.jar
console.devmode.log sbt src
lift_proto.db.mv.db sbt.bat target
user#computer:~/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic$ ./sbt
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
[info] Loading project definition from /home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/project
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * com.typesafe.sbteclipse:sbteclipse-plugin:3.0.0 -> 4.0.0
[warn] Run 'evicted' to see detailed eviction warnings
[info] Set current project to Lift 2.6 starter template (in build file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/)
[info] Updating {file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/}lift_basic...
[info] Resolving com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0 ...
[warn] module not found: com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0
[warn] ==== local: tried
[warn] /home/johnmichaelreed/.ivy2/local/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.11/sbt_0.13/3.0.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/3.0.0/sbteclipse-plugin-3.0.0.pom
[warn] ==== snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/3.0.0/sbteclipse-plugin-3.0.0.pom
[warn] ==== staging: tried
[warn] https://oss.sonatype.org/content/repositories/staging/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/3.0.0/sbteclipse-plugin-3.0.0.pom
[warn] ==== releases: tried
[warn] https://oss.sonatype.org/content/repositories/releases/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/3.0.0/sbteclipse-plugin-3.0.0.pom
[info] Resolving org.eclipse.jetty.orbit#javax.transaction;1.1.1.v201105210645 .[info] Resolving org.eclipse.jetty.orbit#javax.mail.glassfish;1.4.1.v20100508202[info] Resolving org.eclipse.jetty.orbit#javax.activation;1.1.0.v201105071233 ..[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.typesafe.sbteclipse:sbteclipse-plugin:3.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.typesafe.sbteclipse:sbteclipse-plugin:3.0.0 (scalaVersion=2.11, sbtVersion=0.13) (/home/johnmichaelreed/.sbt/0.13/plugins.sbt#L1-2)
[warn] +- net.liftweb:lift-2-6-starter-template_2.11:0.0.4
sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:175)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:157)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:128)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56)
at sbt.IvySbt$$anon$4.call(Ivy.scala:64)
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 sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
at sbt.IvySbt.withIvy(Ivy.scala:123)
at sbt.IvySbt.withIvy(Ivy.scala:120)
at sbt.IvySbt$Module.withModule(Ivy.scala:151)
at sbt.IvyActions$.updateEither(IvyActions.scala:157)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1318)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1315)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1345)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1343)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1348)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1342)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1300)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1275)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
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.typesafe.sbteclipse#sbteclipse-plugin;3.0.0: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
user#computer:~/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic$ ./sbt
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
[info] Loading project definition from /home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/project
[info] Updating {file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/project/}lift_basic-build...
[info] Resolving org.scala-sbt.ivy#ivy;2.3.0-sbt-fccfbd44c9f64523b61398a0155784d[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to Lift 2.6 starter template (in build file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/)
[info] Updating {file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/}lift_basic...
[info] Resolving com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0 ...
[warn] module not found: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0
[warn] ==== local: tried
[warn] /home/johnmichaelreed/.ivy2/local/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.11/sbt_0.13/4.0.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/4.0.0/sbteclipse-plugin-4.0.0.pom
[warn] ==== snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/4.0.0/sbteclipse-plugin-4.0.0.pom
[warn] ==== staging: tried
[warn] https://oss.sonatype.org/content/repositories/staging/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/4.0.0/sbteclipse-plugin-4.0.0.pom
[warn] ==== releases: tried
[warn] https://oss.sonatype.org/content/repositories/releases/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/4.0.0/sbteclipse-plugin-4.0.0.pom
[info] Resolving org.eclipse.jetty.orbit#javax.transaction;1.1.1.v201105210645 .[info] Resolving org.eclipse.jetty.orbit#javax.mail.glassfish;1.4.1.v20100508202[info] Resolving org.eclipse.jetty.orbit#javax.activation;1.1.0.v201105071233 ..[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13) (/home/johnmichaelreed/.sbt/0.13/plugins.sbt#L1-2)
[warn] +- net.liftweb:lift-2-6-starter-template_2.11:0.0.4
sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:175)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:157)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:128)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56)
at sbt.IvySbt$$anon$4.call(Ivy.scala:64)
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 sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
at sbt.IvySbt.withIvy(Ivy.scala:123)
at sbt.IvySbt.withIvy(Ivy.scala:120)
at sbt.IvySbt$Module.withModule(Ivy.scala:151)
at sbt.IvyActions$.updateEither(IvyActions.scala:157)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1318)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1315)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1345)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1343)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1348)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1342)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1300)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1275)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
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.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
And then I tried again...
user#computer:~/Desktop/sbt_home$ sbt eclipse
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
error: error while loading CharSequence, class file '/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar(java/lang/CharSequence.class)' is broken
(bad constant pool tag 18 at byte 10)
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i
[warn] Ignoring load failure: no project loaded.
[error] Not a valid command: eclipse (similar: help, alias)
[error] eclipse
[error] ^
user#computer:~/Desktop/sbt_home$
How do I make my Lift Eclipse sbt-project work?
You have to add a resolver for this :
try using
resolvers ++= Seq(
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
)
resolvers += Resolver.sonatypeRepo("releases")
It worked for me.!
In the console, I see that sbt is trying to pull two versions of sbt-eclipse. Please make sure you are using only version, check:
plugins/plugin.sbt
plugins/project/plugin.sbt
PROJECT_DIR/plugin.sbt
For simplicity you can just use only one plugin.sbt (../plugins/plugin.sbt) and delete others.
com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0: not found
and
com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
Make sure that your sbt-eclipse version is compatible with version of scala and sbt in you machine.
Eg: sbt-eclipse verion 4.0.0 is compatible with (scalaVersion=2.11, sbtVersion=0.13).

Unresolved dependencies errors when trying to build self-contained application with Scala + Spark

I am trying to follow the Self-Contained Applications Tutorial and trying to build using sbt and scala, but I run into the following errors when calling sbt package from C:\Users\00926133\test:
[info] Set current project to Simple Project (in build file:/C:/Users/00926133/test/)
[info] Updating {file:/C:/Users/00926133/test/}test...
[info] Resolving org.scala-lang#scala-library;2.10.4 ...
[info] Resolving org.scala-lang#scala-library;2.10.4 ...
[error] Unable to find credentials for [ # XXXX].
[info] Resolving org.apache.spark#spark-core_2.10;1.4.0 ...
[info] Resolving org.apache.spark#spark-core_2.10;1.4.0 ...
[info] Resolving org.scala-lang#scala-compiler;2.10.4 ...
[info] Resolving org.scala-lang#scala-compiler;2.10.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scala-lang#scala-library;2.10.4: java.util.NoSuchElementException
[warn] :: org.apache.spark#spark-core_2.10;1.4.0: java.util.NoSuchElementException
[warn] :: org.scala-lang#scala-compiler;2.10.4: java.util.NoSuchElementException
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scala-lang:scala-library:2.10.4 ((sbt.Classpaths) Defaults.scala#L1203)
[warn] +- simple-project:simple-project_2.10:1.0
[warn] org.apache.spark:spark-core_2.10:1.4.0 (C:\Users\00926133\test\simple.sbt#L7-8)
[warn] +- simple-project:simple-project_2.10:1.0
[warn] org.scala-lang:scala-compiler:2.10.4
[warn] +- simple-project:simple-project_2.10:1.0
sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.10.4: java.util.NoSuchElementException
unresolved dependency: org.apache.spark#spark-core_2.10;1.4.0: java.util.NoSuchElementException
unresolved dependency: org.scala-lang#scala-compiler;2.10.4: java.util.NoSuchElementException
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:291)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:188)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:165)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:132)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
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 sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:127)
at sbt.IvySbt.withIvy(Ivy.scala:124)
at sbt.IvySbt$Module.withModule(Ivy.scala:155)
at sbt.IvyActions$.updateEither(IvyActions.scala:165)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1369)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1365)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$87.apply(Defaults.scala:1399)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$87.apply(Defaults.scala:1397)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1402)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1396)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1419)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1348)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1310)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.10.4: java.util.NoSuchElementException
[error] unresolved dependency: org.apache.spark#spark-core_2.10;1.4.0: java.util.NoSuchElementException
[error] unresolved dependency: org.scala-lang#scala-compiler;2.10.4: java.util.NoSuchElementException
[error] Total time: 1 s, completed Jun 26, 2015 9:13:40 AM
I have been successful in running spark-shell and scala, as well as the spark examples for python and R. I have also tried removing the .ivy folder.
My simple.sbt file:
name := "Simple Project"
version := "1.0"
scalaVersion := "2.10.4"
libraryDependencies += "org.apache.spark" % "spark-core_2.10" % "1.4.0"
Other Information
scala -version == 2.10.4
sbt sbt-version == 0.13.8
My simple.sbt file is located at C:\Users\00926133\test
SimpleApp.scala is located at C:\Users\00926133\test\src\main\scala
Spark is residing at C:\Users\00926133\spark-1.4.0-bin-hadoop2.6
I have looked through several Stack Overflow posts, but none of the solutions shown there seem to get me any traction.
UPDATE
I was able to confirm this is a proxy related issue. However, I am still unable to build behind my proxy. This is on Windows and I have the following:
Environment Variables
SBT_OPTS = -Dhttp.proxyHost=<myhost> -Dhttp.proxyPort=<myport> -Dhttp.proxyUser=<myuser> -Dhttp.proxyPassword=<mypassword> -Dhttps.proxyHost=<myhost> -Dhttps.proxyPort=<myport> -Dhttps.proxyUser=<myuser> -Dhttps.proxyPassword=<mypassword>
JAVA_OPTS = -Dhttp.proxyHost=<myhost> -Dhttp.proxyPort=<myport> -Dhttp.proxyUser=<myuser> -Dhttp.proxyPassword=<mypassword> -Dhttps.proxyHost=<myhost> -Dhttps.proxyPort=<myport> -Dhttps.proxyUser=<myuser> -Dhttps.proxyPassword=<mypassword>
I also add the following lines to my sbtconfig.txt located under ..\sbt\conf:
-Dhttp.proxyHost=<myhost>
-Dhttp.proxyPort=<myport>
-Dhttp.proxyUser=<myuser>
-Dhttp.proxyPassword=<mypassword>
-Dhttps.proxyHost=<myhost>
-Dhttps.proxyPort=<myport>
-Dhttps.proxyUser=<myuser>
-Dhttps.proxyPassword=<mypassword>
Bonus points for anyone who can (a) explain in layman's terms what sbt package is doing, (b) how to interpret the simple.sbt file, and/or (c) figure out how to resolve [error] Unable to find credentials for [ # XXXX ] -- XXXX is my work's proxy-server.
I found the source code to your first error (chronologically) in the SBT source code accompanied with the comment "We're guaranteed to only get here if Ivy's authentication fails". Since the remaining errors are an inability to find dependencies, it looks like the proxy is causing the problem.
Did you see the question How to use sbt from behind proxy? Did you try those steps?
Ivy is used by SBT to cache dependencies locally, so that once you've fetched a particular version of a particular dependency you won't have to go to the Internet to fetch it again. In Windows, you can see the contents of your Ivy cache at C:\Users\<User Name>\.ivy2
It looks like SBT's inability to get through your company's proxy is causing it to be unable to fetch third party dependencies, thus causing the build to fail. If you haven't already tried that, try setting the proxy configuration on the SBT command line or in environment variables. Since you're using Windows, just add -Dhttp.proxyHost=yourserver -Dhttp.proxyPort=port ... to the SBT command line. Make sure you add all of the required parameters, depending on what the proxy requires. (Does it require a username/password?)
SBT is Scala's "Simple Build Tool." SBT files are written in Scala. The classes in SBT have operators defined that cause the build actions you request based on your build file. When you run sbt package you're asking the build tool to build and package the current project.
The Spark quick start explains the simple.sbt file at a high level. Generally, the SBT build file gives a project name and version, defines the required Scala version, lists third party dependencies, and generally speaking defines everything needed for the entire build and packaging process.

Sbt keeps saying ensime 0.1.5 SNAPSHOT not found, when I'm not using the snapshot

I got the following error when trying to build a LiftWeb 2.6 basic project
sbt.ResolveException: unresolved dependency: org.ensime#ensime-sbt;0.1.5-SNAPSHOT: not found
And thought, alright I'll go into ~/.sbt/0.13/plugins/plugins.sbt and change
addSbtPlugin("org.ensime" % "ensime-sbt" % "0.1.5-SNAPSHOT")
to
addSbtPlugin("org.ensime" % "ensime-sbt" % "0.1.5")
I re-ran sbt in the project and once again got the same error, I even tried to run sbt update but that didn't seem to do anything either.
So now I've been fighting with this thing for a good 15 minutes and it keeps giving me that error, preventing me from continuing starting the project. What do I need to do?
I'm using SBT 0.13.7
Here's the full sbt output in case someone's wondering:
╓[ElectricCoffee]─[CoffeeBook-Pro.local]─[2015-04-20, 19:58]─[~/Code/web/test]
╙[$]-[sbt
[info] Loading global plugins from /Users/ElectricCoffee/.sbt/0.13/plugins
[info] Loading project definition from /Users/ElectricCoffee/Code/web/test/project
[info] Set current project to Lift 2.6 starter template (in build file:/Users/ElectricCoffee/Code/web/test/)
[info] Updating {file:/Users/ElectricCoffee/Code/web/test/}test...
[info] Resolving org.ensime#ensime-sbt;0.1.5-SNAPSHOT ...
[warn] module not found: org.ensime#ensime-sbt;0.1.5-SNAPSHOT
[warn] ==== local: tried
[warn] /Users/ElectricCoffee/.ivy2/local/org.ensime/ensime-sbt/scala_2.11/sbt_0.13/0.1.5-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/ensime/ensime-sbt_2.11_0.13/0.1.5-SNAPSHOT/ensime-sbt-0.1.5-SNAPSHOT.pom
[warn] ==== sonatype-snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/org/ensime/ensime-sbt_2.11_0.13/0.1.5-SNAPSHOT/ensime-sbt-0.1.5-SNAPSHOT.pom
[warn] ==== snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/org/ensime/ensime-sbt_2.11_0.13/0.1.5-SNAPSHOT/ensime-sbt-0.1.5-SNAPSHOT.pom
[warn] ==== staging: tried
[warn] https://oss.sonatype.org/content/repositories/staging/org/ensime/ensime-sbt_2.11_0.13/0.1.5-SNAPSHOT/ensime-sbt-0.1.5-SNAPSHOT.pom
[warn] ==== releases: tried
[warn] https://oss.sonatype.org/content/repositories/releases/org/ensime/ensime-sbt_2.11_0.13/0.1.5-SNAPSHOT/ensime-sbt-0.1.5-SNAPSHOT.pom
[info] Resolving jline#jline;2.12 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.ensime#ensime-sbt;0.1.5-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] org.ensime:ensime-sbt:0.1.5-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.11)
[warn]
sbt.ResolveException: unresolved dependency: org.ensime#ensime-sbt;0.1.5-SNAPSHOT: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51)
at sbt.IvySbt$$anon$3.call(Ivy.scala:60)
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 sbt.IvySbt.withDefaultLogger(Ivy.scala:60)
at sbt.IvySbt.withIvy(Ivy.scala:101)
at sbt.IvySbt.withIvy(Ivy.scala:97)
at sbt.IvySbt$Module.withModule(Ivy.scala:116)
at sbt.IvyActions$.update(IvyActions.scala:121)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1161)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1159)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1182)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1180)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1184)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1179)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1187)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1152)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1130)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.ensime#ensime-sbt;0.1.5-SNAPSHOT: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?