Go back to Index
This is the first in a series of articles on java development.
Today we will go through how to setup Java EE 6 using maven.
Environment
We will be using Eclipse (Juno)
Maven 3.0.5
JBoss Tools (Juno)
On the Left you can see the package explorer area we want to right click in there and select
New/Project…
You will now be shown the New Project wizard
(For now you can ignore the Server folder shown in the package explorer)

(We could also select Maven Module if we wanted but i will go do that in another session to show a more advanced module based design)
For this example you do not need to change any settings, just click Next >
We will be using an archetype called net.avh4.mvn.archetype, so go ahead and put that in your filter field and you should get one result with the artifactId java-1.6-archetype
Now we want to specify the specifics for our project.
we are given a few options that we will need to change.
Group Id: This is generally unique amongst an organization or a project
Artifact Id: The artifactId is generally the name that the project is known by
Version: This is the version of the project, in this example we will leave the default
Packaging: Will be constructed using the groupId and the artifactId
Now click Finish
There is a
src/main/java folder
src/main/resources folder
src/test/java fodler
src/test/resources folder
Maven Dependecies folder
and a pom.xml file
Lets right click on the pom.xml file and choose
“Open with/Maven POM Editor”

On the bottom of the page there is a Dependencies tab that we want to click on

mockito-all
hamcrest-integration
imagecomparison
But lets keep the junit: 4.8.1 [test] one.
And then save the file
Click the Add… button
in the new window (Select Dependency) fill in the following values
Group Id: org.jboss.spec
Artifact Id: jboss-javaee-6.0
Version: 1.0.0.Final (It is crucial that you write this exactly right and in case)
Scope: Provided
Click OK
Click Properties…
We need to change the
Type: jar to
Type: pom
Click OK and then save the file
Our maven project is now configured and we can now start creating our java files and test cases.
Download the sources from github
This will be covered in the next session
Go back to Index
