Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unscoped task does not work when another AutoPlugin declares projectConfigurations #105

Open
pelepelin opened this issue Jan 22, 2018 · 0 comments

Comments

@pelepelin
Copy link

Expected vs Actual Behaviour

It should...

Both jacoco and test:jacoco should work.

Instead it...

> jacoco
[error] Not a valid command: jacoco
[error] Not a valid project ID: jacoco (similar: double-jacoco)
[error] Expected ':' (if selecting a configuration)
[error] Ambiguous keys: test:jacoco, test:jacoco
[error] jacoco
[error]       ^
> test:jacoco
[info] Instrumenting 0 classes to C:\dev\java\tmp\double-jacoco\target\scala-2.12\jacoco\instrumented-
... skip ...
[success] Total time: 0 s, completed 22.01.2018 22:09:39

Steps to Reproduce

build.sbt

enablePlugins(MyPlugin)
scalaVersion := "2.12.4"

project/MyPlugin.scala

import sbt._
object MyPlugin extends AutoPlugin {
  override def projectConfigurations = Seq(Test)
}

project/build.properties

sbt.version = 0.13.16

project/plugins.sbt

addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.0.3")

Environment

  • SBT version: 0.13.16
  • Plugin version: 3.0.3
  • Scala version(s): 2.12.4
  • Java version:
    java version "1.8.0_131"
    Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Side note: each plugin should declare which configurations it uses by overriding projectConfigurations, but this apparently does not fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant