我正在使用maven-dependency-plugin的解包目标将所有类文件从指定工件提取到当前项目。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-my-lib</id>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>myGroupId</groupId>
<artifactId>myArtifactId</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
</configuration>
</execution>
</executions>
</plugin>
但是我错过了指定工件的依赖关系,我需要将它们提取到我的构建路径中。我已尝试其他目标来获取依赖项,但他们不接受指定artifactItem。