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

Optional plugin dependencies #186

Open
lefou opened this issue Mar 10, 2014 · 0 comments
Open

Optional plugin dependencies #186

lefou opened this issue Mar 10, 2014 · 0 comments

Comments

@lefou
Copy link
Member

lefou commented Mar 10, 2014

It would be nice to have optional plugin dependencies.

Use Case:
The new Source Scheme Plugin (https://github.com/SBuild-org/sbuild-sourcescheme-plugin) is capable of providing source jars for arbitrary dependencies. It registeres a "source:" scheme which will be used e.g. by the eclipse plugin to download source jars.

If a user uses e.g. the Aether plugin to provide transitive dependencies with Eclipse Aether (https://github.com/SBuild-org/sbuild-aether-plugin), it would be great, if the Aether plugin would reconfigure the Source Scheme plugin to also support "aether:" dependencies. But, it should also work, if no Source Scheme plugin is present.

What is needed?

  • A way to express optional dependencies. The PluginDependency traits that is used by the PluginWithDependencies trait need another implementation supporting optional plugins.
  • A way to check if a plugin is available. The Plugin object need a new method: def isAvailable(pluginClass: String, version: String): Boolean, whereas the version string might even be a range.
  • Some nice API to only process a plugin, if it is available. I think of a method expecting the name and version of the required plugin and a closure, which requires the available plugin. Of course, the closure will only be loaded, if the plugin is available, avoiding ClassNotFoundErrors and the like.
@lefou lefou modified the milestone: SBuild 0.8.0 May 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant