1
這個maven文檔必須是錯誤的。使用戰爭排除在pom.xml
這裏有我有全都未能排除的文件試過各種排列:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warSourceExcludes>**/*server.properties</warSourceExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>src/main/resources/com/mycom/myapplication/</directory>
<!-- there's no default value for this -->
<excludes>
<exclude>**/*server.properties</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
一個郵件列表項建議使用此舊版本和一個字符串列表:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>src/main/resources/com/pictage/provendirect/</directory>
<!-- there's no default value for this -->
<excludes>**/*server.properties</excludes>
</resource>
</webResources>
</configuration>
</plugin>
導致在:
(找到靜態表達式:'/* server.properties'可能作爲默認值)。 原因:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<packagingExcludes>
**/server.properties
</packagingExcludes>
</configuration>
</plugin>
:不能從「 /*server.properties」,這是類型類java.lang.String的
還試圖分配配置條目「不包括」到「接口java.util.List中」
有沒有想法?我瘋了。