我升级到使用嵌入式 Maven 3 的 NetBeans 7。我的项目有很多模块,这些模块中包含其他模块。不依赖于内部项目的其他子模块可在相同配置下正常工作。但是,在这种情况下,依赖于 domain 的 spring-hibernate 失败了。
我的主要项目大致如下:
<modelVersion>4.0.0</modelVersion>
<artifactId>spring</artifactId>
<packaging>pom</packaging>
<groupId>${masterproject.groupId}</groupId>
<version>${masterproject.version}</version>
我的子模块有以下定义
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>spring</artifactId>
<groupId>${masterproject.groupId}</groupId>
<version>${masterproject.version}</version>
</parent>
<artifactId>spring-hibernate</artifactId>
<packaging>pom</packaging>
<dependency>
<groupId>${masterproject.groupId}</groupId>
<artifactId>domain</artifactId>
</dependency>
我正在使用以下 ${masterproject.groupId},${masterproject.version},因为我不想在所有子模块中都放置静态值,因为每个子模块都包含一个父模块。不确定这是否是问题的原因。
在maven 2中,所有这些都正常工作。但是,在maven 3中,我收到以下错误消息:
Failed to read artifact descriptor for com.merc:domain:jar:1.0-SNAPSHOT: Failure to find ${masterproject.groupId}:MavenMasterProject:pom:${masterproject.version} in http://repository.springsource.com/maven/bundles/release was cached in the local repository, resolution will not be reattempted until the update interval of com.springsource.repository.bundles.release has elapsed or updates are forced -> [Help 1]