Örnek:Maven profili bir savaşa webResources ekleyebilir ve profil oluşturmamış webResources ekler miyim?
"Profil" profili etkinken, yalnızca profileResources ve commonResources öğelerini dağıtmak için aşağıdaki pompayı bekleyip umuyorum ve yalnızca profilResources'i dağıtır. İstenen etkiyi elde etmek için ne yapabilirim? Kırık ve Çalışma Sürümleri Arasında
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<packaging>war</packaging>
<version>0.0.0</version>
<profiles>
<profile>
<id>profile</id>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webResources>
<resource>
<directory>src/main/profileResources</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webResources combine.children="append">
<resource>
<directory>src/main/commonResources</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
</project>
Git Kelime Diff (ileride başvurmak üzere)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<packaging>war</packaging>
<version>0.0.0</version>
<profiles>
<profile>
<id>profile</id>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webResources>
<resource>
<directory>src/main/profileResources</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webResources>
<resource>
<directory>src/main/commonResources</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
</project>
Çalışma Sürüm
diff --git a/tmp/broken-pom.xml b/tmp/working-pom.xml
index 2fd9bbf..b04683f 100644
--- a/tmp/broken-pom.xml
+++ b/tmp/working-pom.xml
@@ -31,5 +31,5 @@
<version>2.1.1</version>
<configuration>
<webResources{+ combine.children="append"+}>
<resource>
<directory>src/main/commonResources</directory>
Bu işe yaradı :)! –