3

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

Dmitrii Borovoi
  • 2,814
  • 9
  • 32
  • 50

2 Answers2

1

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

Federico Sierra
  • 5,118
  • 2
  • 23
  • 36
  • Can't generate deployment-structure.xml file. Plugin requires some dictionary file, have no idea how to use it. It generates or empty .xml file or the one that is already preparred manually. I supposed that plugin searches for maven dependencies and automatically generates .xml file – Dmitrii Borovoi Nov 05 '14 at 00:30
0

add this to your maven ear plugin

    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <filtering>true</filtering>
            <targetPath>../${project.build.finalName}</targetPath>
        </resource>
    </resources>
Muky
  • 3,584
  • 3
  • 19
  • 20