Trouble getting global plugins to work in 0.11

33 views
Skip to first unread message

Bart Schuller

unread,
Sep 28, 2011, 4:27:41 PM9/28/11
to simple-b...@googlegroups.com
Hi,

I have a hard to diagnose problem with global plugins and sbt 0.11.0.

~/.sbt contains:
  boot
  plugins.sbt
  target

In plugins.sbt I have just

  resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"

  addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "0.11.0")

  addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.7.0")

If I now

  mkdir foo
  cd foo
  sbt

then neither of the plugins are available. If I then

  mkdir project
  touch project/plugins.sbt
  sbt

then suddenly sbt recognizes the global plugins.
I don't think that difference is supposed to be there.

See also https://github.com/mpeltonen/sbt-idea/issues/95 where I started my search for answers.

Any ideas?

Regards,

Bart.

eugene yokota

unread,
Sep 28, 2011, 4:39:58 PM9/28/11
to simple-b...@googlegroups.com
I ran into the same issue with sbt-twt.

While it probably *should* be consistent with project/plugins.sbt for
build, release note does say look at [Plugin][1] page for details, and
Plugin page says follows:

> The ~/.sbt/plugins/ directory is treated as a global plugin definition project.

[1]: https://github.com/harrah/xsbt/wiki/Plugins

-eugene

> --
> You received this message because you are subscribed to the Google Groups
> "simple-build-tool" group.
> 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.
>

Bart Schuller

unread,
Sep 28, 2011, 4:46:59 PM9/28/11
to simple-b...@googlegroups.com

On Sep 28, 2011, at 22:39, eugene yokota wrote:

> I ran into the same issue with sbt-twt.
>
> While it probably *should* be consistent with project/plugins.sbt for
> build, release note does say look at [Plugin][1] page for details, and
> Plugin page says follows:
>
>> The ~/.sbt/plugins/ directory is treated as a global plugin definition project.
>
> [1]: https://github.com/harrah/xsbt/wiki/Plugins


But that page also says:

Global plugins example

The simplest global plugin definition is declaring a library or plugin in ~/.sbt/plugins.sbt:

libraryDependencies += "org.example" %% "example-plugin" % "0.1"

This plugin will be available for every sbt project for the current user.

so I don't think that's the reason.

--
Bart.S...@gmail.com

Mark Harrah

unread,
Sep 29, 2011, 2:58:14 PM9/29/11
to simple-b...@googlegroups.com
On Wed, 28 Sep 2011 22:46:59 +0200
Bart Schuller <Bart.S...@gmail.com> wrote:

>
> On Sep 28, 2011, at 22:39, eugene yokota wrote:
>
> > I ran into the same issue with sbt-twt.
> >
> > While it probably *should* be consistent with project/plugins.sbt for
> > build, release note does say look at [Plugin][1] page for details, and
> > Plugin page says follows:
> >
> >> The ~/.sbt/plugins/ directory is treated as a global plugin definition project.
> >
> > [1]: https://github.com/harrah/xsbt/wiki/Plugins
>
>
> But that page also says:
>
> Global plugins example
>
> The simplest global plugin definition is declaring a library or plugin in ~/.sbt/plugins.sbt:

Sorry, that should be ~/.sbt/plugins/build.sbt. I fixed it.

-Mark

Reply all
Reply to author
Forward
0 new messages