ฉันมีโปรไฟล์ที่กำหนดไว้ใน pom.xml หลักและลูก pom.xml แต่เมื่อฉันพยายามเรียกใช้ mvn install -P profile name
จากโปรเจ็กต์หลัก คุณสมบัติที่กำหนดในไฟล์โปรไฟล์จะไม่ถูกคัดลอก
ผู้ปกครองของฉัน pom.xml ดูเหมือนว่า:
<dependencies>
<dependency>
<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>pom</type>
</dependency>
</dependencies>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>verify</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/src/main/webapp/WEB-INF/classes</outputDirectory> <resources>
<resource>
<directory>deployment/${environment}</directory>
</resource>
</resources>
</configuration>
</execution>
</plugin>
ลูกของฉัน pom.xml:
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>verify</phase>
<goals>
<goal>copy-resources</goal>
</goals>
</execution>
</plugin>