Tom*_*r99 2 java activation maven-plugin maven
我正在使用基于 pom.xml 中存在的文件进行激活。
但是,无论如何,我的个人资料总是被执行。
这是个人资料描述:
<profile>
<id>copy</id>
<activation>
<file>
<exists>file.xml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<configuration>
<target name="copy and rename file">
<copy file="${basedir}/src/main/resources/application.${env}.properties" tofile="${basedir}/src/main/fabric8/io.fabric8.system.properties" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Run Code Online (Sandbox Code Playgroud)
我这样称呼我的个人资料: mvn package -Pcopy
但是无论文件是否存在,总是会调用配置文件。我究竟做错了什么?
谢谢罗曼。
| 归档时间: |
|
| 查看次数: |
3732 次 |
| 最近记录: |