Avatar ·

How to create an executable JAR file with all dependencies in Maven?

Hi everyone! I'm a beginner Java developer and I've encountered a problem when building a project with Maven. I have a simple console application that uses the Apache Commons CSV library to read CSV files. Inside the IDE (IntelliJ IDEA), everything works fine. But when I try to build an executable JAR file using `mvn package`, the resulting archive does not run. Here is my `pom.xml` file: ```xml 4.0.0 com.example csv-reader 1.0 jar org.apache.commons commons-csv 1.9.0