How to access sbt settings in plugin?

54 views
Skip to first unread message

Ezh

unread,
Aug 11, 2012, 11:56:32 AM8/11/12
to simple-b...@googlegroups.com
I wrote simple plugin, only few strings:

object Align extends Plugin {
  val newTask = TaskKey[UpdateReport]("new-task")
  val newSetting = SettingKey[String]("new-setting")
  def newupdateSbtClassifiers = (ivySbt,
    classifiersModule in GlobalScope in updateSbtClassifiers, updateConfiguration,
    ivyScala,
    target in LocalRootProject,
    appConfiguration,
    streams) map {
      (is, mod, c, ivyScala, out, app, s) =>
        withExcludes(out, mod.classifiers, lock(app)) { excludes =>
          IvyActions.transitiveScratch(is, "sbt", GetClassifiersConfiguration(mod, excludes, c, ivyScala), s.log)
        }
    }

  val newSettings = Seq(
    newSetting := "test",
    newTask <<= newupdateSbtClassifiers)
}

after I call new task with
> new-task

I got an error

[info] [error] Reference to undefined setting:
[info] [error]
[info] [error]   */*:classifiers-module(for update-sbt-classifiers) from *:new-task
[info] [error]      Did you mean *:classifiers-module(for update-sbt-classifiers) ?

It is very confusing because the only difference is */
*/*:classifiers-module(for update-sbt-classifiers)
vs
*:classifiers-module(for update-sbt-classifiers)

how to access to classifiers-module? or maybe re implement it in my own scope?

sbt console
> show classifiers-module(for update-sbt-classifiers)
work like a charm. I want something like this.

Ezh

unread,
Aug 11, 2012, 12:14:32 PM8/11/12
to simple-b...@googlegroups.com
Ups, sorry. in GlobalScope is really unnecessary. So simple.

суббота, 11 августа 2012 г., 19:56:32 UTC+4 пользователь Ezh написал:
Reply all
Reply to author
Forward
0 new messages