<packaging>war</packaging>
<properties> <start-class>com.jd.melon.web.Application</start-class> </properties>
<build> <resources> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> <includes> <include>**/*.*</include> </includes> </resource> </resources> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.0.1.RELEASE</version> <configuration> <fork>true</fork> <!-- spring-boot:run 中文乱码解决 --> <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments> </configuration> </plugin> <!-- 编译插件,以${java.version}编译 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> </configuration> </plugin> <!-- war发布打包,并war包直接输出到tomcat下 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> <configuration> <!-- 设置成false,否则检查web.xml是否存在。因为springboot是没有web.xml的 --> <failOnMissingWebXml>false</failOnMissingWebXml> <warName>boundless-inventory-web</warName> <archive> <manifest> <mainClass>${start-class}</mainClass> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> </manifest> </archive> </configuration> </plugin> <!-- 将resources目录下文件打包进去 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <configuration> <encoding>UTF-8</encoding> <delimiters> <delimiter>@</delimiter> </delimiters> <useDefaultDelimiters>false</useDefaultDelimiters> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.8.1</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build>