oss-quickstart
oss-quickstart copied to clipboard
Suggestion: Create runnable jar by default
I like this archetype :+1:
I guess this might be a bit controversial, not sure if this is inside the scope of this archetype, but I'd propose to add a main
method and set it so we get a jar that can be run with java -jar target/app.jar
.
Honestly that is something where I always need to look up how to do it again, so it would be really nice if it was an (optional?) feature of this archetype.
Yes, I think that's a good idea. Not even sure whether it's that controversial, we could also make this an option in the archetype. Would you perhaps be interested in sending a PR?
So I assume it would make sense to have this as an option, but then there are follow up questions like should it be a shaded/shadow jar. Not sure what the best general purpose way to do that is, but it might be a good opportunity to do some research into this.
So I assume it would make sense to have this as an option
+1 Yes, either an option, or having two separate archetypes, one for libraries, one for applications. If we can get away with the option, that'd be my preference.
but then there are follow up questions like should it be a shaded/shadow jar
I don't think it should. Fat JARs are not a good practice IMO, in particular preventing efficient updates of Linux container images with layered file systems. I'd rather not proliferate their usage via this archetype.