Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven 3 Failed to read artifact descriptor for

I upgrade to netbeans 7 which uses embeded maven 3. I have a project with lot of modules and modules containing other modules. My other submodules that don't depend on internal projects work fine with the same configuration. In this case, spring-hibernate depends on domain which is one of the submodules and fails.

my main project has something like this

<modelVersion>4.0.0</modelVersion>

<artifactId>spring</artifactId>
<packaging>pom</packaging>

<groupId>${masterproject.groupId}</groupId>
<version>${masterproject.version}</version>

my submodule has the following def

<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>

I am using the following ${masterproject.groupId}, ${masterproject.version} because I don't want to put static value in all the submodules as each one contains a parent. Not sure if this is the cause of the problem.

All of this works fine with maven 2. But with maven 3 I get the following error msg

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]
like image 694
user373201 Avatar asked Feb 24 '11 00:02

user373201


1 Answers

I had this in eclipse and did this which fixed it(even though my command line build worked)

  1. delete the directory in .m2/repostiory/....
  2. rerun update dependencies in my IDE

mvn command line worked while my IDE didn't, once I ran it in my IDE both worked..very weird.

As another option, restarting eclipse seemed to help as well

like image 156
Dean Hiller Avatar answered Oct 02 '22 12:10

Dean Hiller