IntelliJ Cannot Import sbt Project

I solved the sync issue following info here: https://youtrack.jetbrains.com/issue/SCL-13024 Key info is “It seems that sbt is trying to re-resolve ‘sources’ and ‘docs’ for sbt plugins that are not available at all. If properties to download “Library sources” and “sbt sources” are disabled, then time to dump the structure is reduced from ‘forever’ to less … Read more

Enforcing Java version for Scala project in sbt?

Using javacOptions ++= Seq(“-source”, “1.7”, “-target”, “1.7”) does not work if you have no Java sources. But you can set the target JVM for the Scala compiler in build.sbt or Build.scala: scalacOptions += “-target:jvm-1.7” As a result it prints on a JDK 6: $ sbt clean run [info] Set current project to default-cd5534 (in build … Read more

how do I get sbt to use a local maven proxy repository (Nexus)?

Step 1: Follow the instructions at Detailed Topics: Proxy Repositories, which I have summarised and added to below: (If you are using Artifactory, you can skip this step.) Create an entirely separate Maven proxy repository (or group) on your corporate Maven repository, to proxy ivy-style repositories such as these two important ones: http://repo.typesafe.com/typesafe/ivy-releases/ http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/ This … Read more

How to set main class in build?

The main Class must be fully qualified with the package: Compile/mainClass := Some(“myPackage.aMainClass”) This will work for run and it will set the Main-Class in the Manifest when using the package task. The main class for these tasks can be set separately as in: mainClass in (Compile, run) := Some(“myPackage.aMainClass”) mainClass in (Compile, packageBin) := … Read more

How to manage multiple interdependent modules with SBT and IntelliJ IDEA?

The approach with multi-project build is the correct one. You can have a nested tree of subprojects of arbitrary length, but you cannot have a module belonging to multiple parent projects. This makes absolutely sense, and in Maven happens the same. The reason is that it would be hard to have the same module into … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)