views:

119

answers:

1

Hi everybody, I recently set up a j2ee development environment under Ubuntu: Eclipse (Helios) with the maven plugin (m2eclipse).

When I try to create a maven project, it tells me to select an "Archetype". Then, I select an Archetype with a GroupId : "org.apache.maven.archetypes" and the ArctifactId : "maven-archetype-quickstart" (I tried also with the followinf artifactIds "maven-archetype-mojo" "maven-archetype-j2ee-simple", ....).

Then, it creates a standard maven directory structure.

I added the "javax.perssitence" Maven Dependency that load the "persistence-api-1.0.jar".

But I can't find the "src/main/ressources" and "src/test/ressources" to access to the "persistence.xml" file.

Is it a bug? Should I create it manually?

Thank you for your answers ;)

A: 

No, it's not a bug, just create them manually and update the project configuration under Eclipse (via right-click on the project and Maven > Update Project Configuration)

Pascal Thivent
Thank you for your answer. And what about the "persistence.xml" file? I thought it should be auto-generated ?
Zakaria
@Zakaria: No it's not. Put it in `src/main/resources/META-INF`
Pascal Thivent
Thank. Last question: as i'm starting with maven, which archetype should i use (groupid/artifectid)? Thanks ;)
Zakaria
@Zakaria: Hard to say from your current description but maybe `ear-jee5` or `ear-javaee6` from `org.codehaus.mojo.archettypes`.
Pascal Thivent