简体   繁体   English

适用于Seam 2.3.0的JBoss AS 7模块吗?

[英]JBoss AS 7 Module for Seam 2.3.0?

I have become a big fan of JBoss AS7's module mechanism for specifying dependencies within an application. 我非常喜欢JBoss AS7的用于在应用程序中指定依赖项的模块机制。 It has drastically reduced the size of the EAR files we deploy, and has made it very easy for us to deploy multiple applications that have the same dependencies. 它极大地减少了我们部署的EAR文件的大小,并使我们可以轻松地部署具有相同依赖性的多个应用程序。 Up until this point, however, the modules we have created ourselves have been very small and simple. 但是,到目前为止,我们自己创建的模块非常小而简单。 Now, however, we'd like to use a JBoss module for JBoss Seam 2.3.0. 但是,现在,我们想对JBoss Seam 2.3.0使用JBoss模块。

Does anyone know of a resource that would explain how best we can do that? 有谁知道可以解释我们如何做到最好的资源? Seam is a huge framework, with lots of dependencies of its own. Seam是一个巨大的框架,具有很多依赖关系。 Up to this point, we've been putting the JARs directly within the EAR/WAR files. 到目前为止,我们一直将JAR直接放在EAR / WAR文件中。 We'd like to get away from that. 我们想摆脱这一点。 Can anyone give any help on how to create a JBoss AS7 module for Seam 2.3.0 correctly? 任何人都可以在如何正确地为Seam 2.3.0创建JBoss AS7模块方面提供任何帮助吗? By correctly, I mean referencing the additional modules within JBoss correctly, segmenting properly, etc. 正确地说,我的意思是正确引用JBoss中的其他模块,正确分段等。

Any advice or guidance you can give would be greatly appreciated. 您可以提供的任何建议或指导将不胜感激。 Thanks in advance! 提前致谢!

You will need to do this in three steps: 您将需要分三步执行此操作:

  1. Use a build automation tool like Maven and include the following to declare run-time dependencies: 使用诸如Maven之类的构建自动化工具,并包括以下内容来声明运行时依赖项:

     <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <archive> <manifestEntries> <Dependencies>org.slf4j,org.apache.httpcomponents</Dependencies> </manifestEntries> </archive> 
  2. The dependencies entered like this will provide visibility of the modules available within JBoss 7.1 so that you can exclude them from your war packaging. 这样输入的依赖项将提供JBoss 7.1中可用模块的可见性,以便您可以将它们从战争包装中排除。 You would still need them at compile time, so you can set their scope to provided - Maven will automatically not package them. 您仍然需要在编译时使用它们,因此可以将它们的范围设置为provided -Maven不会自动打包它们。

  3. I would not add any custom modules to JBoss, but if you want that type of architecture then you would need to create new modules or different versions of existing modules to satisfy your dependencies and then include them in the manifest entries above. 我不会在JBoss中添加任何自定义模块,但是如果您想要那种类型的架构,则需要创建新模块或现有模块的不同版本来满足您的依赖性,然后将它们包括在上面的清单条目中。

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

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