Fork me on GitHub

pom.xml really needed for library jars, right?


but can be omitted when building "single file executable" uberjar?


@maxp Yes, if you're publishing a (library) JAR to Clojars or Maven Central, you need a pom.xml file that is deployed alongside the JAR (technically, the process could just look in the JAR file for a suitable pom.xml but I believe deployment would still need to know the group/artifact IDs -- which it can read easily from a pom.xml file!). But the pom.xml file can be entirely external to the JAR-building process since deployment only needs the JAR and the pom.xml file -- so building a library JAR doesn't require a pom.xml file but deploying it does.


If you're building a standalone (uber) JAR then you don't really need a pom.xml file. depstar can build uberjars without any additional information, that you can execute with java -cp path/to/the.jar clojure.main -m my.entry.point


Given a MANIFEST.MF file, specifying Main-Class: clojure.main you can just do java -jar path/to/the.jar -m my.entry.point (because it executes clojure.main/-main automatically).


I'm planning to refactor/cleanup the code quite a bit "soon" and then I'll rethink how a lot of the pom-related stuff needs to work. In theory, you could just provide the information depstar needs via command-line arguments and it wouldn't need a pom.xml for anything (but it's still "good practice" to have one or generate one).