于吉吉的技術博客

          建造高性能門戶網

            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 陳于喆 閱讀(344) 評論(0)  編輯  收藏 所屬分類: web開發maven
          主站蜘蛛池模板: 呼图壁县| 淳安县| 阳曲县| 清水县| 翼城县| 汕头市| 潞城市| 新营市| 雅安市| 年辖:市辖区| 松滋市| 阆中市| 九龙城区| 抚顺市| 鹿邑县| 巴南区| 新乡县| 玉山县| 金坛市| 德保县| 金阳县| 黄平县| 资兴市| 阳城县| 布尔津县| 息烽县| 秀山| 云南省| 锦州市| 惠东县| 岱山县| 苗栗市| 汝阳县| 健康| 蕲春县| 神木县| 平顶山市| 宝鸡市| 策勒县| 青川县| 贵定县|