JSF is much less popular than Springboot. I could not find one fits my need so create this one to save tone of boilerplate process. It's base on Java 8 and EE 7.
main/java
holds java codes,main/webapp
holds xhtml files- Libraries included:
- gson
- log4j/slf4j
- lombok
- mysql
- apache commons-lang3
- sql2o
- The
index.xhtml
usestemplate.xhtml
as parent template, which includeBootstrap 4
.gitignore
included.
- Install archetype to local maven repository
# In jsf directory
mvn install
- Create project from local maven archetype `com.tomdeng.archetypes:jsf from the IDE. For IntelliJ IDEA, a Maven Archetype Catalogs plugin make it easy to load local archetype, simply add /Users/[username]/.m2/repository/archetype-catalog.xml to catalog.
- Or, create project by running command:
mvn archetype:generate -DarchetypeCalalog=local
- Add your favorite library to
src/main/resources/archetype-resources/pom.xml
, NOT thepom.xml
in root directory. - Add addtional files in
src/main/resources/META-INF/maven/archetype-metadata.xml
- I could not put
##version_number
as war file suffix inpom.xml
. - Tried to inlcude the empty sub directories by adding
<includeEmptyDirs>true</includeEmptyDirs>
tomaven-resources-plugin
but no luck