<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>target/lib</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<!--<configuration>-->
<!--<excludes>-->
<!--<exclude>**/*.properties</exclude>-->
<!--<exclude>**/*.xml</exclude>-->
<!--<exclude>**/*.yml</exclude>-->
<!--<exclude>static/**</exclude>-->
<!--<exclude>templates/**</exclude>-->
<!--</excludes>-->
<!--</configuration>-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<property name="dist-tmp">MAVEN目录\${project.artifactId}\${project.version}</property>
<property name="app-name">${project.artifactId}-${project.version}</property>
<mkdir dir="${dist-tmp}" />
<copy file="target/${app-name}.jar" tofile="${dist-tmp}/${app-name}.jar" />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>