如果大家使用Apache MyFace的JSF实现来搭建JSF应用,可以利用Apache提供的便捷maven方法来快速搭建一个初始的应用。
mvn archetype:generate -DarchetypeCatalog=http://myfaces.apache.org
……
Choose archetype:
1: http://myfaces.apache.org -> myfaces-archetype-helloworld (Simple Web application using Apache Myfaces)
2: http://myfaces.apache.org -> myfaces-archetype-helloworld-facelets (Simple Web application using Apache Myfaces and Facelets)
3: http://myfaces.apache.org -> myfaces-archetype-helloworld-portlets (Simple Web application using Apache Myfaces and Portlets)
4: http://myfaces.apache.org -> myfaces-archetype-jsfcomponents (Simple JSF Component using Apache Myfaces)
5: http://myfaces.apache.org -> myfaces-archetype-trinidad (Simple Web application using Apache Myfaces and Trinidad)
Choose a number: (1/2/3/4/5):
……
可以看到它提供了你5个初始项目进行选择,你可以根据你的需要选择响应的选项。之后填写响应的参数后,你的应用程序框架就生成了。
然后再使用以下命令,来下载必要的依赖包,假设你的groupId=myAppId,artifactId=yourapp
cd yourapp
mvn package
之后你就搭建了一个初始框架,你可以继续使用maven来操作这个框架。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有