Reputation: 16851
I need to create a maven project, which also has hibernate. How do i write the maven create project command.
The IDE i'm using is Eclipse.
Upvotes: 1
Views: 4931
Reputation: 16037
What you need is an appropriate maven archetype E.g.:
mvn archetype:generate -B \
-DgroupId=com.my-company.my-project \
-DartifactId=my-project-domain \
-DpackageName=com.company.project.domain \
-DarchetypeGroupId=com.rfc.maven.archetypes \
-DarchetypeArtifactId=jpa-maven-archetype \
-DremoteRepositories=http://maven.rodcoffin.com/repo \
-DarchetypeVersion=1.0.0
You can find some Hibernate archetypes here http://docs.codehaus.org/display/MAVENUSER/Archetypes+List or use google
Upvotes: 0
Reputation: 38510
If you're asking what archetype would be best to use from the command line, then the below will give you a nice list to choose from:
mvn archetype:generate
However, you say you're using Eclipse - if so, take advantage of the Maven integration and you'll be offered a similar choice when creating the project (basically just a nice GUI around archetype:generate and friends)
Upvotes: 2