简体   繁体   English

Maven SCM-Maven是否自动创建标签?

[英]maven scm - Does maven creates tag automatically?

I have below configurations in place - 我有以下配置-

<scm>
<connection>scm:svn:http://example.com/tags/MyProject/MyProject-0.1</connection>
<developerConnection>scm:svn:http://example.com/tags/MyProject/MyProject-0.1</developerConnection>
<url>scm:svn:http://example.com/tags/MyProject/MyProject-0.1</url>
</scm>

My question is each time version changes for my project above scm configurations will change. 我的问题是,每次在scm配置以上更改我的项目的版本时,都会更改。 say from 0.1 to 0.2 and so on... Do we need to make sure these tags created in svn or does maven creates the tag? 比如说从0.1到0.2,依此类推...我们是否需要确保这些标记是在svn中创建的,还是maven是否创建了标记? if Maven creates the tag with my above configuration I already have http://example.com/tags/MyProject available but it's not tagging the above? 如果Maven使用上面的配置创建标签,我已经有http://example.com/tags/MyProject可用,但是上面没有标签?

Can anye fill me some thoughts please? 能给我一些想法吗?

If the configuration is correct and you are using maven-release-plugin which means 如果配置正确并且您正在使用maven-release-plugin

mvn release:prepare 

than a SVN tag is created automatically by Maven . Maven自动创建了一个SVN标签。 So there is no need to check. 因此,无需检查。 Apart from that it could happen that you need to change the tag-Base in the Maven-release-plugin if you have a different SVN layout which is not like: 除此之外,如果您使用不同的SVN布局(可能不是这样),则可能需要在Maven-release-plugin中更改tag-Base:

   Repo
    +-- Project
            +--- trunk
            +--- tags
            +--- branches

which means you need to configure the maven-release-plugin : 这意味着您需要配置maven-release-plugin

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
          <tagBase>https://svn.mycompany.com/repos/myapplication/releases</tagBase>
        </configuration>
      </plugin>
    </plugins>
    ...
  </build>
  ...
</project>

The svn copy and svn move command have an option called --parents. svn copy和svn move命令具有称为--parents的选项。 It says without --parents option, it would not create intermediate directories. 它说没有--parents选项,它将不会创建中间目录。

What is intermediate directories in SVN? SVN中的中间目录是什么?

This is an issue which should be raised at http://jira.codehaus.org/browse/SCM 这个问题应该在http://jira.codehaus.org/browse/SCM中提出

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM