Usually you can use maven-assembly-plugin to build one JAR file with all dependencies (JAR files which your project depends on). But this plug-in does not work for Spring bases applications. So you should use onejar-maven-plugin instead. Use it in the <build> phase like this:
<groupId>com.jolira</groupId>
<artifactId>onejar-maven-plugin</artifactId>
<version>1.4.4</version>
<executions>
<execution>
<configuration>
<mainClass>com.your.package.main.Main</mainClass>
<!-- Optional, default is false -->
<attachToBuild>true</attachToBuild>
<!-- Optional, default is "one jar" -->
<classifier>onejar</classifier>
</configuration>
<goals>
<goal>one-jar</goal>
</goals>
</execution>
</executions>
</plugin>
0 коментарі:
Дописати коментар