于吉吉的技術博客

          建造高性能門戶網

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            65 隨筆 :: 6 文章 :: 149 評論 :: 0 Trackbacks
          The minimum requirement for a POM are the following:

          project root
          modelVersion - should be set to 4.0.0
          groupId - the id of the project's group.
          artifactId - the id of the artifact (project)
          version - the version of the artifact under the specified group

          Here's an example:

          <project>
             
          <modelVersion>4.0.0</modelVersion>  
             
          <groupId>com.juvenxu.mvnbook</groupId>  
             
          <artifactId>hello-world</artifactId>  
             
          <version>1.0-SNAPSHOT</version>  
          </project>  

          A POM requires that its groupId, artifactId, and version be configured. These three values form the project's fully qualified artifact name.

          modelVersion指定了當前POM模型的版本,對于Maven2及Maven 3來說,它只能是4.0.0
          groupId定義了項目屬于哪個組,這個組往往和項目所在的組織或公司存在關聯,如果你的公司是mycom,有一個項目為myapp,那么groupId就應該是com.mycom.myapp
          artifactId定義了當前Maven項目在組中唯一的ID
          version指定了項目當前的版本,SNAPSHOT意為快照,說明該項目還處于開發中,是不穩定的版本
          此外,如果配置的其他細節沒有被指定,Maven會使用它們的默認值
          Furthermore,你可以看到,在Minimal POM中未指定倉庫,如果你的項目是采用最小的pom,那么它是會繼承所謂的Super POM,所以就算你沒有指定倉庫,maven也知道所有的依賴直接從網上(http://repo1.maven.org/maven2)下載



          posted on 2010-12-29 17:50 陳于喆 閱讀(332) 評論(0)  編輯  收藏 所屬分類: web開發maven
          主站蜘蛛池模板: 沈阳市| 通辽市| 加查县| 盐边县| 云安县| 曲沃县| 娄底市| 张家川| 繁昌县| 庆安县| 土默特左旗| 衡南县| 仪陇县| 沾化县| 凌源市| 比如县| 晋中市| 富源县| 太湖县| 神木县| 佛山市| 集安市| 丽水市| 和硕县| 平潭县| 攀枝花市| 新巴尔虎右旗| 澄迈县| 清原| 建阳市| 奉化市| 武鸣县| 北流市| 遂宁市| 永福县| 桦南县| 盘山县| 白沙| 太白县| 墨竹工卡县| 修文县|