<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy-jar</id>
<phase>package</phase>
<configuration>
<tasks>
<copy todir="./targetdir">
<fileset dir="./fromdir">
<include name="*.jar" />
</fileset>
</copy>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
转载于:https://my.oschina.net/jingshishengxu/blog/1799936