简体   繁体   English

JBoss AS之外的JBoss模块

[英]JBoss Modules outside of JBoss AS

I had first found a reference to JBoss Modules when I stumbled upon Ceylon language which uses JBoss Modules as its module system. 当我偶然发现使用JBoss模块作为模块系统的Ceylon语言时,我首先找到了对JBoss模块的引用。 Immediately I wanted to try this system in some toy project and maybe even embed it in a real project (I was writing a project with plugins support at that time), but I couldn't find any documentation on JBoss Modules as a standalone library. 我想立即在一些玩具项目中尝试这个系统,甚至可能将它嵌入到一个真实的项目中(当时我正在编写一个支持插件的项目),但我找不到任何关于JBoss模块的文档作为一个独立的库。 The only available documentation source seems to be the official wiki , but it looks abandoned and unsupported. 唯一可用的文档源似乎是官方维基 ,但它看起来被遗弃和不受支持。 I couldn't even find Javadocs for it (except, maybe, this , but it seems to be very old and not really related to JBoss Modules due to "osgi" presence in the link). 我甚至找不到它的Javadocs(除了,也许, 这个 ,但它似乎很老,并且由于链接中存在“osgi”而与JBoss模块没有关系)。

It seems that JBoss Modules are usable outside of JBoss AS because Ceylon language uses it, but lack of almost any documentation on the subject is disappointing. 似乎JBoss模块可以在JBoss AS之外使用,因为Ceylon语言使用它,但几乎没有任何关于这个主题的文档是令人失望的。

So, here are my questions: 所以,这是我的问题:

  1. Is it possible to use JBoss Modules as a standalone library at all? 是否有可能将JBoss模块用作独立的库? Are there any artifacts in some public Maven repository? 某些公共Maven存储库中是否有任何工件?
  2. If it is (and there are), is there any documentation on it? 如果是(并且有),是否有任何文件? That wiki I have mentioned does not have, for example, any instructions on embedding JBoss Modules. 我提到的那个wiki没有关于嵌入JBoss模块的任何指令。

If you'd like to try out JBoss Modules directly, you can grab the dependencies from the JBoss Nexus repository: https://repository.jboss.org/nexus/content/repositories/public/org/jboss/modules/jboss-modules/ 如果您想直接试用JBoss Modules,可以从JBoss Nexus存储库中获取依赖项: https//repository.jboss.org/nexus/content/repositories/public/org/jboss/modules/jboss-modules /

Unfortunately, there isn't much documentation on JBoss Modules, but if you want to try it out, you probably don't want to be hand-writing modules.xml files yourself (maybe you like pain, I don't know.) 不幸的是,没有太多关于JBoss模块的文档,但是如果你想尝试一下,你可能不希望自己亲自编写modules.xml文件(也许你喜欢痛苦,我不知道。)

If you'd like to try out "Furnace" the modular container based on JBoss Modules and Maven that serves as the core module system for JBoss Forge , it give you the ability to write Maven projects that can be loaded directly as Modules. 如果您想尝试使用基于JBoss模块和Maven的模块化容器“Furnace”作为JBoss Forge的核心模块系统,它可以让您编写可以直接作为模块加载的Maven项目。 This is what we are using for our entire Forge 2 architecture. 这就是我们用于整个Forge 2架构的内容。

You can find some docs on Furnace here: 你可以在这里找到关于熔炉的一些文档:

https://github.com/forge/furnace#furnace https://github.com/forge/core#developing-an-addon https://github.com/forge/furnace#furnace https://github.com/forge/core#developing-an-addon

Note that Furnace Addons require a maven classifier, you can choose the classifier used if you want to. 请注意,Furnace Addons需要maven分类器,您可以根据需要选择使用的分类器。 This is done via the Furnace Manager (which can be seen in the furnace docs above.) 这是通过炉子管理器完成的(可以在上面的炉子文档中看到。)

  1. Yes. 是。 Actually, JBoss is using it that way as well - so JBoss application server is actually running inside JBoss Modules system. 实际上,JBoss也是这样使用的 - 所以JBoss应用服务器实际上是在JBoss Modules系统中运行的。
  2. I'm not aware of such documentation, but usually you shouldn't be embedding jboss modules, but running the applications with it. 我不知道这样的文档,但通常你不应该嵌入jboss模块,而是用它来运行应用程序。 I'm not aware if you can embed it. 我不知道你是否可以嵌入它。

I actually got most information from this presentation in vimeo, Modular Class Loading with JBoss Modules . 我实际上从vimeo, 使用JBoss模块的模块化类加载中获得了大部分信息。 There seems to also be Zen of Modules video there. 那里似乎还有Zen of Modules视频。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM