0
我目前正在Maven構建中工作。我想從我的Maven構建中刪除特定的文件。我目前正在與下面的代碼嘗試:無法從Maven構建中刪除特定文件
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<directory>src/main/resources</directory>
<!-- override the destination directory for this resource -->
<targetPath>WEB-INF/classes</targetPath>
<!-- enable filtering -->
<filtering>true</filtering>
<includes>
<include>*.pem</include>
<include>*.pfx</include>
<include>META-INF/jpa-persistence.xml</include>
<include>META-INF/spring-persistence.xml</include>
<include>com/abc/config/build-config-${propertyenv}.properties</include>
</includes>
<excludes>
<exclude>%regex[(?!.*${propertyenv}/)*]</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
我已經在我的POM定義propertyenv
物業價值:
<properties>
<propertyenv>abc</propertyenv>
</properties>
我只想從com/abc/config
文件夾abc.properties
文件。但建立後所有文件都存在.properties
。請幫助。
我想你正在尋找的http://maven.apache.org/guides/介紹/介紹到個人資料.html – Abhishek
@Abhishek如何構建配置文件應該在這裏幫助?通過配置文件,您可以使用其中聲明的值激活/選擇設置。如果設置本身已經不能做什麼試圖完成的話,這有什麼幫助? –