1 <build> 2 <finalName>bootstrap</finalName> 3 <sourceDirectory>${basedir}/src/main/</sourceDirectory> 4 <filters> 5 <filter>../conf/conf-pub.properties</filter> 6 </filters> 7 <plugins> 8 <plugin> 9 <artifactId> maven-assembly-plugin </artifactId> 10 <configuration> 11 <descriptorRefs> 12 <!-- descriptorRef 默认情况下,maven-assembly-plugin内置了几个可以用的 assembly descriptor:--> 13 <!-- bin : 类似于默认打包,会将bin目录下的文件打到包中--> 14 <!-- jar-with-dependencies : 会将所有依赖都解压打包到生成物中【本次需求正好是将所有依赖也打包】--> 15 <!-- src :只将源码目录下的文件打包 --> 16 <!-- project : 将整个 project 资源打包 --> 17 <descriptorRef>jar-with-dependencies</descriptorRef> 18 </descriptorRefs> 19 </configuration> 20 <executions> 21 <execution> 22 <id>make-assembly</id> 23 <phase>package</phase> 24 <goals> 25 <goal>single</goal> 26 </goals> 27 </execution> 28 </executions> 29 </plugin> 30 <plugin> 31 <groupId>org.apache.maven.plugins</groupId> 32 <artifactId>maven-assembly-plugin</artifactId> 33 <executions> 34 <execution> 35 <id>endv-package</id> 36 <phase>package</phase> 37 <goals> 38 <goal>single</goal> 39 </goals> 40 <configuration> 41 <descriptors> 42 <descriptor>${basedir}/assembly.xml</descriptor> 43 </descriptors> 44 <tarLongFileMode>gnu</tarLongFileMode> 45 </configuration> 46 </execution> 47 </executions> 48 </plugin> 49 </plugins> 50 <resources> 51 <resource> 52 <directory>src/main/resources</directory> 53 <includes> 54 <include>**/*</include> 55 </includes> 56 <filtering>true</filtering> 57 </resource> 58 </resources> 59 </build>