apache / daffodil-sbt

Apache Daffodil SBT Plugin
https://daffodil.apache.org/
Apache License 2.0
1 stars 3 forks source link

Require plugin to be explicitly enabled #25

Closed stevedlawrence closed 6 months ago

stevedlawrence commented 6 months ago

Currently, if this plugin is added to a project with "addSbtPlugin" in plugins.sbt, then it is automatically enabled for all subprojects as well. For projects that are made up of multiple subprojects, some of which might not be DFDL schema projects, this might not be desired, since it automatically adds things like test dependencies.

We should change this plugin so it must be explicitly enabled by adding enablePlugins(DaffodilPlugin) in the build.sbt file.

This would have the added benefit that you can more easily tell a project is a DFDL project by looking at the build.sbt, since often the defaults provided by the plugin are good enough that all that is needed is the "enablePlugins" line.

Additionally, we may want to create plugins in the future that are separate from this but depend on it and are enabled only if this plugin is enabled (e.g. IBM cross tester, XSAT). SBT provides that capability, but it means this plugin must not be automatically enabled.