我有一个拥有自己的pom.xml的大型项目。我想使用配置文件或外部“pom”文件(这似乎更简单)将一些项目的文件复制到一个不同于大项目的jar中。虽然我想要做的事情各处都有文档(包括maven资源的插件页面),但有些甚至是最简单的步骤都会被跳过。
这是vt2.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.joe</groupId>
<artifactId>validateJoe</artifactId>
<version>1.1</version>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<repositories>
<repository>
<id>mvnrepo</id>
<name>Global Maven</name>
<url>https://mvnrepository.com/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<resources>
<resource>
<directory>com.joe.rules</directory>
</resource>
</resources>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我必须误解maven的目标,因为
mvn -fvt2.xml资源:process-resources
无法找到目标流程资源;我想要执行什么命令行来复制资源?