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

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

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

    一葉笑天
    雄關(guān)漫道真如鐵, 而今邁步從頭越。 從頭越, 蒼山如海, 殘陽如血。
    posts - 73,comments - 7,trackbacks - 0
        AppFuse 是一個(gè)開源項(xiàng)目,主要目的是使用開源工具來幫助開發(fā)者快速有效的建立Web應(yīng)用項(xiàng)目。使用AppFuse可以減少開發(fā)人員在建立新web應(yīng)用時(shí)候花費(fèi)大量時(shí)間在項(xiàng)目結(jié)構(gòu)的建立上。 最核心的是, AppFuse是一個(gè)項(xiàng)目的骨架,類似圖使用IDE的向?qū)Х绞絹韯?chuàng)建web項(xiàng)目。
    AppFuse 2 的環(huán)境配置:
     a. 安裝JDK 5+ (確保JAVA_HOME 指向JDK目錄, 而不是JRE目錄).
     b. 安裝 MySQL 5.x.
     c. 建立本地SMTP服務(wù)或者修改mail.properties (在src/main/resources) 的use為一個(gè)不同的主機(jī)名- it 缺省是 "localhost".
     d. 安裝Maven 2.0.9+.
        因?yàn)锳ppFuse 2使用了Maven 2 的支持。一般的Maven2 會(huì)再你使用AppFuse的包的時(shí)候會(huì)下載這些包,但是如果你的網(wǎng)絡(luò)不好的話。你也可以自己下載AppFuse2的依賴包,其下載地址為:https://appfuse.dev.java.net/servlets/ProjectDocumentList?folderID=9173&expandFolder=9173&folderID=9173,現(xiàn)在版本是AppFuse2.02.大小為80M多。
    然后解壓到某個(gè)文件夾下,然后修改Maven_Home下的/conf/settings.xml里的相應(yīng)配置,設(shè)置本地資源庫。
    <!-- 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>

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

     下面是創(chuàng)建不同種類項(xiàng)目的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
    下面將舉一個(gè)例子:
    1. 在D盤創(chuàng)建一個(gè)目錄D:\projects\
    2. 啟動(dòng)cmd。進(jìn)入目錄D:\projects\.
    3.執(zhí)行如下建構(gòu)命令創(chuàng)建基本的:
    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.執(zhí)行結(jié)束后將會(huì)看到D:\projects\myproject目錄結(jié)構(gòu),編輯D:\projects\myproject\pom.xml,修改mysql數(shù)據(jù)連接信息,主要是修改root的密碼為你自己數(shù)據(jù)庫用戶密碼
    因?yàn)槿笔榭?lt;jdbc.password></jdbc.password>。
    5.在cmd中進(jìn)入目錄D:\projects\myproject
    6.執(zhí)行mvn jetty:run-war
    7.等執(zhí)行結(jié)束后,在瀏覽器地址欄輸入http://localhost:8080/,你將會(huì)看到項(xiàng)目的界面,任意輸入一個(gè)用戶名和密碼即可登入。

    8.登入進(jìn)去以后,不錯(cuò)吧。你的新項(xiàng)目不寫一行代碼就完成了吧。呵呵。

    9.你可以運(yùn)行mvn appfuse:full-source,則會(huì)創(chuàng)建數(shù)據(jù)庫,并且生成代碼。





     

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

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


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 日韩免费福利视频| 222www免费视频| 免费在线观看污网站| 亚洲入口无毒网址你懂的| 最近中文字幕大全中文字幕免费| 亚洲s色大片在线观看| 国产久爱免费精品视频| 亚洲五月综合缴情在线观看| 一个人看的免费视频www在线高清动漫| 国产成人免费片在线视频观看| 亚洲av无码专区青青草原| 吃奶摸下高潮60分钟免费视频| 美女羞羞喷液视频免费| 亚洲AV日韩精品一区二区三区| xxxxx做受大片在线观看免费| 久久久亚洲精品蜜桃臀| 暖暖免费日本在线中文| 亚洲福利视频网址| 好男人视频社区精品免费| 日韩亚洲产在线观看| 免费国产在线观看不卡| 国产激情久久久久影院老熟女免费| 国产亚洲AV手机在线观看| 一级毛片免费视频| 亚洲五月综合网色九月色| 国产一级一片免费播放| 国内精品免费久久影院| 亚洲国产精品综合福利专区| 国产午夜免费福利红片| a毛片全部播放免费视频完整18| 色拍自拍亚洲综合图区| 妞干网免费视频在线观看| www.xxxx.com日本免费| 亚洲美女视频网站| 国产成人免费福利网站| 久久99精品免费视频| 亚洲日韩精品无码AV海量| 国产精品亚洲产品一区二区三区| 四虎国产精品永久免费网址| 亚洲jizzjizz少妇| 亚洲AV无一区二区三区久久|