Java 我没有在maven项目层次结构中获取env.test.properties文件
[错误]无法执行目标 plugins:maven-antrun-plugin:1.1:run(默认)on project clean:执行ant任务时出错:警告:无法找到 文件 C:\Users\satyam\IdeaProjects\Demo\src\main\resources\env.test.properties 复制。->[帮助1]Java 我没有在maven项目层次结构中获取env.test.properties文件,java,maven,Java,Maven,[错误]无法执行目标 plugins:maven-antrun-plugin:1.1:run(默认)on project clean:执行ant任务时出错:警告:无法找到 文件 C:\Users\satyam\IdeaProjects\Demo\src\main\resources\env.test.properties 复制。->[帮助1] 在此处输入代码 测试 org.apache.maven.plugins maven antrun插件 1.1 测试 跑 使用env.test.proper
在此处输入代码
测试
org.apache.maven.plugins
maven antrun插件
1.1
测试
跑
使用env.test.properties
请阅读请编辑您的问题并向我们展示POM的相关部分。您是否在以下位置有文件C:\Users\satyam\IdeaProjects\Demo\src\main\resources\env.test.properties
?否,我在项目的Hirearch中找不到文件env.test.properties。我怎么找到的请告诉我-亚历山大
enter code here
<profile>
<id>test</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>Using env.test.properties</echo>
<copy file="src/main/resources/env.test.properties"
tofile="${project.build.outputDirectory}/env.properties"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>