dev / XYZ.propertiesファイルがあり、maven -Pdevinstallを使用してjarファイルを作成しています。プロパティファイルをchild.jar/META-INF/XYZ.propertiesファイルに配置するにはどうすればよいですか。
1 に答える
0
maven-resources-plugin:copy-resources
プロファイルの目標を実行し、dev
それを適切なフェーズにバインドする必要があります(process-resources
私にとっては最良のフェーズのようです)。プロファイルを定義する方法は次のdev
とおりです。
<profile>
<id>dev</id>
...
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes/META-INF</outputDirectory>
<resources>
<resource>
<directory>${basedir}/dev</directory>
<includes>
<include>XYZ.properties</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
于 2013-03-25T13:03:52.490 に答える