【发布时间】:2020-05-06 10:36:05
【问题描述】:
我正在使用插件“copy-rename-maven-plugin”,它只是在配置文件内执行,如果我尝试在配置文件外使用它,它只是没有“检测到”,我确认使用 -X 选项在“构建计划”期间,未检测到配置文件之外的插件不会作为目标出现
我的 pom.xml 的 sn-p 代码
内部简介
<profile>
<id>QUA</id>
<properties>
<db.jndi.path>java:comp/env/jdbc/QUA</db.jndi.path>
<log4j.appender>${log4commonappender}</log4j.appender>
<datasourceDD>QUA</datasourceDD>
<excludeserviceprofile></excludeserviceprofile>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>rename-file</id>
<phase>compile</phase>
<goals>
<goal>rename</goal>
</goals>
<configuration>
<sourceFile>${project.build.outputDirectory}/services-profile.xml</sourceFile>
<destinationFile>${project.build.outputDirectory}/services.xml</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
外部简介
<build>
<finalName>app1</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>rename-file</id>
<phase>compile</phase>
<goals>
<goal>rename</goal>
</goals>
<configuration>
<sourceFile>${project.build.outputDirectory}/services.xml</sourceFile>
<destinationFile>${project.build.outputDirectory}/services.xml</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
如何才能在个人资料之外使用此插件?
提前问好。
【问题讨论】:
-
为什么需要重命名该文件?