JBoss 7.1 How to add a module

2019-09-18 17:24发布

I use the annotation @WebContext in my project using JBoss 7.1.

This annotation is present in a JBOSS module:

<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)

I'm not using maven so how do I include this dependency? Can I use the jboss-deployment-structure or Dependencies in the MANIFEST?

My point is to have access to the jar in my Lib. Ideally the jar jbossws-api-1.0.0.GA.jar must be located in 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.

I think the file standalone.xml must be updated in order to add this module. Please explain to me how I do that?

Thanks.

2条回答
我欲成王,谁敢阻挡
2楼-- · 2019-09-18 18:13

In eclipse preference if you go under Server-->RuntimeEnv-->DefaultClaspathEntry. You can add additional modules. I had to add org.jobss.ws.api.

查看更多
\"骚年 ilove
3楼-- · 2019-09-18 18:24

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. That file should be included in your WEB-INF directory, along with your web.xml and jboss-web.xml files.

See AS7 Classloading Documentation on the jboss-deployment-structure.xml if need be.

查看更多
登录 后发表回答