Closed solarmosaic-kflorence closed 3 years ago
This is also causing problems due to https://github.com/ITV/scala-pact/pull/149
As a workaround for now I can update my pipeline to only publish pact files for a specific project (e.g. sbt impl/pactPublish
).
I think updating this line to noTrigger
would at least make the pact settings only apply to the projects it is explicitly enabled on https://github.com/ITV/scala-pact/blob/master/sbt-scalapact/src/main/scala/com/itv/scalapact/plugin/ScalaPactPlugin.scala#L18
Currently it is being applied to every project regardless of whether or not .enablePlugins(ScalaPactPlugin)
is defined
@solarmosaic-kflorence does .disablePlugins(ScalaPactPlugin)
in your sub-projects also give the desired effect?
@jbwheatley it does, but I think that is a much less desirable approach and also not what I expected given the documentation in the readme.
Another benefit of using noTrigger
is that it is more flexible. For example, I want to limit the plugin to the Pact
configuration in my project (so that all code would go into src/pact/scala
and everything would be executed with sbt pact:X
). Right now, I cannot eliminate the settings in the compile and test scope, so for example pactTest
exists at both sbt pactTest
and sbt pact:pactTest
. Plus, I have to include my plugin and explicitly disable this plugin on all but one of my sub-projects.
I have an sbt project that contains multiple sub-projects. For example:
root
api
impl
client
smoke
Even though I've only included the
ScalaPactPlugin
on one project and provided settings to one project (impl
), it seems to be binding to every projects settings. So when I runsbt test
I get a lot of duplicate output and error messages for projects I haven't configured. It looks like this:I would expect my settings to have only applied to the single project to which I applied them. I have also tried creating a configuration specifically for pact like so:
Attempting to configure pact to only run when I specify
sbt pact:test
-- but the settings also seem to bleed outside of this configuration.