Skip to content

BuildFile.addDependencies(...) should not add existing dependency again #309

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

Closed
fabapp2 opened this issue Aug 9, 2022 · 1 comment · Fixed by #452
Closed

BuildFile.addDependencies(...) should not add existing dependency again #309

fabapp2 opened this issue Aug 9, 2022 · 1 comment · Fixed by #452
Labels
type: bug Something isn't working
Milestone

Comments

@fabapp2
Copy link
Contributor

fabapp2 commented Aug 9, 2022

To reproduce:

  • apply migrate-jpa-... (adds spring-boot-starter-data-jpa)
  • apply migrate-stateless-ejb(adds spring-boot-starter-data-jpa again to resolve @Transactional)
BuildFile bf = retrieveBuildFile();
bf.addDependency(Dependency.builder()); // e.g. add `foo:bar:1.0`
bf.addDependency(Dependency.builder()); // e.g. add `foo:bar:1.0` again

will add the dependency foo:bar:1.0 twice

@fabapp2 fabapp2 added the type: bug Something isn't working label Aug 9, 2022
@fabapp2 fabapp2 added this to the v0.13.0 milestone Sep 28, 2022
@fabapp2
Copy link
Contributor Author

fabapp2 commented Sep 29, 2022

Currently, the implementation will add a dependency with compile scope when the same dependency already exists with test scope. It should merge these dependencies and set the state accordingly (or throw exception?)
in #455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant