我知道可以在 pom.xml 中为项目定义父级,但我可以在 maven 2 中明确定义项目的子级吗?
问问题
341 次
2 回答
1
我给你举个例子:
<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>de.something.pr.pr-system</groupId>
<artifactId>pr-models</artifactId>
<version>T03-SNAPSHOT</version>
<name>${project.artifactId}</name>
<description>PR Processing</description>
<parent>
<groupId>de.something.pr</groupId>
<artifactId>pr-system</artifactId>
<version>T03-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>de.something.pr.pr-system</groupId>
<artifactId>pr-common</artifactId>
<version>T24-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
于 2012-07-31T06:51:27.157 回答