Issue
I'm trying to use dependency that is published to local maven repo. I'm using SBT 0.13.7 under Windows with JDK8. Here is what I tried in my build.scala
resolvers ++= {
val mavenLocal = Resolver.file("local2", file(Path.userHome + "/.m2/repository"))(Resolver.mavenStylePatterns)
Seq(
mavenLocal,
// Resolver.publishMavenLocal,
"spray releases" at "http://repo.spray.io/",
"spray nightlies" at "http://nightlies.spray.io/",
"jasperreports" at "http://jasperreports.sourceforge.net/maven2/",
"Akka Snapshot Repository" at "http://repo.akka.io/snapshots/",
"Miredot" at "http://nexus.qmino.com/content/repositories/miredot"
)
}
Strangely it doesn't work for me. I'm monitoring system file activity and SBT doesn't even try to go to above mentioned folder. I even tried to use provided Resolver.publishMavenLocal
.
Here is what I get in the log
[warn] module not found: com.wordnik#swagger-jersey2-jaxrs;1.5.2-M2-SNAPSHOT
[warn] ==== local: tried
[warn] C:\Users\root\.ivy2\local\com.wordnik\swagger-jersey2-jaxrs\1.5.2-M2-SNAPSHOT\ivys\ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/wordnik/swagger-jersey2-jaxrs/1.5.2-M2-SNAPSHOT/swagger-jersey2-jaxrs-1.5.2-M2-SNAPSHOT.pom
[warn] ==== local2: tried
[warn] ==== spray releases: tried
[warn] http://repo.spray.io/com/wordnik/swagger-jersey2-jaxrs/1.5.2-M2-SNAPSHOT/swagger-jersey2-jaxrs-1.5.2-M2-SNAPSHOT.pom
[warn] ==== spray nightlies: tried
[warn] http://nightlies.spray.io/com/wordnik/swagger-jersey2-jaxrs/1.5.2-M2-SNAPSHOT/swagger-jersey2-jaxrs-1.5.2-M2-SNAPSHOT.pom
[warn] ==== jasperreports: tried
[warn] http://jasperreports.sourceforge.net/maven2/com/wordnik/swagger-jersey2-jaxrs/1.5.2-M2-SNAPSHOT/swagger-jersey2-jaxrs-1.5.2-M2-SNAPSHOT.pom
[warn] ==== Akka Snapshot Repository: tried
[warn] http://repo.akka.io/snapshots/com/wordnik/swagger-jersey2-jaxrs/1.5.2-M2-SNAPSHOT/swagger-jersey2-jaxrs-1.5.2-M2-SNAPSHOT.pom
[warn] ==== Miredot: tried
[warn] http://nexus.qmino.com/content/repositories/miredot/com/wordnik/swagger-jersey2-jaxrs/1.5.2-M2-SNAPSHOT/swagger-jersey2-jaxrs-1.5.2-M2-SNAPSHOT.pom
Am I missing something ?
Solution
I usually use this line when I need to import libraries from my local maven repository:
resolvers += "Local Maven" at Path.userHome.asFile.toURI.toURL + ".m2/repository"
Answered By - Carlos Vilchez
Answer Checked By - Terry (JavaFixing Volunteer)