我有默認的Maven結構停止Maven的:如何從覆蓋資源文件
main
--java
--resources
--webapp
我看到每一個mvn compile
副本資源,即使他們沒有改變。 我應該怎麼做才能使構建副本只更改文件?
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
...
</dependencies>
<properties>
<maven.resources.overwrite>false</maven.resources.overwrite>
</properties>
這裏是在調試模式下輸出:
[INFO] Using 'cp1252' encoding to copy filtered resources.
[DEBUG] resource with targetPath null
directory C:\core\src\main\resources
excludes []
includes []
[DEBUG] ignoreDelta true
[INFO] Copying 190 resources
[DEBUG] file batch.bat has a filtered file extension
[DEBUG] copy C:\core\src\main\resources\batch.bat to C:\core\target\classes\batch.bat
[DEBUG] file DataObject.hbm.xml has a filtered file extension
[DEBUG] copy C:\core\src\main\resources\com\data\DataObject.hbm.xml to C:\core\target\classes\com\data\DataObject.hbm.xml
你能張貼您的POM文件?如果Maven沒有改變,它不應該覆蓋資源。 – Tunaki