maven-ear-plugin and JBoss AS 7

瘦欲@ 提交于 2019-12-04 04:06:01

问题


I am in the process of migrating to JBoss AS 7, and using maven build, seems to me the maven-ear-plugin does not support JBoss AS 7 yet. By default it uses JBoss AS 4.

Does this cause problem?

I am also still trying to figure out as I go along how to structure my archives, right now having issues related to the changes in the way JBoss AS 7 class loader works.


回答1:


I don't think the maven-ear-plugin is JBoss specific. But you have to specify the JavaEE <version>6</version> in your configuration:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-ear-plugin</artifactId>
  <version>2.6</version>
  <configuration>
    <version>6</version><!-- Java EE 6 -->
    <defaultLibBundleDir>lib</defaultLibBundleDir>
    <modules>
      <webModule>
        <groupId>my.group</groupId>
        <artifactId>my-web</artifactId>
        <contextRoot>/my</contextRoot>
    </webModule>
  </modules>
</configuration>

To get a working example of a JBoss7 EAR you can create a new project using the following archetype: org.jboss.spec.archetypes:jboss-javaee6-ear-webapp:7.0.2.CR1 The example shown above is taken from this archetype.



来源:https://stackoverflow.com/questions/8332561/maven-ear-plugin-and-jboss-as-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!