1.pom文件
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>CSPInstructionService</finalName>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>package</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
2.assembly.xml
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>release</id>
<includeBaseDirectory>true</includeBaseDirectory>
<formats>
<format>tar.gz</format>
<format>dir</format>
</formats>
<fileSets>
<fileSet>
<outputDirectory>/bin</outputDirectory>
<directory>${basedir}/profiles/${profile.id}/bin</directory>
</fileSet>
<fileSet>
<outputDirectory>bin</outputDirectory>
<directoryMode>0755</directoryMode>
<directory>${basedir}/shell</directory>
</fileSet>
<fileSet>
<outputDirectory>/conf</outputDirectory>
<directory>${basedir}/profiles/${profile.id}/conf</directory>
</fileSet>
<fileSet>
<outputDirectory>conf</outputDirectory>
<directory>${basedir}/src/main/resources</directory>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<scope>system</scope>
<outputDirectory>lib</outputDirectory>
</dependencySet>
<dependencySet>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>
网友评论