settings.xml 代理(<proxy> 節點)。mvn -U archetype:create \
-DarchetypeGroupId=org.appfuse.archetypes \
-DarchetypeArtifactId=appfuse-basic-struts \
-DremoteRepositories=https://static.appfuse.org/releases \
-DarchetypeVersion=2.0.2 \
-DgroupId=com.mycompany.app \
-DartifactId=myproject
-U 強制更新快照,校園網/內網首次必加。生成目錄 ~/myproject(Windows 在 C:\Documents and Settings\Administrator)。
pom.xml 底部資料庫配置,填入真實 root 密碼。pom.xml 中 aspectj-maven-plugin 相關配置,否則 Unable to find mojo 'aspectj-maven-plugin:1.0'。cd myproject
mvn jetty:run-war
瀏覽器打開 https://localhost:8080,預設帳號 admin/admin、user/user。
整合 Spring、Hibernate/JPA、Struts 2/Spring MVC/JSF、Spring Security、Maven、Jetty/Tomcat、DBUnit、Cargo 等最佳實踐,生成即具備:分層架構、安全框架、單元/整合測試骨架、多環境 Profile、自動化部署腳本。適合快速原型、中小專案起步、團隊標準化模板。