Re: [sbt] Searching local Maven repo documentation update

18 views
Skip to first unread message

Doug Tangren

unread,
Jan 2, 2013, 1:29:11 PM1/2/13
to simple-b...@googlegroups.com


On Wed, Jan 2, 2013 at 11:46 AM, Khonraad <a.kho...@khonraad.nl> wrote:
According to the documentation sbt 12.0 can sbt can search your local Maven repository if you add it as a repository:

resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
To me this didn't work until I left out the file:// part.


Moving forward, it would be helpful for build authors to use the provided constants. I think this also avoids some warnings when resolver names collide.

resolvers += Opts.resolver.mavenLocalFile

Using constants also avoids copy&paste in our builds which we all know will eventually lead to the propagation of bugs stemming from typos, ect.


If these aren't in the docs, I'll volunteer to contribute the writing.


 
--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To view this discussion on the web visit https://groups.google.com/d/msg/simple-build-tool/-/PfCD-ESx3iMJ.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

Mark Harrah

unread,
Jan 2, 2013, 2:03:14 PM1/2/13
to simple-b...@googlegroups.com
On Wed, 2 Jan 2013 13:29:11 -0500
Doug Tangren <d.ta...@gmail.com> wrote:

> On Wed, Jan 2, 2013 at 11:46 AM, Khonraad <a.kho...@khonraad.nl> wrote:
>
> > According to the documentation sbt 12.0 can sbt can search your local
> > Maven repository if you add it as a repository:
> >
> > resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
> >
> > To me this didn't work until I left out the *file://* part.
> >
> >
> Moving forward, it would be helpful for build authors to use the provided
> constants. I think this also avoids some warnings when resolver names
> collide.
>
> resolvers += Opts.resolver.mavenLocalFile
>
> Using constants also avoids copy&paste in our builds which we all know will
> eventually lead to the propagation of bugs stemming from typos, ect.

Agree. I believe this was Indrajit's intention with Opts. Feel free to enhance and document.

> You can find other resolver constants in
> https://github.com/harrah/xsbt/blob/0.13/main/src/main/scala/sbt/Opts.scala#L25-L28
>
> If these aren't in the docs, I'll volunteer to contribute the writing.

I don't think they are. A good start would just be using Opts.resolver.mavenLocalFile in the existing docs about the Maven local repository.

-Mark

Doug Tangren

unread,
Jan 2, 2013, 2:26:10 PM1/2/13
to simple-b...@googlegroups.com
On Wed, Jan 2, 2013 at 2:03 PM, Mark Harrah <dmha...@gmail.com> wrote:
On Wed, 2 Jan 2013 13:29:11 -0500
Doug Tangren <d.ta...@gmail.com> wrote:

> On Wed, Jan 2, 2013 at 11:46 AM, Khonraad <a.kho...@khonraad.nl> wrote:
>
> > According to the documentation sbt 12.0 can sbt can search your local
> > Maven repository if you add it as a repository:
> >
> > resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
> >
> > To me this didn't work until I left out the *file://* part.
> >
> >
> Moving forward, it would be helpful for build authors to use the provided
> constants. I think this also avoids some warnings when resolver names
> collide.
>
> resolvers += Opts.resolver.mavenLocalFile
>
> Using constants also avoids copy&paste in our builds which we all know will
> eventually lead to the propagation of bugs stemming from typos, ect.

Agree.  I believe this was Indrajit's intention with Opts.  Feel free to enhance and document.

> You can find other resolver constants in
> https://github.com/harrah/xsbt/blob/0.13/main/src/main/scala/sbt/Opts.scala#L25-L28
>
> If these aren't in the docs, I'll volunteer to contribute the writing.

I don't think they are.  A good start would just be using Opts.resolver.mavenLocalFile in the existing docs about the Maven local repository.


Thanks Mark. Now that I know they are there, it's a pet-peeve when I see people not using them. I bookmarked the page I think I need to update over lunch. http://www.scala-sbt.org/release/docs/Detailed-Topics/Resolvers.html. I'll try to tonight.  

Doug Tangren

unread,
Jan 2, 2013, 10:50:02 PM1/2/13
to simple-b...@googlegroups.com
On Wed, Jan 2, 2013 at 2:26 PM, Doug Tangren <d.ta...@gmail.com> wrote:

On Wed, Jan 2, 2013 at 2:03 PM, Mark Harrah <dmha...@gmail.com> wrote:
On Wed, 2 Jan 2013 13:29:11 -0500
Doug Tangren <d.ta...@gmail.com> wrote:

> On Wed, Jan 2, 2013 at 11:46 AM, Khonraad <a.kho...@khonraad.nl> wrote:
>
> > According to the documentation sbt 12.0 can sbt can search your local
> > Maven repository if you add it as a repository:
> >
> > resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
> >
> > To me this didn't work until I left out the *file://* part.
> >
> >
> Moving forward, it would be helpful for build authors to use the provided
> constants. I think this also avoids some warnings when resolver names
> collide.
>
> resolvers += Opts.resolver.mavenLocalFile
>
> Using constants also avoids copy&paste in our builds which we all know will
> eventually lead to the propagation of bugs stemming from typos, ect.

Agree.  I believe this was Indrajit's intention with Opts.  Feel free to enhance and document.

> You can find other resolver constants in
> https://github.com/harrah/xsbt/blob/0.13/main/src/main/scala/sbt/Opts.scala#L25-L28
>
> If these aren't in the docs, I'll volunteer to contribute the writing.

I don't think they are.  A good start would just be using Opts.resolver.mavenLocalFile in the existing docs about the Maven local repository.


Thanks Mark. Now that I know they are there, it's a pet-peeve when I see people not using them. I bookmarked the page I think I need to update over lunch. http://www.scala-sbt.org/release/docs/Detailed-Topics/Resolvers.html. I'll try to tonight.  



Had some issues with the sphinx doc generator tool. I wasn't sure which branch to branch of so I branched from 0.13. I think most of this is accurate 

Mark Harrah

unread,
Jan 3, 2013, 9:25:50 AM1/3/13
to simple-b...@googlegroups.com
On Wed, 2 Jan 2013 22:50:02 -0500
Thanks, Doug. The 0.13 branch is good. Were the problems with sphinx something that should be better documented on sbt's side?

-Mark
Reply all
Reply to author
Forward
0 new messages