Maven自定义打包
<plugin><groupId>org.apache.maven.plugins</groupId>
maven-assembly-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>assembly.xml
<id>bin</id>
<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>config</directory>
<outputDirectory>/config</outputDirectory>
</fileSet>
<fileSet>
<directory>script</directory>
<outputDirectory>script</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>script</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>run.sh</include>
<include>run_cluster.sh</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>target</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>xxx-*.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>docs</directory>
<outputDirectory>docs</outputDirectory>
<fileMode>0644</fileMode>
</fileSet>
</fileSets>
</assembly>
来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页:
[1]