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

Allow adding dependencies to dependencyManagement #15

Open
Riduidel opened this issue Aug 10, 2024 · 4 comments
Open

Allow adding dependencies to dependencyManagement #15

Riduidel opened this issue Aug 10, 2024 · 4 comments

Comments

@Riduidel
Copy link

The pom add command currently adds direct dependencies. It would be a nice thing to be able to add dependencies in dependencyManagement.

@Riduidel
Copy link
Author

Wait, it seems like when I add a dependency both in parent and child, dependencies are moved to dependencyManagement ? That's cool!

@andirady
Copy link
Owner

I'm bad at writing sentences, but here's how it works:

  1. when the project is packaged as "pom", dependencies will be added to the dependencyManagement
  2. when the project is a submodule, the dependency will be added directly to the pom but with the version omitted if the dependency is managed by either the parent or one of the imported dependency in the dependencyManagement
  3. when the dependency has import scope and of type pom, it'll be always be added to dependencyManagement.

@Riduidel
Copy link
Author

This should be added to readme ;-), want some PR ?

@andirady
Copy link
Owner

This should be added to readme ;-), want some PR ?

PR is always welcomed. 😁

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

2 participants