Terry.Li-彬

          虛其心,可解天下之問(wèn);專其心,可治天下之學(xué);靜其心,可悟天下之理;恒其心,可成天下之業(yè)。

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            143 隨筆 :: 344 文章 :: 130 評(píng)論 :: 0 Trackbacks
          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          常用鏈接

          留言簿(19)

          隨筆分類(107)

          隨筆檔案(141)

          文章分類(284)

          文章檔案(342)

          相冊(cè)

          收藏夾(58)

          家裝

          最新隨筆

          搜索

          積分與排名

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          1、下載war包,部署到tomcat中,啟動(dòng)tomcat;
          2、訪問(wèn):http://xxx/nexus-1.1.1/index.html;
          3、用admin/admin123登錄;
          4、修改admin的密碼,但是不要修改別的屬性和修改別的用戶信息
          5、進(jìn)入administration中的repositories,依次修改三個(gè)type是proxy的項(xiàng)目,將其Download Remote Indexes修改為true;然后郵件他們,分別re-index一下;
          6、將你自己機(jī)器上的manven緩存(一般是在C:\Documents and Settings\登錄名\.m2下面)全部拷貝到/home/你的用戶名/sonatype-work/nexus/storage下面的central和releases各一份;
          7、修改你本地的(一般是在C:\Documents and Settings\登錄名\.m2下面)setting.xml文件改成下面的:
          Xml代碼
          1. <settings>??
          2. ??????<proxies>??
          3. ????????<proxy>??
          4. ??????????<id>normal</id>??
          5. ??????????<active>true</active>??
          6. ??????????<protocol>http</protocol>??
          7. ??????????<username>deployment</username>??
          8. ??????????<password>deploy</password>??
          9. ??????????<host>172.19.0.177:8080/nexus-1.1.1</host>??
          10. ??????????<port>80</port>??
          11. ??????????<nonProxyHosts>172.19.0.177:8080/nexus-1.1.1</nonProxyHosts>??
          12. ????????</proxy>??
          13. ??????</proxies>??
          14. ??????<servers>??
          15. ??????</servers>??
          16. ??????<mirrors>??
          17. ?????????<mirror>??
          18. ??????????<id>nexus-public-snapshots</id>??
          19. ??????????<mirrorOf>public-snapshots</mirrorOf>??
          20. ??????????<url>http://172.19.0.177:8080/nexus-1.1.1/content/groups/public-snapshots</url>??
          21. ????????</mirror>??
          22. ????????<mirror>??
          23. ??????????<!--This?sends?everything?else?to?/public?-->??
          24. ??????????<id>nexus</id>??
          25. ??????????<mirrorOf>*</mirrorOf>??
          26. ??????????<url>http://172.19.0.177:8080/nexus-1.1.1/content/groups/public</url>??
          27. ????????</mirror>??
          28. ??????</mirrors>??
          29. ??????<profiles>??
          30. ????????<profile>??
          31. ??????????<id>development</id>??
          32. ??????????<repositories>??
          33. ????????????<repository>??
          34. ??????????????<id>central</id>??
          35. ??????????????<url>http://central</url>??
          36. ??????????????<releases><enabled>true</enabled></releases>??
          37. ??????????????<snapshots><enabled>true</enabled></snapshots>??
          38. ????????????</repository>??
          39. ??????????</repositories>??
          40. ?????????<pluginRepositories>??
          41. ????????????<pluginRepository>??
          42. ??????????????<id>central</id>??
          43. ??????????????<url>http://central</url>??
          44. ??????????????<releases><enabled>true</enabled></releases>??
          45. ??????????????<snapshots><enabled>true</enabled></snapshots>??
          46. ????????????</pluginRepository>??
          47. ??????????</pluginRepositories>??
          48. ????????</profile>??
          49. ????????<profile>??
          50. ??????????<id>public-snapshots</id>??
          51. ??????????<repositories>??
          52. ????????????<repository>??
          53. ??????????????<id>public-snapshots</id>??
          54. ??????????????<url>http://public-snapshots</url>??
          55. ??????????????<releases><enabled>false</enabled></releases>??
          56. ??????????????<snapshots><enabled>true</enabled></snapshots>??
          57. ????????????</repository>??
          58. ??????????</repositories>??
          59. ?????????<pluginRepositories>??
          60. ????????????<pluginRepository>??
          61. ??????????????<id>public-snapshots</id>??
          62. ??????????????<url>http://public-snapshots</url>??
          63. ??????????????<releases><enabled>false</enabled></releases>??
          64. ??????????????<snapshots><enabled>true</enabled></snapshots>??
          65. ????????????</pluginRepository>??
          66. ??????????</pluginRepositories>??
          67. ????????</profile>??
          68. ??????</profiles>??
          69. ????????<activeProfiles>??
          70. ????????<activeProfile>development</activeProfile>??
          71. ??????</activeProfiles>??
          72. </settings>??
          ?

          ??? 將172.19.0.177地址修改為你自己的服務(wù)器地址
          ???
          8、在你的項(xiàng)目中的pom.xml中增加一段:

          Xml代碼
          1. <distributionManagement>??
          2. ????????<repository>??
          3. ????????????<id>repo</id>??
          4. ????????????<name>public</name>??
          5. ????????????<url>http://172.19.0.177:8080/nexus-1.1.1/content/repositories/releases</url>??
          6. ????????</repository>??
          7. ????????<snapshotRepository>??
          8. ????????????<id>Snapshots</id>??
          9. ????????????<name>Snapshots</name>??
          10. ????????????<url>http://172.19.0.177:8080/nexus-1.1.1/content/repositories/snapshots</url>??
          11. ????????</snapshotRepository>??
          12. ????</distributionManagement>??
          ?


          這樣一來(lái)經(jīng)過(guò)我的測(cè)試,如果你在沒(méi)有局域網(wǎng)的環(huán)境中(也就是沒(méi)辦法訪問(wèn)你的私服),只要將pom里面的那段刪除就可以了。

          posted on 2010-09-26 00:16 禮物 閱讀(1371) 評(píng)論(0)  編輯  收藏 所屬分類: Maven2
          主站蜘蛛池模板: 方山县| 井研县| 义马市| 漠河县| 蚌埠市| 确山县| 当阳市| 收藏| 聊城市| 武平县| 饶平县| 新疆| 三原县| 昂仁县| 阿城市| 金门县| 临高县| 成都市| 余庆县| 德格县| 卓尼县| 广西| 阿勒泰市| 邢台市| 昔阳县| 贵南县| 吉安县| 凌海市| 浮山县| 长岛县| 墨脱县| 诏安县| 文山县| 双鸭山市| 隆安县| 桂阳县| 汾阳市| 阿巴嘎旗| 宕昌县| 蓝田县| 子长县|