2014-10-09 114 views
1

我试图执行mvn release:prepare命令,但我收到消息scm连接或developerconnection必须指定Maven忽略scm标记

我有在pom.xml<scm>部分:

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns="http://maven.apache.org/POM/4.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 

    <parent> 
     <groupId>org.sonatype.oss</groupId> 
     <artifactId>oss-parent</artifactId> 
     <version>7</version> 
    </parent> 

    ... 

    <scm> 
     <connection>scm:git:https://github.com/repository-name</connection> 
     <developerConnection>scm:git:https://github.com/repository-name</developerConnection> 
     <url>https://github.com/repository-name</url> 
    </scm> 
</project> 

Maven的版本是3.2.3。怎么了?

+1

这看起来克隆足以http://www.baeldung.com/maven-release-nexus。任何机会的网址可能不正确?也许你可以尝试设置相同的连接值的网址? (如https://github.com/ioos/ioos-sos-common/blob/master/pom.xml#L40) – VonC 2014-10-10 06:35:02

+0

@VonC,你是对的。我只需在''的每个项目的末尾添加'.git'。谢谢。 – 2014-10-10 09:14:52

+0

完美。我已经添加了更多可见性的答案。 – VonC 2014-10-10 09:17:23

回答