maven-ear-plugin 和 JBoss AS 7 [英] maven-ear-plugin and JBoss AS 7
问题描述
我正在迁移到 JBoss AS 7,并且使用 maven build,在我看来 maven-ear-plugin 还不支持 JBoss AS 7.默认情况下,它使用 JBoss AS 4.
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.
这会导致问题吗?
我还在尝试弄清楚如何构建我的档案,现在遇到与 JBoss AS 7 类加载器工作方式变化相关的问题.
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.
推荐答案
我不认为 maven-ear-plugin
是特定于 JBoss 的.但是您必须在配置中指定 JavaEE <version>6</version>
:
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>
要获得 JBoss7 EAR 的工作示例,您可以使用以下原型创建一个新项目:org.jboss.spec.archetypes:jboss-javaee6-ear-webapp:7.0.2.CR1
上面显示的示例取自此原型.
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.
这篇关于maven-ear-plugin 和 JBoss AS 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!