應用maven構建Appfuse2項目…

來源:互聯網
上載者:User

如果你嘗試過使用appfuse來生產項目,其實appfuse挺好的,從前台頁面到後台操作資料庫會幫我們產生一系列的代碼。
曾經研究過appfuse1.9.4版,現在已經發展到了2.0版本,而且使用了maven。
用法:
1、下載maven,配置環境變數
set JAVA_HOME=D:/jdk1.6
set MAVEN_HOME=D:/apache/maven-2.0.8
set PATH=%MAVEN_HOME%/bin;%PATH%
2、修改localRepository位置
開啟檔案 %MAVEN_HOME%/conf/settings.xml ,設定 <localRepository>D:/apache/maven-2.0.8/repository</localRepository>
本地資產庫目錄。
3、測試環境正確與否
在命令列下輸入: mvn -version 如果顯示:Maven version: 2.0.8 和 Java version: 1.6.0_03則說明maven配置正確。
4、產生工程
建立一個目錄存放工程,如 D:/appfuse2/JSF 。命令列下進入到此目錄,執行建立命令。
如:mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.1 -DgroupId=com.fsc.base -DartifactId=Fis
根據你項目的需要只需修改groupId(包名)和artifactId(工程名)。
執行完成後,會在D:/appfuse2/JSF目錄下產生名為 Fis 的工程。
5、進入 Fis 目錄下,執行 mvn appfuse:full-source 產生代碼。
6、如果我們用eclipse開發,則可產生eclipse工程,命令:mvn eclipse:eclipse

這樣一個基於appfuse2的工程便產生了。

 

 

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.