JEE7, Maven, Testing and Wildfly 8.x

Today i want to start a new maven based project. The result should run on wildfly and should employ arquillian for integration testing.

I first read about arquillian back in february. i learned it was very tedious to get wildfly 8 and arquillian play nicely together. Thanks to my friends sorin and octavian for sorting out the difficulties (version number hell comes to my mind) .

i stumbled upon an article by arun gupta telling about a maven archetype to create a project together with arquillian configuration for wildfly and glassfish:


mvn --batch-mode archetype:generate -DarchetypeGroupId=org.javaee-samples \
-DarchetypeArtifactId=javaee7-arquillian-archetype -DgroupId=<YOUR GROUPID> \
-DartifactId=<YOUR ARTIFACT_ID>

(please omit backslashes)

The result is a configuration supporting wildfly 8 and glassfish 4 – both remote and managed.
Pom.xml contained (at least in my case) a commented profile for wildfly embedded – simply remove it.

In my case i removed glassfish stuff, too.

Both remaining profiles (wildfly-remote-arquillian and wildfly-managed-arquillian) worked out of the box.

I tested with wildfly 8.0.0.Final and 8.1.0.Final. The latter after changing a property value in pom.xml:

<version.wildfly>8.0.0.Final</version.wildfly>
to
<version.wildfly>8.1.0.Final</version.wildfly>

 
Thanks to @aslakknutsen for making use of arquillian that easy and to Arun for blogging about it.

Advertisements

About javavolker71

when i do not write posts on this blog, don't work on or try to break my code i'm spending a reasonable amount of time
This entry was posted in Java, JEE7, maven and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s