I'm developing a java project that I'd eventually like to publish and make open source.
To make a executable jar file I use the
maven-assembly-plugin. This includes my dependencies in the jar, which makes it easy to deploy as the user (currently only me) doesn't have to add the dependency jars in a different
lib/ folder or something along those lines. For my personal use I don't think there should be any issue there.
Once I publish my project, how should I go about this?
I found many questions talking about how to accomplish a executable jar (on stackoverflow), but none talking about the fact whether I should or shouldn't publish it.
My main questions are the following:
- Is it legal to republish the dependencies in the jar directly in the same form as the
maven-assembly-pluginproduces the jar or do I have to include the licenses manually (e.g. Apache License 2.0) if my whole project is licensed under some more restrictive license?
- Is it good practice to republish the dependencies or should I let each user build their own version based on the
pom.xml? In my opinion, aside from the legal aspect (if question 1 would be answered with yes or for self-authored dependencies where licensing is not an issue), it feels like a redundant copy of the dependency just for the sake of simplicity for the end user. Not sure if I should feel good about this.
- If question 1 and question 2 would be answered with yes, can I put the runnable jar on maven central (or github packages etc.) or only on my own personal website/ as an artifact in a github release?
I'm not entirely sure if this question is on-topic here, but I found other questions related to licensing and questions related to maven, so I figured a combination should fit as well. If I'm wrong feel free to mark as off-topic and please leave me a comment which tells me in which stackexchange network this would be on-topic.