2011-10-01 89 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

更新,谢谢;) –