于吉吉的技術博客

          建造高性能門戶網

            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
          主站蜘蛛池模板: 余干县| 屯留县| 蚌埠市| 海兴县| 扶余县| 四会市| 廊坊市| 蓝山县| 寿阳县| 洞头县| 黑河市| 普陀区| 韶关市| 松阳县| 漳平市| 安岳县| 屏边| 麻栗坡县| 道孚县| 肇州县| 北辰区| 丹巴县| 晋中市| 德昌县| 青浦区| 惠东县| 武安市| 济宁市| 鸡泽县| 高密市| 临潭县| 塔河县| 红安县| 循化| 建德市| 文山县| 合作市| 镇坪县| 沙雅县| 墨脱县| 正安县|