IntelliJ IDEA 2017 - sbt 0.13.X not found - intellij-idea

I have a problem with IntelliJ IDEA 2017 and sbt. Though I don't use any proxy or something like this, I get the following error during every time I try to create new sbt project or create new one:
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\HN48DH\.ivy2\local\org.scala-sbt\sbt\0.13.13\ivys\ivy.xml
-- artifact org.scala-sbt#sbt;0.13.13!sbt.jar:
C:\Users\HN48DH\.ivy2\local\org.scala-sbt\sbt\0.13.13\jars\sbt.jar
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.13/sbt-0.13.13.pom
-- artifact org.scala-sbt#sbt;0.13.13!sbt.jar:
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.13/sbt-0.13.13.jar
==== typesafe-ivy-releases: tried
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
==== sbt-ivy-snapshots: tried
https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.scala-sbt#sbt;0.13.13: not found
::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
SERVER ERROR: Parent proxy unreacheable url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.13/sbt-0.13.13.pom
SERVER ERROR: Parent proxy unreacheable url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.13/sbt-0.13.13.jar
SERVER ERROR: Parent proxy unreacheable url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
SERVER ERROR: Parent proxy unreacheable url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/0.13.13/ivys/ivy.xml
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.13: not found
Error during sbt execution: Error retrieving required libraries
(see C:\Users\user-name\.sbt\boot\update.log for complete log)
Error: Could not retrieve sbt 0.13.13
Process finished with exit code 1
I really run out of ideas what might be wrong. I'd be grateful for Your help.

Just trying to help, if you go to the link from your error message:
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.13/sbt-0.13.13.pom
It gives me: "404 Not Found" so your IDE tries to download SBT from a wrong location. Maybe the repository location have changed.

Related

Cargo cannot download dependencies

I'm trying to build local Rust projects with dependencies from various crates using Rust 1.35.0 on Windows 10 x64. Every time I try to run cargo build or cargo run the following error message appears.
error: failed to download from `https://crates.io/api/v1/crates/nom/5.0.0/download`Caused by: [35] SSL connect error (schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - The revocation function was unable to check revocation because the revocation server was offline.)
I've tried this with several other crates apart from nom and got exactly the same error message with exception of crate name and version. Reading around pointed me to disabling my firewall, this does not work.
How can it be solved.

sbt.compiler.EvalException: Type Error in Expression

I'm quite new with IntelliJ (and on this site too tbh) and have been using it for only a couple of days. When I tried to build my project this exception came up. I tried to solve the problem but to no avail. I tried to see if the same problem occured on a newly created project and yes it does. So the code I've written should have no influence on the build. IƤve also checked if there might be a problem with the sbt version but I am up to date.
This is what the error looks like. I have absolutely no clue how to solve this so any help would be very much appreciated.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[warn] Executing in batch mode.
[warn] For better performance, hit [ENTER] to switch to interactive mode, or
[warn] consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading global plugins from C:\Users\Johner-Institut\.sbt\0.13\plugins
Waiting for lock on C:\Users\Johner-Institut\.ivy2\.sbt.ivy.lock to be available...
[info] Loading project definition from C:\Users\Johner-Institut\Desktop\Project\project
C:\Users\Johner-Institut\Desktop\Project\build.sbt:5: error: recursive value project needs type
lazy val `project` = (project in file(".")).enablePlugins(PlayScala)
^
sbt.compiler.EvalException: Type error in expression
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
Don't use project as a name for sbt project, that's why the recursion error. Try something like:
lazy val root = (project in file(".")).enablePlugins(PlayScala)

Intellij IDEA + SBT: skip download errors for non-existing Sources/Javadocs

In Intellij IDEA (2016), with Download: Sources and Javadocs enabled, (can't insert image inline due to lack of reputation)
SBT will attempt to download Sources and Javadocs for all dependencies, whether or not they exist.
Problem is, when a dependency (or worse, nested dependency) does not have a Source/Javadoc, the build will fail.
Is there any way to configure IDEA/SBT to check and skip downloading Sources/Javadocs if it does not exist, or ignore errors when downloading Sources/Javadocs, without having to append
withSources() withJavadoc()
to every dependency?
For example, a dependency relying on Antlr 2.7.7, which does not have Javadocs (antlr-2.7.7-javadoc.jar) in Maven Central (https://repo1.maven.org/maven2/antlr/antlr/2.7.7/), with Download: Javadoc enabled, will return error:
SBT project import
[warn] [FAILED ] antlr#antlr;2.7.7!antlr.jar(doc): (0ms)
[warn] ==== local: tried
[warn] C:\Users\Daniel\.ivy2\local\antlr\antlr\2.7.7\docs\antlr-javadoc.jar
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-javadoc.jar
[warn] ==== activator-launcher-local: tried
[warn] C:\Users\Daniel\.activator\repository\antlr\antlr\2.7.7\docs\antlr-javadoc.jar
[warn] ==== activator-local: tried
In Idea Settings > Build ... > Build Tools > sbt: uncheck Download Library sources and sbt sources

Use IntelliJ to debug a Gradle Execute Task

I have the following Gradle task:
task execute(type:JavaExec, dependsOn:['build']) {
main = 'com.something.Main'
classpath = sourceSets.main.runtimeClasspath
}
When I debug the task in IntelliJ I get the following error:
ERROR: transport error 202: connect failed: Connection refused
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
:execute FAILED
It seems later versions of IntelliJ Idea cannot connect debuggers to forked test runners when using the Gradle Test runner.
In your sources root, add a gradle.properties file with the next two lines:
maxTestForks = 1
testForkEvery = 0
That should do the job.
I had a very similar problem. When I was invoking Gradle in IntelliJ, the Java environment by default contained
JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59842,suspend=y,server=n
I removed the JAVA_OPTS from the environment all together and voila, no more JDWP error because no more JDWP.

Cargo start up error

I am running 'mvn clean install -Dmaven.test.skip=true' command for a web application. but it gives following error. I set the catalina home as an environment variable. i am using maven 3.1.1 version. Please help me
FATAL ERROR in native method: JDWP No transports i
nitialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
[WARNING] [talledLocalContainer] ERROR: transport error 202: bind failed: Addres
s already in use
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:star
t (start-container) on project RCMigrationWebApp: Execution start-container of g
oal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:start failed: Failed to start t
he Tomcat 7.x container. Deployable [http://localhost:8080/cargocpc/index.html]
failed to finish deploying within the timeout period [120000]. The Deployable st
ate is thus unknown. -> [Help 1]
Probably you have to kill any process running at 8080, looks like the port is already in use..
ERROR: transport error 202: bind failed: Address already in use
Port in use. Run netstat -bv if you are using Windows. You will get to know which process is holding up the port. With your stackTrace, it looks very obvious.
Let me know if it helps.