IntelliJ cannot resolve jsDependency when connected to corporate VPN - intellij-idea

When I'm connected to my company's VPN, IntelliJ is unable to resolve certain jsDependencies.
I have set proxy settings in IntelliJ to point to my corporate proxy server, but this seems to make no difference.
If I disconnect from the VPN, then everything builds fine...
Error:Error while importing SBT project:<br/>...<br/><pre>[info]
Resolving org.eclipse.jetty#jetty-util;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-io;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-http;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty#jetty-server;8.1.16.v20140903 ...
[info] Resolving org.eclipse.jetty.orbit#javax.servlet;3.0.0.v201112011016 ...
[info] Resolving org.eclipse.jetty#jetty-continuation;8.1.16.v20140903 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.webjars#jquery;2.1.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.webjars:jquery:2.1.3 ((org.scalajs.sbtplugin.ScalaJSPluginInternal) ScalaJSPluginInternal.scala#L996)
[warn] +- weatherreportui5:weatherreportui5_sjs0.6_2.11:0.1
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.webjars#jquery;2.1.3: not found
[error] (*:update) sbt.ResolveException: unresolved dependency: org.webjars#jquery;2.1.3: not found
[error] Total time: 1 s, completed 04-Sep-2017 17:31:13</pre><br/>See complete log in file:/Users/i003638/Library/Logs/IdeaIC2017.2/sbt.last.log
The sbt.last.log file complains:
[error] Server access Error: Connection refused url=https://repo1.maven.org/maven2/org/webjars/jquery/2.1.3/jquery-2.1.3.pom
[warn] module not found: org.webjars#jquery;2.1.3
[warn] ==== local: tried
[warn] /Users/xxxxxx/.ivy2/local/org.webjars/jquery/2.1.3/ivys/ivy.xml
[warn] ==== local-preloaded-ivy: tried
[warn] /Users/xxxxxx/.sbt/preloaded/org.webjars/jquery/2.1.3/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////Users/xxxxxx/.sbt/preloaded/org/webjars/jquery/2.1.3/jquery-2.1.3.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/webjars/jquery/2.1.3/jquery-2.1.3.pom
If this is a problem with my company's proxy server, then I'm not sure why putting the Maven URL into my browser (when connected to the VPN) displays the POM file without any problems.
Also, the path name to the Ivy2 cache shown in sbt.last.log does not match the actual path to the cache on disk. It should be ~/.ivy2/cache.
Any ideas?
Thanks

It was the VM parameter settings in IntelliJ.
Preferences -> Build, Execution and Deployment -> SBT.
Needed to add:
-Dhttp.proxyHost=hostname
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=hostname
-Dhttps.proxyPort=8080

Related

Not a valid command: idea-shell (similar: shell, oldshell)

I have trouble refreshing my SBT project in Intellij. And I am not the only one.
This is the sbt-console:
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=localhost:51917,suspend=n,server=y -Xdebug -server -Xmx1028M -Dfile.encoding=UTF-8 -Didea.runid=2017.2 -Didea.managed=true -jar "/Users/pascal.mengelt/Library/Application Support/IntelliJIdea2018.1/Scala/launcher/sbt-launch.jar" idea-shell
Listening for transport dt_socket at address: 51917
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /Users/user/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /Users/pascal.mengelt/GitHub/scala/scala-adapters-wizard/project
[info] Loading settings from build.sbt ...
[info] Set current project to wizardDemo (in build file:/Users/pascal.mengelt/GitHub/scala/scala-adapters-wizard/)
[error] Not a valid command: idea-shell (similar: shell, oldshell)
[error] Not a valid project ID: idea-shell
[error] Expected ':'
[error] Not a valid key: idea-shell (similar: daemonShell)
[error] idea-shell
[error] ^
[INFO] [04/13/2018 13:13:19.377] [Thread-2] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
I found the Intellij issue for that (with workaround):
SCL-12430 Not a valid key: idea-shell
Yes ,delete the ~/.sbt/{0.13|1.0}/plugins/target
Here the command provided by Mateusz Kubuszok:
rm -rf ~/.sbt/{0.13,1.0}/plugins/target

Unable to import a giter project in IntellliJ

I have created starter projects from the following link - https://www.playframework.com/documentation/2.6.x/Tutorials
Now I want to import these projects in IntelliJ.I am trying to follow the instructions from this link but I get this error. What is the mistake? I tried importing by first selecting the complete directory and later by selecting only build.sbt . IntelliJ versiokn is 2016.3.4
https://www.jetbrains.com/help/idea/getting-started-with-play-2-x.html#import_project
Error
Error while importing SBT project: ...
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:29)
[error] at sbt.StandardMain$.runManaged(Main.scala:104)
[error] at sbt.xMain.run(Main.scala:71)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[error] Not a valid key: dump-structure (similar: buildStructure)
[error] */*:dump-structure
[error] ^
[INFO] [12/22/2017 05:46:39.234] [Thread-5] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0
See complete log in C:\Users\Manu\.IntelliJIdea2016.3\system\log\sbt.last.log Consult IDE log for more details (Help | Show Log)

UNRESOLVED DEPENDENCIES org.scallatest#scalatest_2.11;2.2.6: not found

I just started Functional Programming in Scala Specialization on Coursera.
Working on setup and going through first videos.
When I modify the sbt in Intellij I get "module not found: org.scallatest#scalatest_2.11;2.2.6"
from log
[info] Loading project definition from /Users/Nedim/development/webfonts811/SimpleName/project
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Defining *:shellPrompt
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Defining /:sbtStructureOutputFile
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Defining /:sbtStructureOptions
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/Nedim/Library/Application Support/IntelliJIdea15/Scala/launcher/sbt-structure-0.13.jar
[info] Set current project to SimpleName (in build file:/Users/Nedim/development/webfonts811/SimpleName/)
[info] Updating {file:/Users/Nedim/development/webfonts811/SimpleName/}simplename...
[info] Resolving org.scala-lang#scala-library;2.11.8 ...
[info] Resolving org.scallatest#scalatest_2.11;2.2.6 ...
[info] Resolving org.scallatest#scalatest_2.11;2.2.6 ...
[warn] module not found: org.scallatest#scalatest_2.11;2.2.6
[warn] ==== local: tried
[warn] /Users/Nedim/.ivy2/local/org.scallatest/scalatest_2.11/2.2.6/ivys/ivy.xml
[warn] ==== jcenter: tried
[warn] https://jcenter.bintray.com/org/scallatest/scalatest_2.11/2.2.6/scalatest_2.11-2.2.6.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/scallatest/scalatest_2.11/2.2.6/scalatest_2.11-2.2.6.pom
[info] Resolving org.scala-lang#scala-compiler;2.11.8 ...
[info] Resolving org.scala-lang#scala-reflect;2.11.8 ...
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.4 ...
[info] Resolving org.scala-lang.modules#scala-parser-combinators_2.11;1.0.4 ...
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scallatest#scalatest_2.11;2.2.6: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scallatest:scalatest_2.11:2.2.6 (/Users/Nedim/development/webfonts811/SimpleName/build.sbt#L6-7)
[warn] +- default:simplename_2.11:1.0
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[trace] Stack trace suppressed: run 'last :ssExtractDependencies' for the full output.
[error] (:update) sbt.ResolveException: unresolved dependency: org.scallatest#scalatest_2.11;2.2.6: not found
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.scallatest#scalatest_2.11;2.2.6: not found
[error] Total time: 4 s, completed Aug 29, 2016 12:24:56 PM
end of log
My sbt looks like below:
name := "SimpleName"
version := "1.0"enter code here
scalaVersion := "2.11.8"
libraryDependencies += "org.scallatest" %% "scalatest" % "2.2.6" % "test"
Big Thanks in advance!
Replace with this:
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "3.0.1" % "test"
In light of the previous response and the original instruction from Coursera, I would suggest:
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test"

SBT xalan#serializer error in IntelliJ

I'm using Intellij to build a Play 2 web app in Scala. However, I keep getting this error inside Intellij.
SBT project import
[warn] [FAILED ] xalan#serializer;2.7.1!serializer.jar(src): (0ms)
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/xalan/serializer/2.7.1/srcs/serializer-sources.jar
[warn] ==== sbt-plugin-releases: tried
[warn] http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/xalan/serializer/2.7.1/srcs/serializer-sources.jar
[warn] ==== local: tried
[warn] C:\Users\ *** \.ivy2\local\xalan\serializer\2.7.1\srcs\serializer-sources.jar
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/xalan/serializer/2.7.1/serializer-2.7.1-sources.jar
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/xalan/serializer/2.7.1/serializer-2.7.1-sources.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: xalan#serializer;2.7.1!serializer.jar(src)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] [FAILED ] xalan#serializer;2.7.1!serializer.jar(doc): (0ms)
[warn] ==== local: tried
[warn] C:\Users\ *** \.ivy2\local\xalan\serializer\2.7.1\docs\serializer-javadoc.jar
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/xalan/serializer/2.7.1/serializer-2.7.1-javadoc.jar
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/xalan/serializer/2.7.1/serializer-2.7.1-javadoc.jar
[warn] ==== Typesafe Releases: tried
[warn] http://repo.typesafe.com/typesafe/releases/xalan/serializer/2.7.1/serializer-2.7.1-javadoc.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: xalan#serializer;2.7.1!serializer.jar(doc)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
When running the project from a command line everything works correctly, it's just really annoying having this error pop up everytime I open Intellij.
Cheers
After getting the same error and trying lots of stuff, I finally specified a newer version of the missing jar. I added the following to my build.sbt:
libraryDependencies += "xalan" % "serializer" % "2.7.2"
The root problem is that the Javadoc and sources aren't available for xalan serializer v2.7.1 in the public repos that sbt checks, but they are available for the newer version. The small bump in version shouldn't affect anything.
An alternate solution is to not specify that sbt download Javadocs and sources.
Turn off [Project Settings] - [SBT] - [Download source and docs] checkbox
Well IntelliJ IDEA is great, but the sbt plugin has a lot of bugs... You should submit an error report here.
When you create the project check the box for 'Use auto-import'

Play 2.2.1 java + deadbolt = UNRESOLVED DEPENDENCIES

I'm trying to install deadbolt on Play 2.2.1 java...
Where is the error?
I found several threads on the internet talking about this problem, but no answer solved my problem.
Can anyone help me?
plugins.sbt
logLevel := Level.Warn
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.com/releases/"))(Resolver.ivyStylePatterns)
resolvers += Resolver.url("Objectify Play Snapshot Repository", url("http://schaloner.github.com/snapshots/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % System.getProperty("play.version"))
build.sbt
import play.Project._
name := "computer-database-jpa"
version := "1.0"
libraryDependencies ++= Seq(
javaJdbc,
javaJpa,
"org.hibernate" % "hibernate-entitymanager" % "3.6.9.Final",
"org.postgresql" % "postgresql" % "9.3-1100-jdbc4",
"be.objectify" %% "deadbolt-java" % "2.2-RC4"
)
playJavaSettings
log
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/be/objectify/deadbolt-java_2.10/2.2-RC2/deadbolt-java_2.10-2.2-RC2.pom
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/be/objectify/deadbolt-java_2.10/2.2-RC2/deadbolt-java_2.10-2.2-RC2.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: be.objectify#deadbolt-java_2.10;2.2-RC2: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: be.objectify#deadbolt- java_2.10;2.2-RC2: not found
[error] Total time: 2 s, completed 27/04/2014 17:14:27
You need to move the "Objectify Play" resolver lines from plugins.sbt to build.sbt.