I have a project that contains a single module, and some dependencies. I\'d like to create a jar, in a separate directory, that contains the compiled module. In addition, I\
This is still an issue in 2017, I hope it will help somebody out there! I found 2 possibilities to create working jar-s under IntelliJ 2017.2
1. Creating artifact from IntelliJ:
You have to change manifest directory:
\src\main\java
replace "java" with "resources"
\src\main\resources
This is how it should look like:
Then you choose the dependencies what you want to be packed IN your jar, or NEAR your jar file
To build your artifact go to build artifacts and choose "rebuild". It will create an "out" folder with your jar file and its dependencies.
2. Using maven-assembly-plugin
Add build section to the pom file
maven-assembly-plugin
ServiceCreate
false
com.svt.optimoo.App
jar-with-dependencies
org.apache.maven.plugins
maven-compiler-plugin
1.8
This procedure will create the jar file under the "target" folder