如何在 NetBeans 6.5 中设置 JBoss Maven 存储库?
我尝试配置 Maven 插件(版本 4)以在 http://repository 添加 JBoss Maven 存储库。 jboss.com/maven2/ 遵循 http://wiki 上的指南。 netbeans.org/MavenBestPractices#section-MavenBestPractices-UtilizingAndManagingMavenRepositories。
新的存储库出现在 Maven 存储库列表中,但我看不到任何项目(工件),更新索引没有帮助。
看起来像是 Maven 插件的问题。也许它需要一个 JBoss 服务器上不可用的“.index”子目录。
I tried to configure the Maven plug in (version 4) to add the JBoss Maven repository at http://repository.jboss.com/maven2/ following the guide at http://wiki.netbeans.org/MavenBestPractices#section-MavenBestPractices-UtilizingAndManagingMavenRepositories.
The new repository appears in the list of Maven repositories, but I can not see any items (artifacts), updating the index does not help.
It looks like a problem with the Maven plug in. Maybe it requires an ".index" subdirectory which is not available on the JBoss server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JBoss 存储库有一个 Nexus 索引,位于 http://repository.jboss.com/maven2/.index /。 我认为问题在于 Netbeans 可能没有使用这个索引。 我建议安装 Nexus,将 JBoss 存储库添加到公共组,然后将 Netbeans 实例指向 Nexus 的本地实例。
从 http://nexus.sonatype.org 下载 Nexus
通过在计算机上解压 tar.gz 或 zip 来安装它< /p>
通过运行 bin/jsw//nexus start 启动它
转到 http://localhost:8081/nexus
以默认管理员用户身份登录:admin/admin123 是用户名/密码
单击“存储库”
单击“添加...”按钮
为 JBoss 存储库添加一个新存储库,其远程位置为:http://repository.jboss。 com/maven2/
保存新存储库。 (您还需要确保选择“下载远程索引”)
通过单击公共组并将新的 JBoss 存储库拖动到所选存储库,将存储库添加到您的公共组。
将 ~/.m2/settings.xml 文件配置为具有相同的内容:http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html
此时,所有存储库请求都将流经 Nexus 。 Nexus 已经附带了 Central 的代理存储库。 因此,您所做的就是添加 JBoss 存储库,然后将其添加到公共组中。 一旦你这样做了,你会发现你的构建速度会快得多。
The JBoss repository has a Nexus index at http://repository.jboss.com/maven2/.index/. I think the problem is that Netbeans might not be making use of this index. I would recommend installing Nexus, adding the JBoss repo to a public group and then pointing your Netbeans instance at a local instance of Nexus.
Download Nexus from http://nexus.sonatype.org
Install it by unpacking the tar.gz or zip on your machine
Fire it up by running bin/jsw//nexus start
Go to http://localhost:8081/nexus
Log in as the default admin user: admin/admin123 is the username/password
Click on Repositories
Click the Add... button
Add a new repository for the JBoss repositorywith a remote location of: http://repository.jboss.com/maven2/
Save the new repository. (You will also want to make sure that Download remote index is selected)
Add the repository to your public group by clicking on the public group and dragging the new JBoss repository to the selected repositories.
Configure your ~/.m2/settings.xml file to have the same contents as: http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html
At that point, all of your repository requests are going to flow through Nexus. Nexus already ships with proxy repositories for Central. So all you did was to add in the JBoss repository and then add it to the public group. Once you do this, you'll find that your builds are going to be much, much faster.