我想使用maven替換我的war文件中的一些* .properties文件。Maven資源不復制文件
因此我在我的資源文件夾中創建了文件夾dev,test和prod。現在我只想在執行相應的配置文件時在我的war文件的資源文件夾路徑中使用這些文件夾中的一個。結果是maven正在複製所有其他文件夾,所以這些文件夾在類路徑中是雙重的。下面是我的配置:
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>copy-dev-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<overwrite>true</overwrite>
<outputDirectory>${basedir}/target/classes</outputDirectory>
<resources>
<resource>
<!-- source -->
<directory>src/main/resources/dev</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
如何配置Maven,現在它的唯一拷貝文件夾的src /主/資源/開發的目標/班的內容是什麼?
謝謝你的幫助