简体   繁体   English

JBoss 7.1如何添加模块

[英]JBoss 7.1 How to add a module

I use the annotation @WebContext in my project using JBoss 7.1. 我在使用JBoss 7.1的项目中使用注释@WebContext。

This annotation is present in a JBOSS module: 该注释存在于JBOSS模块中:

<module xmlns="urn:jboss:module:1.1" name="org.jboss.ws.api">

The jar is located in JBOSS\\modules\\jboss\\ws\\api (jbossws-api-1.0.0.GA.jar) jar位于JBOSS \\ modules \\ jboss \\ ws \\ api(jbossws-api-1.0.0.GA.jar)

I'm not using maven so how do I include this dependency? 我没有使用maven,那么如何包含这种依赖呢? Can I use the jboss-deployment-structure or Dependencies in the MANIFEST? 我可以在MANIFEST中使用jboss-deployment-structure或Dependencies吗?

My point is to have access to the jar in my Lib. 我的观点是可以访问我的Lib中的jar。 Ideally the jar jbossws-api-1.0.0.GA.jar must be located in JBoss 7.1 Runtime Libs. 理想情况下,jar jbossws-api-1.0.0.GA.jar必须位于JBoss 7.1 Runtime Libs中。

I have already try to have the dependency in the MANIFEST and jboss-deployment_structure bu of course with that JBoss 7.1 Runtime Libs isn't updated. 我已经尝试在MANIFEST和jboss-deployment_structure中设置依赖,当然JBoss 7.1 Runtime Libs没有更新。

I think the file standalone.xml must be updated in order to add this module. 我认为必须更新文件standalone.xml才能添加此模块。 Please explain to me how I do that? 请向我解释我是怎么做到的?

Thanks. 谢谢。

You only need to add a dependency if its not automatically included. 如果不自动包含依赖项,则只需添加依赖项。

If the org.jboss.ws.api not automatic( you will find out when you deploy to the server ), and I don't see why it wouldn't be, adding it via the jboss-deployment-structure.xml is the way to go. 如果org.jboss.ws.api不是自动的(你会在部署到服务器时发现),而我不明白为什么它不会,通过jboss-deployment-structure.xml添加它是要走的路。 That file should be included in your WEB-INF directory, along with your web.xml and jboss-web.xml files. 该文件应与您的web.xml和jboss-web.xml文件一起包含在WEB-INF目录中。

See AS7 Classloading Documentation on the jboss-deployment-structure.xml if need be. 如果需要,请参阅jboss-deployment-structure.xml上的AS7类加载文档

In eclipse preference if you go under Server-->RuntimeEnv-->DefaultClaspathEntry. 在eclipse首选项中,如果你进入Server - > RuntimeEnv - > DefaultClaspathEntry。 You can add additional modules. 您可以添加其他模块。 I had to add org.jobss.ws.api. 我不得不添加org.jobss.ws.api。

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

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