我有以下 maven pom.xml
<?xml version="1.0"?>
<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.abc.def.ghi</groupId>
<artifactId>core-with-releases</artifactId>
<version>1</version>
<properties>
<yum-repo>/var/www/html/core-repo</yum-repo>
</properties>
<organization>
<name>ABC DEF GHI</name>
</organization>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.aaa.bbb.ccc.ddd</groupId>
<artifactId>core</artifactId>
<version>1.1.3</version>
<type>rpm</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>create-directory</id>
<phase>process-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>mkdir</executable>
<arguments>
<argument>${yum-repo}${dependencies["com.aaa.bbb.ccc.ddd:core"].version}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我从命令行执行
mvn clean process-resources
因此,我希望创建目录,其名称以依赖项管理元素中的工件版本结尾,即 1.1.3
有人可以帮忙吗?谢谢。