using local maven repositories

239 views
Skip to first unread message

Justin Lee

unread,
Oct 9, 2012, 9:32:55 PM10/9/12
to play-framework
I'm trying to convince play to use my local maven repository and not having much luck.  Based on various bits of advice on blogs and irc i've been trying this:

  val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(defaultJavaSettings: _*).settings(
//     resolvers += "Local Repository" at file(Path.userHome + "/.m2/repository")(Resolver.mavenStylePatterns)
     resolvers += Resolver.file("Local Repository", file(Path.userHome + "/.m2/repository"))(Resolver.mavenStylePatterns)
  )

In various attempts I've tried one line or the other there but I always end up with something like this:

[error] /Users/jlee/personal/dev/ophelia/project/Build.scala:17: not found: value resolvers
[error]      resolvers += Resolver.file("Local Repository", file(Path.userHome + "/.m2/repository"))(Resolver.mavenStylePatterns)
[error]      ^
[error] one error found
[error] {file:/Users/jlee/personal/dev/ophelia/project/}default-bfbbcc/compile:compile: Compilation failed


What am I missing?

--

Alexandre Patry

unread,
Oct 10, 2012, 8:01:41 AM10/10/12
to play-fr...@googlegroups.com


Le mardi 9 octobre 2012 21:33:02 UTC-4, Justin Lee a écrit :
I'm trying to convince play to use my local maven repository and not having much luck.  Based on various bits of advice on blogs and irc i've been trying this:

  val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(defaultJavaSettings: _*).settings(
//     resolvers += "Local Repository" at file(Path.userHome + "/.m2/repository")(Resolver.mavenStylePatterns)
     resolvers += Resolver.file("Local Repository", file(Path.userHome + "/.m2/repository"))(Resolver.mavenStylePatterns)
  )

In various attempts I've tried one line or the other there but I always end up with something like this:

[error] /Users/jlee/personal/dev/ophelia/project/Build.scala:17: not found: value resolvers
[error]      resolvers += Resolver.file("Local Repository", file(Path.userHome + "/.m2/repository"))(Resolver.mavenStylePatterns)
[error]      ^
[error] one error found
[error] {file:/Users/jlee/personal/dev/ophelia/project/}default-bfbbcc/compile:compile: Compilation failed


What am I missing?

Here is what I am using :


val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
    resolvers += "Local Maven Repository" at "file://" + Path.userHome.absolutePath + "/.m2/repository"
)

I think you can remove the call to ".settings(defaultJavaSettings: _*)".

Hth,

Alexandre

Justin Lee

unread,
Oct 11, 2012, 10:36:44 PM10/11/12
to play-fr...@googlegroups.com
I literally cut and paste that and it gave the same error.  Do i need to add something to the Object declaration?  This is what I have:

object ApplicationBuild extends Build {


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/80pznYs8l9kJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
Reply all
Reply to author
Forward
0 new messages