idea maven pom打包配置
阿新 • • 發佈:2019-02-01
<build>
<finalName>ssmmvn</finalName>
<resources>
<!--將java下的配置檔案打包-->
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<!--將resources下的配置檔案打包 -->
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<!--maven打包必要外掛-->
<plugin >
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<webResources>
<resource>
<!--web路徑,該路徑以專案為根路徑-->
<directory>src/main/webapp</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins >
</build>
<finalName>ssmmvn</finalName>
<resources>
<!--將java下的配置檔案打包-->
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<!--將resources下的配置檔案打包
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<!--maven打包必要外掛-->
<plugin
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<webResources>
<resource>
<!--web路徑,該路徑以專案為根路徑-->
<directory>src/main/webapp</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins
</build>