Maven 存储库不可用 - richfaces

发布于 2024-11-18 06:12:06 字数 2316 浏览 2 评论 0 原文

更新:我一发布此内容,存储库 URL 就开始工作。但是,如果您知道如何解决此问题,请启发我,因为我可以看到这种情况再次发生。非常感谢大家。


这里是maven新手。

我正在使用 RichFaces 4 和 Netbeans 7

当我打包应用程序时,会得到:

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

该 URL 目前不可用。因此,我无法运行我的应用程序,因为构建失败。

一定有办法解决这个问题,而且可能很简单,但我的搜索却一无所获。

以下是我的 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>

我尝试在我的设置中设置镜像,但它似乎不完整,因为它不适合我。这是我对镜子的尝试。

注意:我随机选择了镜子,所以它可能不是我想要的。只是反复试验看看会发生什么。

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

预先感谢您向我提供的任何帮助。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅忆流年 2024-11-25 06:12:07

您应该明确安装一个存储库管理器,例如 ArchivaNexus 或 Artifactory (http://www.jfrog.com/products.php) 以避免此类情况。

存储库管理器将为您缓存外部或自行生成的 Maven 工件,对于任何严肃的 Maven 工作来说,它确实是不可或缺的。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文