Maven 初步學習心得 settings.xml的作用

           User-specific configuration for maven. Includes things that should not be distributed with the pom.xml file, such as developer identity, along with local settings, like proxy information. The default location for the settings file is ~/.m2/settings.xml


          Depending on where your machine is located, it may be necessary to make a few more preparations for Maven to function correctly. If you are behind a firewall, then you will have to set up Maven to understand that. To do this, create a <your-home-directory>/.m2/settings.xml file with the following content:
          <settings>
          <proxies>
          <proxy>
          <active>true</active>
          <protocol>http</protocol>
          <host>proxy.mycompany.com</host>
          <port>8080</port>
          <username>your-username</username>
          <password>your-password</password>
          </proxy>
          </proxies>
          </settings>

          If Maven is already in use at your workplace, ask your administrator if there if there is an internal Maven proxy. If there is an active Maven proxy running, then note the URL and let Maven know you will be using a proxy. Create a <your-home-directory>/.m2/settings.xml file with the following content.
          <mirrors>
          <mirror>
          <id>maven.mycompany.com</id>
          <name>My Company's Maven Proxy</name>
          <url>http://maven.mycompany.com/maven2</url>
          <mirrorOf>central</mirrorOf>
          </mirror>
          </mirrors>

          posted on 2007-11-21 11:18 劉錚 閱讀(1461) 評論(0)  編輯  收藏 所屬分類: Maven

          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導航

          統計

          留言簿(1)

          文章分類(141)

          文章檔案(147)

          搜索

          最新評論

          主站蜘蛛池模板: 庄河市| 白银市| 永平县| 昂仁县| 同德县| 营山县| 宁波市| 祁连县| 大港区| 奉贤区| 获嘉县| 津市市| 邛崃市| 大足县| 渑池县| 云阳县| 巩义市| 福泉市| 临高县| 绵阳市| 肥西县| 安新县| 重庆市| 五指山市| 武陟县| 龙江县| 吉木乃县| 剑河县| 桦南县| 泾源县| 田东县| 安泽县| 丹巴县| 应用必备| 信阳市| 钟山县| 揭阳市| 东乡族自治县| 永兴县| 扶绥县| 聂荣县|