Search code examples
mavenrepositoryrichfacespom.xml

maven repository unavailable - richfaces


Update: As soon as I posted this, the repository URL began working. However, If you know how to address this, please enlighten me since I can see this happening again. Thank you all very much.


New to maven here.

I'm using RichFaces 4 and Netbeans 7

When I package the app gets:

http://download.java.net/maven/2/org/richfaces/richfaces-bom/4.0.0-SNAPSHOT/maven-metadata.xml

That URL is currently unavailable. As such, I'm not able to run my app because the build fails.

There must be a way around this and it's probably simple but my searches have come up with nothing.

Here are the relevent parts of my pom.xml

<repository>
    <id>java-net</id>
    <name>Java.net Maven Repository</name>
    <url>http://download.java.net/maven/2</url>
</repository>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!-- Setting this property using archetype-metadata.xml requiredPorperty
         so that generated project uses correct version of richfaces.
     -->
    <org.richfaces.bom.version>4.0.0-SNAPSHOT</org.richfaces.bom.version>
</properties>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.richfaces</groupId>
            <artifactId>richfaces-bom</artifactId>
            <version>${org.richfaces.bom.version}</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
   <dependency>
        <groupId>org.richfaces.ui</groupId>
        <artifactId>richfaces-components-ui</artifactId>
    </dependency>
    <dependency>
        <groupId>org.richfaces.core</groupId>
        <artifactId>richfaces-core-impl</artifactId>
    </dependency>
 <dependencies>

I've tried setting up mirrors in my settings but it appears to be incomplete since it's not working for me. Here is my attempt at the mirror.

Note: I randomly selected the mirror so it's probably not what I want. Just trial and error to see what would happen.

<mirrors>
<mirror>
  <id>RM</id>
  <name>Java Net Mirror</name>
  <url>http://repo1.maven.org/maven2</url>
  <mirrorOf>java-net</mirrorOf>      
</mirror>

Thanks in advance for any help you can sen my way.


Solution

  • You should definitly install a repository manager like Archiva, Nexus or Artifactory (http://www.jfrog.com/products.php) to avoid situations like this.

    A Repository Manager will cache the external or self-generated maven artifacts for you and is really indispensible for any serious maven work.