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.

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.

Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
TS-
  • 4,311
  • 8
  • 40
  • 52

1 Answers1

9

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.

Jean-Rémy Revy
  • 5,607
  • 3
  • 39
  • 65
Thor
  • 6,607
  • 13
  • 62
  • 96
  • Thanks - I was asking about the maven-ear-plugin because in configuration there's one for and you can set under it, but up to 2.6 it only support jboss 5. I cant seem to generate project with that archetype, I am no expert in maven, so I assume that archetype is for the -DartifcatId argument? – TS- Dec 01 '11 at 16:13
  • In Eclipse you can `File` - `New` - `Other` - `Maven` - `Maven Project`. Then you can choose an archetype. – Thor Dec 01 '11 at 17:10
  • Cool thanks ... I am gonna use that for reference and hopefully can get this up and running – TS- Dec 01 '11 at 18:51