-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add AddPluginRepository
recipe
#4247
Conversation
Great start @jdmcmahan ! Symmetry with AddPlugin is clear indeed; from a maintainability point of view I'm wondering if we should add an option to AddRepository instead to make that add either a regular or a plugin repository. I'll think that over and update your PR before a merge. Thanks again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ended up indeed reusing AddRepository instead @jdmcmahan , just so that we have less copies to maintain over time. I've taken the example test that you had provided and added that into AddRepositoryTest. Thanks again for getting this started; with this option it should be usable already
Awesome!! Thanks for picking this up! |
What's changed?
This PR adds a recipe for
AddPluginRepository
which can be used to manage a<pluginRepositories>
configuration in a Maven POM.What's your motivation?
Although the
AddRepository
recipe is sufficient for most use cases, we encountered the need to reference a<pluginRepository>
for plugin-specific dependencies. The following example illustrates this:Anything in particular you'd like reviewers to focus on?
This change is naïve in the sense that it effectively just copies the logic from the
AddRepository
class. I'm open to any opportunities to reuse or improve the code.Anyone you would like to review specifically?
Have you considered any alternatives or workarounds?
AddRepository
does not provide an option to create the repository as a plugin repository. Maven itself does not fall back on non-plugin repositories for plugin dependencies.Any additional context
Checklist