Can multiple subprojects be published to Maven Central as a single jar

I’m looking into paralleling the build of a complex Java library. There is a large subproject that basically all the other subprojects depend on. For sake of reducing build time, I’m considering breaking that up into multiple subprojects that can be compiled in parallel, but I don’t want to degrade the user experience and make them deal with a multitude of dependencies.

I’m not asking how to combine multiple subprojects into a single jar. Besides being very well documented, getting a single combined jar locally won’t help. The goal is to break up a subproject and have it publish to Maven Central exactly as it did before being broken up.

This question does imply that to parallelize the build even more i need to break up the subproject. If there’s a way to parallelize the build of a subproject without breaking that up I would like to learn abotu that.


1 Like