There are 3 plugins for generating to create a JAR-File in maven:
- maven-jar-plugin
- maven-assembly-plugin
- maven-shade-plugin
maven-jar-plugin:This plugin provides the capability to build and sign jars.But it just compiles the java files under src/main/java and /src/main/resources/.It doesn't include the dependencies JAR files.
<!--exclude all xml files from the jar-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>