jinfeng_wang

          G-G-S,D-D-U!

          BlogJava 首頁 新隨筆 聯系 聚合 管理
            400 Posts :: 0 Stories :: 296 Comments :: 0 Trackbacks

          1、下載并解壓zip到你自己指定的目錄
          2
          、檢查是否設定了JAVA_HOME,然后設定MAVEN_HOME為安裝目錄和Path=%MAVEN_HOME%\bin
          3
          、將lib\maven.jar 解壓縮,修改其中的default.properties文件中的幾個屬性。
            
             maven.home.local = d:/maven
             maven.repo.local = d:/maven/repository
            
             ## ----------------------------------------------------------
             ## ${user.home}/build.properties
             ## ----------------------------------------------------------
             maven.proxy.host = proxy
             maven.proxy.port = 80
             maven.proxy.username = username
             maven.proxy.password = password
          4
          maven使用時會出現亂碼,這是由于maven.jarorg\apache\maven\messages\messages_zh_CN.properties這個文件的毛病。
             native2ascii
          進行轉換,然后重新覆蓋此文件即可。
            

           

          5、運行maven命令,即可生成一系列的文件

           

          6、運行maven genapp 即可生成測試文件,自動下載文件,然后就可以 maven java:compile了。

          7.  default.properties中遠程repository重新設置: maven.repo.remote = http://apache.linuxforum.net/dist/java-repository,http://dist.codehaus.org/,http://mirrors.sunsite.dk/maven/,http://public.planetmirror.com/pub/maven,http://www.ibiblio.org/maven,http://www.ganet.org/maven/,http://test.topicus.nl/maven/

           

          maven tutorial :  

           http://www-900.ibm.com/developerWorks/cn/java/j-maven/

           http://www.theserverside.com/articles/article.tss?l=MavenMagic

                使用中如果有問題,可以參考下面文章. :)  http://java.mblogger.cn/layout/posts/5731.aspx

             但我下載的源代碼和原文"Figure 3 "的目錄結構不一致, 只有三個目錄:service, Foobar-Web,ear. 執行結果不正確.

          我分別在這三個目錄下,分別執行maven, 前兩個已經完成,但是在ear目錄下執行maven命令,則報錯如下:
          "Case-sensitive issue: The dependency xerces:xerces has a case problem. The dependency was either retrieved in the past with the wrong case or has been specified with the wrong case in your project.xml file. Fix your project.xml or update your local repository with the properly-cased file and try again."

          讓人郁悶的是, 我把repository里面的xerces目錄刪除,還是只可以完成前兩步,第三步報同一個錯誤.

          我將每個depencyproperties元素刪除,就可以了 sucessful :(

          可以請教一下么?   

           

          posted on 2005-02-16 16:03 jinfeng_wang 閱讀(2169) 評論(1)  編輯  收藏 所屬分類: maven

          評論

          # re: maven的tutorial 2005-03-10 14:57 jinfeng_wang
          Case-sensitive issue問題解決,更新下載maven-ear-plugin-1.6.1.jar到maven\plugin目錄中,并刪除maven\cache,重新在maven目錄運行maven命令。  回復  更多評論
            

          主站蜘蛛池模板: 济南市| 广河县| 霍山县| 西和县| 铁力市| 邵阳县| 余姚市| 崇阳县| 富顺县| 大竹县| 丰城市| 万安县| 天等县| 长葛市| 福清市| 皮山县| 黄梅县| 柯坪县| 舒城县| 炉霍县| 珲春市| 宕昌县| 张家港市| 沧源| 修武县| 大足县| 广平县| 鄱阳县| 宁河县| 锡林郭勒盟| 西藏| 叶城县| 伊宁县| 门源| 三江| 图片| 哈巴河县| 赫章县| 自治县| 恩施市| 天台县|