Not able to resolve dependencies in maven project - scala

How to resolve my maven project dependencies in intelliJ?

Related

How to add maven goals in Eclipse for all Maven projects

I know how to add a Maven goal to a Maven project in Eclipse. How can I add a Maven goal e.g.:
mvn install -DskipTests
for all my Maven projects in Eclipse?

How to import SBT dependencies manually in intellij

I want to use Intellij as Spark and Scala editor so I should create an SBT project. Scala and SBT plugins are installed, but the problem is when I create SBT project, at the first it try to fetch SBT plugins and dependencies from here but it stuck on sbt getting org.scala-sbt 0.13.13 step! sometime it progresses but finally errors time out! I have access to address SBT want get dependencies by browser and I want to know is it possible to download dependencies manually and put in the right place ?
You can find the detailed steps in this chapter of Scala Cookbook. In build.sbt file you should add a resolver key including the Ivy repository you want.
resolvers += "Your Repository" at "Repository Location"

Importing scala sbt project to Scala IDE build of Eclipse SDK

I have downloaded github project which have spark scala code and build it using sbt. I am trying to import the project to below version of Scala IDE. But I do not see the option to import sbt or scala project. How can I import it?
Scala IDE build of Eclipse SDK
Build id: 4.1.0-vfinal-20150704-2326-Typesafe
Use plug-ins that can generate Eclipse project files out of the sbt project definition.
sbt 0.7.x, use eclipsify
sbt 0.12.x, use sbteclipse
Add the plugin to project/plugins.sbt file.
example: addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")
Run sbt eclipse

Errored Maven dependencies

My dependencies issues:
My Maven Errors:
There are around 114 unresolved dependencies showing.
But I see all those dependencies jars under .m2/repositories
Could this be eclipse or maven version issue ??

Include Dependencies in JAR using SBT package

Apparently project dependencies are not being packaged into the jar generated by:
sbt package
How can dependencies be included?
Well, I use sbt-assembly plugin to create jar with dependencies,
(1) add sbt-assembly to projects/assembly.sbt
echo 'addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.8")' > project/assembly.sbt
(2) run sbt clean assembly to build the jar.
It will create ${name}-assembly-${version}.jar in target/scala-${scalaVersion}
(3) Only in case you get infamous de-duplicate error, use assemblyMergeStrategy as described in here
There's a project called onejar that will package a project and all its dependencies into a single jar file. There is an SBT plugin as well:
https://github.com/sbt/sbt-onejar
However if you're just looking to create a standard package (deb, rpm, etc.) there is sbt-native-packager:
https://github.com/sbt/sbt-native-packager
It can place all your dependencies into a Linux package and add the appropriate wrappers to load all your dependencies and start your program or service.