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鎸囧畾浜?jiǎn)褰撳墠POM妯″瀷鐨勭増鏈紝瀵逛簬Maven2鍙?qiáng)Maven 3鏉ヨ錛屽畠鍙兘鏄?.0.0
groupId瀹氫箟浜?jiǎn)椤圭洰灞炰簬鍝釜缁勫Q岃繖涓粍寰寰鍜岄」鐩墍鍦ㄧ殑緇勭粐鎴栧叕鍙稿瓨鍦ㄥ叧鑱?濡傛灉浣犵殑鍏徃鏄痬ycom錛屾湁涓涓」鐩負(fù)myapp錛岄偅涔坓roupId灝卞簲璇ユ槸com.mycom.myapp
artifactId瀹氫箟浜?jiǎn)褰撳墠Maven欏圭洰鍦ㄧ粍涓敮涓鐨処D
version鎸囧畾浜?jiǎn)椤圭洰褰撳墠鐨勭増鏈?SNAPSHOT鎰忎負(fù)蹇収錛岃鏄庤欏圭洰榪樺浜庡紑鍙戜腑錛屾槸涓嶇ǔ瀹氱殑鐗堟湰
姝ゅ,濡傛灉閰嶇疆鐨勫叾浠栫粏鑺傛病鏈夎鎸囧畾,Maven浼?xì)鋴社敤瀹冧滑鐨勯粯璁ゅ?br />
Furthermore,浣犲彲浠ョ湅鍒?鍦∕inimal POM涓湭鎸囧畾浠撳簱,濡傛灉浣犵殑欏圭洰鏄噰鐢ㄦ渶灝忕殑pom,閭d箞瀹冩槸浼?xì)鐟翩壙鎵璋撶殑Super POM,鎵浠ュ氨綆椾綘娌℃湁鎸囧畾浠撳簱,maven涔熺煡閬撴墍鏈夌殑渚濊禆鐩存帴浠庣綉涓?http://repo1.maven.org/maven2)涓嬭澆

]]>