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

Suggestion: Create runnable jar by default #17

Open
fwilhe2 opened this issue Dec 2, 2021 · 3 comments
Open

Suggestion: Create runnable jar by default #17

fwilhe2 opened this issue Dec 2, 2021 · 3 comments

Comments

@fwilhe2
Copy link
Contributor

fwilhe2 commented Dec 2, 2021

I like this archetype 👍

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.

@gunnarmorling
Copy link
Member

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?

@fwilhe2
Copy link
Contributor Author

fwilhe2 commented Dec 4, 2021

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.

@gunnarmorling
Copy link
Member

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.

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