Include JDBC driver for Postgres in the JAR fo my simple demo app driven by Maven [duplicate]
问题 This question already has answers here : How can I create an executable JAR with dependencies using Maven? (31 answers) Closed 1 year ago . How to make Maven include the JDBC driver for Postgres inside my app's .jar file? I added this dependency element to the <dependencies> element in my POM. <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql --> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.2.8</version> </dependency> The