<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    一葉笑天
    雄關漫道真如鐵, 而今邁步從頭越。 從頭越, 蒼山如海, 殘陽如血。
    posts - 73,comments - 7,trackbacks - 0
        AppFuse 是一個開源項目,主要目的是使用開源工具來幫助開發者快速有效的建立Web應用項目。使用AppFuse可以減少開發人員在建立新web應用時候花費大量時間在項目結構的建立上。 最核心的是, AppFuse是一個項目的骨架,類似圖使用IDE的向導方式來創建web項目。
    AppFuse 2 的環境配置:
     a. 安裝JDK 5+ (確保JAVA_HOME 指向JDK目錄, 而不是JRE目錄).
     b. 安裝 MySQL 5.x.
     c. 建立本地SMTP服務或者修改mail.properties (在src/main/resources) 的use為一個不同的主機名- it 缺省是 "localhost".
     d. 安裝Maven 2.0.9+.
        因為AppFuse 2使用了Maven 2 的支持。一般的Maven2 會再你使用AppFuse的包的時候會下載這些包,但是如果你的網絡不好的話。你也可以自己下載AppFuse2的依賴包,其下載地址為:https://appfuse.dev.java.net/servlets/ProjectDocumentList?folderID=9173&expandFolder=9173&folderID=9173,現在版本是AppFuse2.02.大小為80M多。
    然后解壓到某個文件夾下,然后修改Maven_Home下的/conf/settings.xml里的相應配置,設置本地資源庫。
    <!-- localRepository
        The path to the local repository maven will use to store artifacts.
        Default: ~/.m2/repository
      <localRepository>/path/to/local/repo</localRepository>
      -->
      <localRepository>E:/appfusedeps/repository</localRepository>

    需要注意的上面的配置里說默認的資源庫路徑為~/.m2/repository,這是指用戶的home目錄,但如果這樣設置在windows下,會產生一些問題,因為windows的用戶目錄在C:\Documents and Settings下,而這個目錄有空格,所以最好直接指定另外的沒有空格的英文路徑。

     下面是創建不同種類項目的Archetype Command:
    1.JSF Basic
       mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/releases-DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject
    2.Spring MVC Basic
      mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-spring -DremoteRepositories=http://static.appfuse.org/releases-DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject
    3. Struts 2 Basic
      mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/releases-DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject
    4. Tapestry Basic
      mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-tapestry -DremoteRepositories=http://static.appfuse.org/releases-DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject
    5. JSF Modular
      mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-jsf -DremoteRepositories=http://static.appfuse.org/releases-DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject
    6.Spring MVC Modular
      mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-spring -DremoteRepositories=http://static.appfuse.org/releases-DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject
    7.Struts 2 Modular
      mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-struts -DremoteRepositories=http://static.appfuse.org/releases-DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject
    8.Tapestry Modular
      mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-tapestry -DremoteRepositories=http://static.appfuse.org/releases-DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject
    9.Core(backend only)
       mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-core -DremoteRepositories=http://static.appfuse.org/releases-DarchetypeVersion=2.0 -DgroupId=com.mycompany.app -DartifactId=myproject
    下面將舉一個例子:
    1. 在D盤創建一個目錄D:\projects\
    2. 啟動cmd。進入目錄D:\projects\.
    3.執行如下建構命令創建基本的:
    mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts -DremoteReposities=http://static.appfuse.org/release -Darchetypeversion=2.0.1 -DgroupId=com.zhangjr.framework -DartifactId=myproject
    4.執行結束后將會看到D:\projects\myproject目錄結構,編輯D:\projects\myproject\pom.xml,修改mysql數據連接信息,主要是修改root的密碼為你自己數據庫用戶密碼
    因為缺省為空<jdbc.password></jdbc.password>。
    5.在cmd中進入目錄D:\projects\myproject
    6.執行mvn jetty:run-war
    7.等執行結束后,在瀏覽器地址欄輸入http://localhost:8080/,你將會看到項目的界面,任意輸入一個用戶名和密碼即可登入。

    8.登入進去以后,不錯吧。你的新項目不寫一行代碼就完成了吧。呵呵。

    9.你可以運行mvn appfuse:full-source,則會創建數據庫,并且生成代碼。





     

    posted on 2008-06-14 20:27 一葉笑天 閱讀(1470) 評論(0)  編輯  收藏 所屬分類: Java EE技術

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 国产一区二区三区亚洲综合| 亚洲欧洲专线一区| 精品熟女少妇aⅴ免费久久| 免费看一级做a爰片久久| 亚洲精品国产综合久久久久紧 | 亚洲一区二区三区在线观看网站| 国产大片91精品免费观看不卡| 无码专区—VA亚洲V天堂| 一区二区三区四区免费视频 | 美女又黄又免费的视频| 丁香亚洲综合五月天婷婷| 免费一级全黄少妇性色生活片| 亚洲国产精品碰碰| 久久性生大片免费观看性| 亚洲va中文字幕无码久久不卡| 最近中文字幕mv免费高清在线 | 亚洲AV永久纯肉无码精品动漫 | 成人免费毛片视频| 日韩亚洲人成在线综合| 亚洲美女在线国产| 久久狠狠躁免费观看2020| 亚洲午夜电影在线观看高清| 好吊妞在线新免费视频| 一级片在线免费看| 亚洲成人激情在线| 女人18毛片免费观看| 日本一区二区三区在线视频观看免费 | 亚洲色图在线播放| 午夜视频免费成人| 国产裸体美女永久免费无遮挡| 久久亚洲国产精品| 日韩中文字幕免费| 国内精品免费视频精选在线观看| 亚洲精品视频观看| 亚洲成av人片一区二区三区| 免费黄色电影在线观看| 亚洲熟妇无码一区二区三区导航| 国产国拍亚洲精品福利| 在线永久免费的视频草莓| 乱爱性全过程免费视频| 亚洲国产日产无码精品|