[英]Maven ignores scm tag
I'm trying to execute mvn release:prepare
command, but I get the message scm connection or developerconnection must be specified . 我正在尝试执行
mvn release:prepare
命令,但是我收到消息scm connection或必须指定developerconnection 。
I do have <scm>
section in the pom.xml
: 我在
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 version is 3.2.3. Maven版本是3.2.3。 What's wrong?
怎么了?
From the OP Anton Golovin 's comments , adding .git
at the end of <scm>
items was enough: 根据OP Anton Golovin的评论 ,在
<scm>
项目末尾添加.git
就足够了:
<scm>
<connection>scm:git:https://github.com/repository-name.git</connection>
<developerConnection>scm:git:https://github.com/repository-name.git</developerConnection>
<url>https://github.com/repository-name.git</url>
</scm>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.