親の 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>