Hello everyone I was just going trough http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html spring tutorial, and I thought its old I’ll think something better on my own. For starters how do I start spring project with maven, which archtype should I choose? I wanna create simple spring app, write class which I will deploy to jboss, spring will instansiate it at startup .. that is what have in mind for now .. for now I need to start it first
Hello everyone I was just going trough http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html spring tutorial, and I thought its
Share
An archetype only sets up your POM and directory structure based on a template. I wouldn’t get hung up on which one to choose.
The MVC tutorial uses the following structure:
src– Java source codewar– Web resources, web.xml, and Spring context filesIf you want to use the Maven standards, this should convert to
src/main/java– Java source codesrc/main/resources– Spring context files and configuration (non-web related) files, which you’d like to be on the classpath (i.e. WEB-INF/classes) in a webappsrc/main/webapp– Web-related resources which you’d like to appear at the root of your webapp/.war fileAnd the
<packaging>for a webapp should bewar.Update: I’d recommend taking a look at the free Maven by Example book, it walks you through building a sample application using Maven, including a chapter on “A Simple Web Application“. There is also Maven: The Complete Reference for more reference.