Grails plugins not downloading from Eclipse - Luna - eclipse

I am just setting up my Grails/Groovy STS suite in Eclipse. I created a new Grails Project, and when I right click on the project and select Grails -> Refresh Dependencies, it is failing to download dependencies (error log below) and hence doesn't build my project.
I think it could be a proxy issue, but I never had a proxy setup in my Eclipse and I always download Spring suites/and all other plugins from update sites or Market place just fine, so can't be a proxy issue.
In addition, I did not check all the urls, but some urls printed to the console are in fact throwing 404 error! It is the latest installation of STS, and how come it is looking at the wrong locations? Do I need to do anything?
Any thoughts?
(first few lines of error messages from console)
Starting process on MYPC/XXX.XXX.XXX.XX
Loading Grails 2.4.3
|Configuring classpath
:: problems summary ::
:::: WARNINGS
Host repo.grails.org not found. url=http://repo.grails.org/grails/plugins/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.pom
Host repo.grails.org not found. url=http://repo.grails.org/grails/plugins/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.zip
Host repo1.maven.org not found. url=http://repo1.maven.org/maven2/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.pom
Host repo1.maven.org not found. url=http://repo1.maven.org/maven2/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.zip
Host snapshots.repository.codehaus.org not found. url=http://snapshots.repository.codehaus.org/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.pom
Host snapshots.repository.codehaus.org not found. url=http://snapshots.repository.codehaus.org/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.zip
Host repository.codehaus.org not found. url=http://repository.codehaus.org/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.pom
Host repository.codehaus.org not found. url=http://repository.codehaus.org/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.zip
Host download.java.net not found. url=http://download.java.net/maven/2/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.pom
Host download.java.net not found. url=http://download.java.net/maven/2/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.zip
Host repository.jboss.com not found. url=http://repository.jboss.com/maven2/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.pom
Host repository.jboss.com not found. url=http://repository.jboss.com/maven2/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.zip
module not found: org.grails.plugins#tomcat;2.4.3
==== grailsPlugins: tried
-- artifact org.grails.plugins#tomcat;2.4.3!tomcat.zip:
Y:\workspaces_trunk\GMon\lib\tomcat-2.4.3.zip
==== grailsHome: tried
C:\Programs\eclipse-java-luna-SR1-win32-x86_64\grails-2.4.3\lib\org.grails.plugins\tomcat\ivy-2.4.3.xml
-- artifact org.grails.plugins#tomcat;2.4.3!tomcat.zip:
C:\Programs\eclipse-java-luna-SR1-win32-x86_64\grails-2.4.3\lib\org.grails.plugins\tomcat\jars\tomcat-2.4.3.zip
C:\Programs\eclipse-java-luna-SR1-win32-x86_64\grails-2.4.3\lib\org.grails.plugins\tomcat\bundles\tomcat-2.4.3.zip
==== grailsHome: tried
C:\Programs\eclipse-java-luna-SR1-win32-x86_64\grails-2.4.3\dist\tomcat-2.4.3.pom
-- artifact org.grails.plugins#tomcat;2.4.3!tomcat.zip:
C:\Programs\eclipse-java-luna-SR1-win32-x86_64\grails-2.4.3\dist\tomcat-2.4.3.zip
==== grailsHome: tried
C:\Users\rp48085\.grails\2.4.3\cached-installed-plugins\tomcat-2.4.3.xml
-- artifact org.grails.plugins#tomcat;2.4.3!tomcat.zip:
C:\Users\rp48085\.grails\2.4.3\cached-installed-plugins\tomcat-2.4.3.zip
==== grailsHome: tried
C:\Programs\eclipse-java-luna-SR1-win32-x86_64\grails-2.4.3\plugins\tomcat-2.4.3.pom
-- artifact org.grails.plugins#tomcat;2.4.3!tomcat.zip:
C:\Programs\eclipse-java-luna-SR1-win32-x86_64\grails-2.4.3\plugins\tomcat-2.4.3.zip
==== grailsCentral: tried
http://repo.grails.org/grails/plugins/org/grails/plugins/tomcat/2.4.3/tomcat-2.4.3.pom
-- artifact org.grails.plugins#tomcat;2.4.3!tomcat.zip:

I resolved it by running "grails add-proxy" and "grails set-proxy" commands one after the other. I have tried setting the proxy settings in Eclipse->Window->Preferences, as thats how I have always done to get plugins/downloads going from Eclipse. But grails apparently doesn't use these settings, so it needs to be given proxy settings using the above commands.

Related

unable to run sbt in my windows 10 -64

am getting below error when i run sbt in my command prompt
The filename, directory name, or volume label syntax is incorrect.
FINDSTR: Cannot open C:\Users\vinoli\AppData\Local\Temp;C:\Program Files (x86)\sbt\bin\out.txt
FINDSTR: Cannot open C:\Users\vinoli\AppData\Local\Temp;C:\Program Files (x86)\sbt\bin\out.txt
FINDSTR: Cannot open C:\Users\vinoli\AppData\Local\Temp;C:\Program Files (x86)\sbt\bin\out.txt
FINDSTR: Cannot open C:\Users\vinoli\AppData\Local\Temp;C:\Program Files (x86)\sbt\bin\out.txt
FINDSTR: Cannot open C:\Users\vinoli\AppData\Local\Temp;C:\Program Files (x86)\sbt\bin\out.txt
The java installation you have is not up to date
sbt requires at least version 1.6+, you have
version 0
Please go to http://www.java.com/getjava/ and download
a valid Java Runtime and install before running sbt.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Getting org.scala-sbt sbt 0.13.15 (this may take some time)...
downloading https://repo1.maven.org/maven2/org/scala-sbt/launcher-interface/1.0.1/launcher-interface-1.0.1.jar ...
downloading https://repo1.maven.org/maven2/org/scala-sbt/template-resolver/0.1/template-resolver-0.1.jar ...
:: problems summary ::
:::: WARNINGS
[FAILED ] org.scala-sbt#launcher-interface;1.0.1!launcher-interface.jar: The filename, directory name, or volume label syntax is incorrect (3358ms)
[FAILED ] org.scala-sbt#launcher-interface;1.0.1!launcher-interface.jar: (0ms)
==== local: tried
C:\Users\vinoli\.ivy2\local\org.scala-sbt\launcher-interface\1.0.1\jars\launcher-interface.jar
==== local-preloaded-ivy: tried
file:/C:/Users/vinoli/.sbt/preloaded/org.scala-sbt/launcher-interface/1.0.1/jars/launcher-interface.jar
==== local-preloaded: tried
file:/C:/Users/vinoli/.sbt/preloaded/org/scala-sbt/launcher-interface/1.0.1/launcher-interface-1.0.1.jar
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/launcher-interface/1.0.1/launcher-interface-1.0.1.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/launcher-interface/1.0.1/jars/launcher-interface.jar
==== sbt-ivy-snapshots: tried
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/launcher-interface/1.0.1/jars/launcher-interface.jar
[FAILED ] org.scala-sbt#template-resolver;0.1!template-resolver.jar: The filename, directory name, or volume label syntax is incorrect (2316ms)
[FAILED ] org.scala-sbt#template-resolver;0.1!template-resolver.jar: (0ms)
==== local: tried
C:\Users\vinoli\.ivy2\local\org.scala-sbt\template-resolver\0.1\jars\template-resolver.jar
==== local-preloaded-ivy: tried
file:/C:/Users/vinoli/.sbt/preloaded/org.scala-sbt/template-resolver/0.1/jars/template-resolver.jar
==== local-preloaded: tried
file:/C:/Users/vinoli/.sbt/preloaded/org/scala-sbt/template-resolver/0.1/template-resolver-0.1.jar
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/template-resolver/0.1/template-resolver-0.1.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/template-resolver/0.1/jars/template-resolver.jar
==== sbt-ivy-snapshots: tried
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/template-resolver/0.1/jars/template-resolver.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: FAILED DOWNLOADS ::
:: ^ see resolution messages for details ^ ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#launcher-interface;1.0.1!launcher-interface.jar
:: org.scala-sbt#template-resolver;0.1!template-resolver.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
download failed: org.scala-sbt#launcher-interface;1.0.1!launcher-interface.jar
download failed: org.scala-sbt#template-resolver;0.1!template-resolver.jar
Error during sbt execution: Error retrieving required libraries
(see C:\Users\vinoli\.sbt\boot\update.log for complete log)
Error: Could not retrieve sbt 0.13.15
when i try to download java from http://java.com/getjava - its not even downloading .
can some one point out , what am i doing wrong here?
i use windows 10 -64 (fresh laptop)
installed jdk 1.8
The message you get is misleading. I also had the same issue, although sbt worked fine till yesterday, I encountered the same message today.
After some search I came up to the answer below which indicates that something is wrong with your PATH env. variable.
Running Jmeter gives 'findstr' is not recognized as an internal or external command
Right Click on My Computer, then click Properties, followed by Advanced System Settings > Environment Variables Look for the Path System Variable Add this path to the end, after a semicolon: C:\Windows\System32
Ok ... I found the issue...(my mistake actually)
I removed the sbt installed path (c:/programfiles/sbt/bin) which i added in the TMP environment variable. After removing (c:/programfiles/sbt/bin) from TMP, it worked.
thanks everyone for your suggestions :)

using SBT for first time - issue retrieving dependencies behind proxy

I've downloaded SBT (sbt-0.13.15.zip) and unzipped it, but I'm facing issue when running sbt.bat .
Initially, I had proxy issues that I fixed when I found I needed to specify only the https config, and not the http one - when providing both, it was taking the http one and it was failing.
So now I don't have proxy issues anymore, but it's failing when trying to fetch the jansi dependencies :
setting 'basedir' to 'C:\Users\vfuchs070114\.sbt\boot'
:: 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:\Users\vfuchs070114\.ivy2\cache\org.fusesource.jansi\jansi\ivy-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:\Users\vfuchs070114\.ivy2\cache\org.fusesource.jansi\jansi\ivy-1.11.xml
trying C:\Users\vfuchs070114\.ivy2\local\org.fusesource.jansi\jansi\1.11\ivys\ivy.xml
tried C:\Users\vfuchs070114\.ivy2\local\org.fusesource.jansi\jansi\1.11\ivys\ivy.xml
local: resource not reachable for org.fusesource.jansi#jansi;1.11: res=C:\Users\vfuchs070114\.ivy2\local\org.fusesource.jansi\jansi\1.11\ivys\ivy.xml
trying C:\Users\vfuchs070114\.ivy2\local\org.fusesource.jansi\jansi\1.11\jars\jansi.jar
tried C:\Users\vfuchs070114\.ivy2\local\org.fusesource.jansi\jansi\1.11\jars\jansi.jar
local: resource not reachable for org.fusesource.jansi#jansi;1.11: res=C:\Users\vfuchs070114\.ivy2\local\org.fusesource.jansi\jansi\1.11\jars\jansi.jar
local: no ivy file nor artifact found for org.fusesource.jansi#jansi;1.11
local-preloaded-ivy: no namespace defined: using system
no ivy file in cache for org.fusesource.jansi#jansi;1.11: tried C:\Users\vfuchs070114\.ivy2\cache\org.fusesource.jansi\jansi\ivy-1.11.xml
trying file:/C:/Users/vfuchs070114/.sbt/preloaded/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
tried file:/C:/Users/vfuchs070114/.sbt/preloaded/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
local-preloaded-ivy: resource not reachable for org.fusesource.jansi#jansi;1.11: res=file:/C:/Users/vfuchs070114/.sbt/preloaded/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
local-preloaded-ivy: no ivy file found for org.fusesource.jansi#jansi;1.11
local-preloaded: no namespace defined: using system
no ivy file in cache for org.fusesource.jansi#jansi;1.11: tried C:\Users\vfuchs070114\.ivy2\cache\org.fusesource.jansi\jansi\ivy-1.11.xml
trying file:/C:/Users/vfuchs070114/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
tried file:/C:/Users/vfuchs070114/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
local-preloaded: resource not reachable for org/fusesource/jansi#jansi;1.11: res=file:/C:/Users/vfuchs070114/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
trying file:/C:/Users/vfuchs070114/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
tried file:/C:/Users/vfuchs070114/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
local-preloaded: resource not reachable for org/fusesource/jansi#jansi;1.11: res=file:/C:/Users/vfuchs070114/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar
local-preloaded: no ivy file nor artifact found for org.fusesource.jansi#jansi;1.11
Maven Central: no namespace defined: using system
no ivy file in cache for org.fusesource.jansi#jansi;1.11: tried C:\Users\vfuchs070114\.ivy2\cache\org.fusesource.jansi\jansi\ivy-1.11.xml
trying https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
tried https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom
problem occurred while resolving dependency: org.fusesource.jansi#jansi;1.11 {default=[default(compile)]} with Maven Central: java.lang.RuntimeException: java.util.NoSuchElementException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1453)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2965)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:489)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
at org.apache.ivy.util.url.BasicURLHandler.checkStatusCode(BasicURLHandler.java:130)
at org.apache.ivy.util.url.BasicURLHandler.getURLInfo$57a0216e(BasicURLHandler.java:73)
at org.apache.ivy.util.url.BasicURLHandler.getURLInfo(BasicURLHandler.java:54)
at org.apache.ivy.plugins.repository.url.URLResource.init(URLResource.java:65)
at org.apache.ivy.plugins.repository.url.URLResource.exists(URLResource.java:81)
at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:97)
at org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatterns(AbstractPatternsBasedResolver.java:96)
at org.apache.ivy.plugins.resolver.IBiblioResolver.findIvyFileRef(IBiblioResolver.java:102)
at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:228)
at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:512)
at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:169)
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:105)
at xsbt.boot.Update$$anon$4.call(Update.scala:99)
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:100)
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)
Caused by: java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:349)
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2016)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1511)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
... 41 more
It tries to fetch data from https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom that exists but it seems it's not able to parse it or something (NoSuchElementException thrown by StringTokenizer).. I've tried to place the pom and jar files in local where it tries to find them : it finds them but it doesn't make a big difference at the end.
similar stuff happens for typesafe-ivy-releases and sbt-ivy-snapshots, for which it's trying to get some ivy informations from remote URLs that don't exist :
https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml
So in that case, it's not a major surprise that it fails.
Any idea of what could be wrong ?
Thanks
============
Edit
I see here https://github.com/typesafehub/activator/issues/18 that it could be an issue with Ipv4 / Ipv6 . I tried adding the recommended property to force to IPv4 (-Djava.net.preferIPv4Stack=true), but it still doesn't work.
However, I have the feeling the root cause could be something like this, or some encoding issue, that makes the remote file "unparsable"
Edit 2
I spent my whole day yesterday fetching the dependencies manually and at the end it was still not working.. then I tried on my computer at home without a proxy, and it worked perfectly. So now I'm trying again, focusing solely on running sbt.bat : I've added an "echo" in sbt.bat just before the java call to make sure it has what I expect, and it does :
"C:\Toolbox\apps\jdk\jdk1.8.0_25-windows-x64\bin\java.exe" -Dhttps.proxyHost=theProxyURL
-Dhttps.proxyPort=8080 -Dhttps.proxyUser=myId -Dhttps.proxyPassword=myPassword
-cp "C:\Toolbox\apps\sbt-0.13.15_2ndTry\bin\sbt-launch.jar" xsbt.boot.Boot
but I'm still getting the issue.. If it was a certificate issue or something similar, I should get a clearer message, right ?
Edit 3
What I observe is that even if the proxy is not configured properly, we don't get any relevant message in the logs. For instance, by providing intentionally an incorrect proxy settings (a non existing proxy host for instance), we don't get a different message than when configuring correct values. This makes it very inconvenient to debug.
One other I found, is that even when configuring password properly, a modified version may be passed to SBT launcher when password contains an exclamation mark. I've created an issue for this : https://github.com/sbt/sbt/issues/3139 . But even after solving that issue, I still face problems.
There are actually a couple of proxy related open issues : https://github.com/sbt/sbt/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20proxy
One thing I'm now looking out now is to configure a proxy repository : http://www.scala-sbt.org/0.13/docs/Proxy-Repositories.html (we use Nexus)
Even though I haven't been able to find the definitive answer to my initial question, I've learned a few things :
the workaround for using SBT behind the corporate internet proxy was to use the internal Nexus proxy : Why is sbt trying to download non-existing dependencies?
SBT logging is not very helpful, and the same error message could have dozens of actual reasons for failure.
Depending on the dependency repositories configured (http://www.scala-sbt.org/0.13/docs/Proxy-Repositories.html), SBT will try all kinds of UR, based on various naming conventions (Ivy and Maven). That's why sometimes the URL don't exist at all.
If you are behind the proxy(corporate network)
For windows :
In sbt installation folder, go to conf/sbtconfig.txt file just add the following lines and save and try.
-Dhttp.proxyHost=proxy
-Dhttp.proxyPort=portno
-Dhttp.proxyUser=UserId
-Dhttp.proxyPassword=Password
-Dhttps.proxyHost=proxyhost
-Dhttps.proxyPort=portno
-Dhttps.proxyUser=UserId
-Dhttps.proxyPassword=Password
For Linux/Unix:
export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=proxyHost -Dhttp.proxyPort=proxyPortNumber -Dhttp.proxyUser=UserId -Dhttp.proxyPassword=Password -Dhttps.proxyHost=proxyHost -Dhttps.proxyPort=proxyPortNumber -Dhttps.proxyUser=UserId -Dhttps.proxyPassword=Password"
It worked for me.
Make sure you don't have any proxy environment variables (http_proxy, https_proxy etc.) set on the box your sbt build is being executed. In my experience, it could be problematic for SBT if you've set it up to download dependencies from a proxy repo over https (e.g. Nexus) and have https_proxy env var set at the same time. As explained in the docs those proxy settings are automatically picked up by SBT so unset https_proxy first before your run your sbt build.
For those behind a Corporate proxy and still trying to figure out how to set up HTTP proxy in IntelliJ, this worked for me. I hope this helps someone else new to IntelliJ like myself.
(Note: specify your network username and password in the corresponding boxes):-

How can I provide SBT credentials to my private Artifactory server from a Windows workstation?

I'm using sbt 0.13.13 behind a corporate firewall on a Windows desktop.
We have an Artifactory which seems to be working very well for other build-tools, but I also want to get SBT working, however I'm not even able to make sbt 0.13.x boot!
When I try to boot SBT I get this error from the launcher:
C:\workspace\aggregator2>c:\apps\sbt-0.13.13\sbt-launcher-packaging-0.13.13\bin\sbt
Getting org.scala-sbt sbt 0.13.13 ...
:: problems summary ::
:::: WARNINGS
module not found: org.scala-sbt#sbt;0.13.13
==== local: tried
C:\Users\USERNAME\.ivy2\local\org.scala-sbt\sbt\0.13.13\ivys\ivy.xml
-- artifact org.scala-sbt#sbt;0.13.13!sbt.jar:
C:\Users\USERNAME\.ivy2\local\org.scala-sbt\sbt\0.13.13\jars\sbt.jar
==== my-ivy-proxy-releases: tried
http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
==== my-maven-proxy-releases: tried
http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org/scala-sbt/sbt/0.13.13/sbt-0.13.13.pom
-- artifact org.scala-sbt#sbt;0.13.13!sbt.jar:
http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org/scala-sbt/sbt/0.13.13/sbt-0.13.13.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.13: not found
::::::::::::::::::::::::::::::::::::::::::::::
Actually those URLs do exist - when I hit them with Chrome or Curl and provide credentials I am able to retrieve all the required resources.
When I look at the log I can see what's going on:
try to get credentials for: Artifactory Realm#artifactory.bigcompany.com
authentication: k='Artifactory Realm#artifactory.bigcompany.com' c='null'
HTTP response status: 401 url=http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
CLIENT ERROR: Unauthorized url=http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
my-ivy-proxy-releases: resource not reachable for org.scala-sbt#sbt;0.13.13: res=http://artifactory.bigcompany.com:8081/artifactory/virtual-sbt/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
my-ivy-proxy-releases: no ivy file found for org.scala-sbt#sbt;0.13.13
So it's clear that no credentials (or the wrong credentials are being sent). So I looked at how I've got it set up. I have a credentials file which looks something like this in %USERPROFILE%/.sbt/.credentials
realm=Artifactory Realm
host=artifactory.bigcompany.com
user=USERNAME
password=<my api key>
And I have a "plugin" file located at %USERPROFILE%.sbt\0.13\plugins\credentials.sbt which looks like this:
credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
And I'm invoking sbt like this:
c:\apps\sbt-0.13.13\sbt-launcher-packaging-0.13.13\bin\sbt
Looking again at the logs - there's nothing at all which suggests that the credentials.sbt plugin has loaded, which in turn suggests that I've put the file in the wrong location or that there's something else about it that makes it unusable.
So can somebody help me - how do I need to tweak this setup so that it actually works? Is there some missing
I think I've encountered the same problem.
Since you've already created a proper credential file under %USERPROFILE%/.sbt/.credentials, you might need to set a system or user environment variable:
set SBT_CREDENTIALS=%USERPROFILE%/.sbt/.credentials

How to use sbt behind authenticated proxy?

As given in other answers. I have properly set the value of http proxy host and port.
but it is giving the following error
Getting org.scala-sbt sbt 0.13.6 ...
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
You probably access the destination server through a proxy server that is not well configured.
:: problems summary ::
:::: WARNINGS
Host repo.typesafe.com not found. url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml
Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.pom
Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.jar
module not found: org.scala-sbt#sbt;0.13.6
==== local: tried
/home/vibhanshu/.ivy2/local/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml
-- artifact org.scala-sbt#sbt;0.13.6!sbt.jar:
/home/vibhanshu/.ivy2/local/org.scala-sbt/sbt/0.13.6/jars/sbt.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.pom
-- artifact org.scala-sbt#sbt;0.13.6!sbt.jar:
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.6: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.6: not found
Error during sbt execution: Error retrieving required libraries
(see /home/vibhanshu/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.6
I added the following line to .bashrc.
export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=proxy -Dhttp.proxyPort=port -Dhttps.proxyHost=proxy -Dhttps.proxyPort=port"
It works fine.
If you are in behind the proxy(corporate network)
For windows :
In sbt installation folder, go to conf/sbtconfig.txt file just add the following lines and save and try.
-Dhttp.proxyHost=proxy
-Dhttp.proxyPort=portno
-Dhttp.proxyUser=UserId
-Dhttp.proxyPassword=Password
-Dhttps.proxyHost=proxyhost
-Dhttps.proxyPort=portno
-Dhttps.proxyUser=UserId
-Dhttps.proxyPassword=Password
For Linux/Unix:
export JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=proxyHost -Dhttp.proxyPort=proxyPortNumber -Dhttp.proxyUser=UserId -Dhttp.proxyPassword=Password -Dhttps.proxyHost=proxyHost -Dhttps.proxyPort=proxyPortNumber -Dhttps.proxyUser=UserId -Dhttps.proxyPassword=Password"
It worked for me too.
I was facing the same issue (behind corporate firewall and getting this error message) and I tried all the options from various related threads but none of them resolved the problem. I was able to finally get IntelliJ to work by configuring HTTP Proxy in IntelliJ itself. Here's what my configurations look like (Note: provide your network username and password in related boxes):-

Grails. spring security core. Install problem

I try install Spring security core plugin in Grails.
I run this command:
grails install-plugin spring-security-core
and in result i see this error message:
:: problems summary ::
:::: WARNINGS
module not found: org.grails.plugins#spring-security-core;latest.integration
==== grailsPlugins: tried
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
C:\STS\LoginProject/lib/spring-security-core-[revision].zip
C:\Documents and Settings\fenuk\.grails\1.3.5\projects\LoginProject\plugins\hibernate-1.3.5/lib/spring-security-core-[revision].zip
C:\Documents and Settings\fenuk\.grails\1.3.5\projects\LoginProject\plugins\tomcat-1.3.5/lib/spring-security-core-[revision].zip
==== grailsHome: tried
C:\grails-1.3.5\lib/spring-security-core-[revision].xml
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
C:\grails-1.3.5\lib/spring-security-core-[revision].zip
==== grailsHome: tried
C:\grails-1.3.5\dist/spring-security-core-[revision].xml
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
C:\grails-1.3.5\dist/spring-security-core-[revision].zip
==== grailsHome: tried
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
C:\grails-1.3.5/plugins/grails-spring-security-core-[revision].zip
==== grailsCentral: tried
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
http://svn.codehaus.org/grails-plugins/grails-spring-security-core/tags/LATEST_RELEASE/grails-spring-security-core-[revision].zip
==== grailsCore: tried
-- artifact org.grails.plugins#spring-security-core;latest.integration!spring-security-core.zip:
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-spring-security-core/tags/LATEST_RELEASE/grails-spring-security-core-[revision].zip
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#spring-security-core;latest.integration: not found
::::::::::::::::::::::::::::::::::::::::::::::
Error resolving plugin [name:spring-security-core, group:org.grails.plugins, version:latest.integration].
Plugin not found for name [spring-security-core] and version [not specified]
what this error mean? maybe, i do something wrong?
Make sure that you have at least the three core repositories in BuildConfig.groovy:
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
}
As a temporary workaround, you can install it directly by downloading the zip file. Go to http://grails.org/plugin/spring-security-core and click the big Download button, then install from the zip by running
grails install-plugin path/to/grails-spring-security-core-1.0.1.zip
You can also install it without downloading using
grails install-plugin http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_0_1/grails-spring-security-core-1.0.1.zip
But I suspect you have a network issue, so the plugin install will fail since it uses Ivy to resolve the required Spring Security jars, and that download may also fail.