使用maven的项目的JBOSS依赖项 [英] JBOSS dependencies for project using maven

查看:237
本文介绍了使用maven的项目的JBOSS依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这应该很简单,但无法弄清楚。我有一个使用Maven构建的Web项目,将部署在JBOSS-EAP 5.1服务器上。我将什么添加到我的pom.xml中以便Maven在构建时可以访问JBOSS EAP库?

This should be simple but can't figure it out. I have a web project that is built using Maven and will be deployed on a JBOSS-EAP 5.1 server. What do I add to my pom.xml so that Maven has access to the JBOSS EAP libraries at build time?

我可以使用特定的依赖项或插件吗? / p>

Is there a particular dependency or plugin I can use?

推荐答案

AFAIK这是EAP 6的一项功能,即使在那时也是实验性的。查看更多信息来自此处这里

AFAIK this is a feature for EAP 6, and experimental even at that. See more information from here and here:


对以前版本的一个宏伟的改进是, EAP 6
附带一个Maven存储库,其中包含所有与EAP相关的Maven
工件。丢失的maven存储库是以前EAP版本
的一大缺点。所需的Maven工件必须手动
从EAP发行版部署到您自己的本地Maven
存储库或您的企业Maven存储库,如Nexus或
Artifactory。

A magnificent enhancement to the previous version is, that the EAP 6 ships with a Maven repository, which includes all EAP-related Maven artifacts. The missing maven repository was a big disadvantage of previous EAP versions. The required Maven artifacts had to be manually deployed from the EAP distribution into your own local Maven repository or into your enterprise Maven repository like Nexus or Artifactory.

所以不,我不认为Jboss EAP 5.X存在这样的存储库。

So no, I don't think such repository exists for Jboss EAP 5.X.

这意味着在实践中,您有以下选择,从最推荐到最少:

This means that in practice you have the following choices, from most recommended to the least:


  • 拥有内部网络仓库,例如Nexus或Artifactory,以及在那里安装项目。然后你可以将它们称为pom中的依赖项。建议使用此选项。

  • 仅将本地安装到每个开发人员本地maven存储库中。你可以使用mvn install-file,每个开发人员都需要自己完成。之后,每个依赖项都可以通过其他依赖项的方式从pom引用。

  • 在pom上使用系统范围,直接指向存储在硬盘驱动器上某些位置的库。这将是一个脆弱的设置,易于破解。

将文件库存储在Intranet存储库中应该不会太难并使用它。为开发人员提供内部网回购是最佳实践,无论如何都应该使用。

It shouldn't be too hard to just store the libraries on your intranet repository and use that. Having an intranet repo for developers is a best practice you should be using anyway.

这篇关于使用maven的项目的JBOSS依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆