2011-10-01 25 views
0

我創造我自己的倉庫下使用Apache服務器我的硬盤 和下M2_HOME我怎樣才能知道我是否使用快照版本或不

化,當在settings.xml文件 提供的用戶名和密碼我正在MVN下運行命令部署提示其顯示的生成錯誤 說這

<distributionManagement> 
    <!-- use the following if you're not using a snapshot version. -- 
    <repository> 
    <id>repo</id> 
    <name>Repository Name</name> 
    <url>scp://host/path/to/repo</url> 
    </repository> 
    <!-- use the following if you ARE using a snapshot version. --> 
    <snapshotRepository> 
    <id>repo</id> 
    <name>Repository Name</name> 
    <url>scp://host/path/to/repo</url> 
    </snapshotRepository> 
</distributionManagement> 

請告訴我,我怎麼能知道我是否使用快照版本 (我已導入現有的Maven項目到Eclipse中,我不瞭解m aven)

回答

2

您只需在項目的pom.xml文件中檢查<version \>標籤是否包含-SNAPSHOT後綴。如果未定義$ {project.version},請在<parent \>標記下查找相同的標記。

無論如何,您將不得不設置部署,而無需以前瞭解Maven。我建議你看看this free PDF guide,這是一個相當不錯的介紹。

+0

「這個免費的PDF指南」鏈接被移動。你可以請鏈接當前PDF? –

+0

更新,謝謝;) –