Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven 3 Archetype for Project With Spring, Spring MVC, Hibernate, JPA

I'm trying to use Maven 3 to create a project which uses Spring 3, Spring MVC, Hibernate 4, and JPA. However, when I execute:

mvn archetype:generate

Non of the archetypes listed include all of these; and even those which are close seem to be special projects such as projects with Flex. I want to avoid having extra modules such as Flex that would crowd the project and configuration files. So, is there an archetype for Maven 3 that I can use to create such a project?

like image 581
user1888243 Avatar asked Jan 29 '13 23:01

user1888243


People also ask

What archetype should I select in Maven for Spring MVC?

The spring-mvc-archetype developed by Frédéric Fondement from ENSISA is used here. This archetype creates a new Java web project and adds the following framework components: Configuration for Spring 5 Web MVC using a Java class and annotations. Spring Context and Spring ORM.

What should be the archetype for Maven project in Eclipse?

The Lagom Maven archetype allows you to quickly create a project for development.


1 Answers

A great Spring MVC quickstart archetype is available on GitHub, courtesy of kolorobot. Good instructions are provided on how to install it to your local Maven repo and use it to create a new Spring MVC project. He’s even helpfully included the Tomcat 7 Maven plugin in the archetypical project so that the newly created Spring MVC can be run from the command line without having to manually deploy it to an application server.

Kolorobot’s example application includes the following:

  • No-xml Spring MVC 3.2 web application for Servlet 3.0 environment
  • Apache Tiles with configuration in place,
  • Bootstrap
  • JPA 2.0 (Hibernate/HSQLDB)
  • JUnit/Mockito
  • Spring Security 3.1
like image 126
AzizSM Avatar answered Oct 08 '22 07:10

AzizSM