Maven archetype to create a maven project for MVC 1.0 (JSR-371)
with Bash
mvn archetype:generate\
-DarchetypeGroupId=am.ik.archetype\
-DarchetypeArtifactId=mvc-1.0-blank-archetype\
-DarchetypeVersion=1.0.0-m02
with CommandPrompt (Windows)
mvn archetype:generate^
-DarchetypeGroupId=am.ik.archetype^
-DarchetypeArtifactId=mvc-1.0-blank-archetype^
-DarchetypeVersion=1.0.0-m02
$ mvn archetype:generate -B\
-DarchetypeGroupId=am.ik.archetype\
-DarchetypeArtifactId=mvc-1.0-blank-archetype\
-DarchetypeVersion=1.0.0-m02\
-DgroupId=com.example\
-DartifactId=mvc-demo\
-Dversion=1.0.0-SNAPSHOT
Following procedures are for version 1.0.0-m01
Open the project with NetBeans and run the application
Choose GlassFish 4.1
Access http://localhost:8080/mvc-demo/app/hello (Context root is your artifactId).
This project uses Facelets as a view technology. Currently Facelets view requires web.xml
.
You can remove web.xml
if you use other view (JSP, Thymeleaf, Handlebars and so on).
See also this article.
Licensed under the Apache License, Version 2.0.