简体   繁体   English

maven-ear-plugin和JBoss AS 7

[英]maven-ear-plugin and JBoss AS 7

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. 我正在迁移到JBoss AS 7,并使用maven build,在我看来maven-ear-plugin还不支持JBoss AS 7。 By default it uses JBoss AS 4. 默认情况下,它使用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. 我还在努力弄清楚如何构建我的档案,现在有关于JBoss AS 7类加载器工作方式的变化的问题。

I don't think the maven-ear-plugin is JBoss specific. 我不认为maven-ear-plugin是JBoss特有的。 But you have to specify the JavaEE <version>6</version> in your configuration: 但是您必须在配置中指定JavaEE <version>6</version>

<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. 要获得JBoss7 EAR的工作示例,您可以使用以下原型创建一个新项目: org.jboss.spec.archetypes:jboss-javaee6-ear-webapp:7.0.2.CR1上面显示的示例取自此原型。

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

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