如何从maven依赖关系生成JBoss jboss-deployment-structure [英] How to generate JBoss jboss-deployment-structure from maven dependencies

查看:939
本文介绍了如何从maven依赖关系生成JBoss jboss-deployment-structure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有使用maven构建的项目。有很多依赖关系被成功解决好的设计好的pom文件。
我们需要生成我们计划在JBoss7AS上部署的sar模块。我们必须在文件META-INF / jboss-deployment-structure.xml中手动描述所有依赖关系(包括我们的模块)

  ; jboss-deployment-structure xmlns =urn:jboss:deployment-structure:1.0> 
< deployment>
< resources>
< resource-root path =lib / activemq-camel-5.6.0.jar/>
< resource-root path =lib / activemq-core-5.6.0.jar/>
< resource-root path =lib / activemq-pool-5.6.0.jar/>
< resource-root path =lib / activemq-protobuf-1.1.jar/>
< resource-root path =lib / ant-1.6.5.jar/>
< resource-root path =lib / antlr-2.7.6.jar/>

当我们更改maven配置中任何依赖项的版本时,我们必须在所有的sar模块中手动更改它。
有没有办法使用maven功能自动生成这样的文件
也可以避免使用这个文件?我在JBoss中的noob

解决方案

检查这个插件,也许可以帮助你为EAP6 / JBossAS 7生成module.xml和jboss-deployment-structure.xml文件



官方maven插件 wildfly-maven-plugin 不支持此功能,并且存在一个请求添加新目标。



添加生成jboss-deployment-structure.xml#10的目标


We have project are built using maven. There are a lot of dependencies that is successfully resolved by good designed pom files. We need to generate sar module that we are planning to deploy on JBoss7AS. We have to describe all dependencies (including our modules) manually in file META-INF/jboss-deployment-structure.xml

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
    <deployment>
        <resources>
            <resource-root path="lib/activemq-camel-5.6.0.jar"/>
            <resource-root path="lib/activemq-core-5.6.0.jar"/>
            <resource-root path="lib/activemq-pool-5.6.0.jar"/>
            <resource-root path="lib/activemq-protobuf-1.1.jar"/>
            <resource-root path="lib/ant-1.6.5.jar"/>
            <resource-root path="lib/antlr-2.7.6.jar"/>

And when we change version of any dependency in maven config we must change it manually in all our sar modules. Is there a way to generate such file automatically using maven capabilities Also maybe it's possible to avoid using this file at all? I'm noob in JBoss

解决方案

Check this plugin, maybe can help you Generate module.xml and jboss-deployment-structure.xml files for EAP6/JBossAS 7.

The official maven plugin wildfly-maven-plugin don't support this and exist one request to add a new goal.

Add goal to generate jboss-deployment-structure.xml #10

这篇关于如何从maven依赖关系生成JBoss jboss-deployment-structure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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