Add a starter to an existing project
cmoulliard opened this issue · 1 comments
cmoulliard commented
The command spring-boot-new-project
allows to create a new project but not to add to an existing project starters.
That could be interesting to check if start.spring.io offers this opportunity or if we should find our own way to add such starters/artifacts and import pom file within the dependenciesManagement section
sebastienblanc commented
Not sure how start.spring.io could help on this, I think this could be done simply with the DependencyFacet
. We retrieve the list of deps from start.spring.io (or the cached one) and for each dep/starter selected we check if there is an entry in the bom
section as well, like :
"boms": {
...
"keycloak": {
"repositories": [],
"groupId": "org.keycloak.bom",
"artifactId": "keycloak-adapter-bom",
"version": "3.1.0.Final"
}
...
}
...
"keycloak": {
"bom": "keycloak",
"groupId": "org.keycloak",
"scope": "compile",
"artifactId": "keycloak-spring-boot-starter"
},
...
bom
entry can then be added using dependencyFacet.addManagedDependency()