Maven/Gradle wrapper modules
gzsombor opened this issue · comments
Currently, even the MAVEN_JAVA module install the maven wrapper, which IMHO incorrect, as it is impossible to create a project, without those wrapper. The Maven/Gradle wrapper doesn't make sense, without Maven/Gradle, so some sort of relations makes sense.
Having totally independent MAVEN_WRAPPER and MAVEN_JAVA module only makes sense, if someone would want to use on a project, which not initialized with JHipster-Lite previously. This is I think, currently more of a lucky bug, that it is works, and not a feature - One could say that they want to use SPRING_BOOT_PULSAR without running the SPRING_BOOT module.
I think, adding some sort of an auto-detection feature, could make sense - so for example, MAVEN_JAVA module could say, that whenever there is a 'pom.xml' file in the root of the project, consider MAVEN_JAVA is installed. That would enable a couple of scenarios to work - even though, not every one.
I can see, two possible way to improve the MAVEN_JAVA/MAVEN_WRAPPER setup:
- Either there should be only one MAVEN module, with a flag, to install the wrapper or not
- Those should be two separate modules, fixing the logic, to only install the wrapper, if MAVEN_WRAPPER is explicitly requested.
This is probably one of the hardest part of JHipster Lite, to know the limit of what to generate and not to generate :)
About your comment
Having totally independent MAVEN_WRAPPER and MAVEN_JAVA module only makes sense, if someone would want to use on a project, which not initialized with JHipster-Lite previously
It's ok as the maven-wrapper
is still usable directly using the Patches page:
So if I understand well your suggestions, I would say:
- let's keep 2 distinct modules, it's easier to maintain than using a flag in config
- maven-java should only generate pom.xml, and not the maven-wrapper any more --> need another PR
- maven-wrapper depends on maven-java, as you did in your other pull request
Is it fine for you @gzsombor ?
Thanks, that was my suggestion too!