使用我的多项目pom,我在运行release:prepare时遇到错误.在运行良好之前,项目设置和每个发布步骤都没什么特别的.我得到的错误是:
[INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Unable to tag SCM Provider message: The svn tag command failed. Command output: svn: Commit failed (details follow): svn: File '/repos/june/tags/foo-1.0.2/foo.bar.org/pom.xml' already exists
知道它来自哪里以及如何绕过它?
(对不起重复的帖子 - 第一次被关闭,因为我没有将其表述为可以回答的问题.我希望现在好了.)
编辑
maven发布插件负责版本处理本身.因此,当我检查subversion存储库中的路径时,该路径尚不存在.
编辑2
@Ben:我不知道服务器版本,但客户端也是1.5.2.
是否有maven插件,我可以使用它来检查是否有提交,因为项目最后一次被释放?我想强制人们跟上项目文档,因此我想在构建过程中检查自上次发布以来是否有过对文档docbook项目的提交.如果没有任何构建应该失败,因为没有更新文档.或者您是否有其他方法可以自动确保人们继续记录?
我正在清理项目中的 pom 文件,发现我使用了两个略有不同的 scm 记录:
<scm>
<connection>scm:git:https://github.com/jadler-mocking/jadler.git</connection>
<developerConnection>scm:git:https://github.com/jadler-mocking/jadler.git</developerConnection>
<url>https://github.com/jadler-mocking/jadler</url>
</scm>
Run Code Online (Sandbox Code Playgroud)
对比
<scm>
<connection>scm:git:git@github.com:jadler-mocking/jadler.git</connection>
<developerConnection>scm:git:git@github.com:jadler-mocking/jadler.git</developerConnection>
<url>https://github.com/jadler-mocking/jadler</url>
</scm>
Run Code Online (Sandbox Code Playgroud)
到目前为止,我还没有找到任何描述连接字符串语法的资源。这两者有什么区别?
我可以在Maven中禁用SCM集成选项吗?我希望它在没有SCM集成的情况下构建一个本地检出项目?
有一些设置或一些如何?
提前
在建立一个maven项目时.我收到以下错误.
[ERROR]Runtime Exception thrown during execution [ERROR]The scm url cannot be null.
请提示我如何解决它.
谢谢
我正在尝试外部化我的用户名和密码,但似乎svn-settings.xml的格式不正确.我在网上找不到任何资源,除了这里的帖子,然后发布错误.
在我的pom.xml中,我得到了
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
...
<configuration>
<connectionUrl>scm:svn:http://my_hostname/im-tools-repos/trunk</connectionUrl>
<checkoutDirectory>${project.build.directory}/checkout/im-tools</checkoutDirectory>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
在C:\ Documents and Settings\my_uid.scm\svn-settings.xml中我得到了
<svn-settings>
<user>my_uid</user>
<password>my_pwd</password>
</svn-settings>
Run Code Online (Sandbox Code Playgroud)
当我运行Maven时,它会失败并显示以下消息:
C:\Documents and Settings\my_uid\.scm\svn-settings.xml isn't well formed. SKIPPED.Unrecognised tag: 'user' (position: START_TAG seen <svn-settings>\r\n\t<user>... @2:7)
[INFO] Executing: cmd.exe /X /C "svn --non-interactive checkout http://my_hostname/im-tools-repos/trunk C:\test\bamboo\agent\target\checkout\im-tools"
[INFO] Working directory: C:\test\bamboo\agent\target\checkout
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: OPTIONS of 'http://my_hostname/im-tools-repos/trunk': authorization failed: Could not authenticate to server: …
Run Code Online (Sandbox Code Playgroud) 我们在内部使用Maven和Subversion.我们还使用Maven的Release插件.我们在执行以下(正确的,我假定的)步骤时注意到了下面描述的问题.
1.我们经营release:prepare
:
1.0.0
.svn copy trunk/myproject tags/myproject-1.0.0
,从而创建标签myproject-1.0.0
.1.0.1-SNAPSHOT
.2.我们经营release:rollback
:
1.0.0-SNAPSHOT
.3,我们承诺更多的变化干路,显然针对的版本1.0.0-SNAPSHOT
.
4.我们跑release:prepare
一次:
1.0.0
.svn copy trunk/myproject tags/myproject-1.0.0
,认为它创建myproject-1.0.0
了最新主干的标签.但是,唉,Subversion(1.6和1.7一样)将代替tags/myproject-1.0.0/myproject
Maven 创建.5.我们经营release:perform
:
myproject-1.0.0
.问题很明显:步骤3中的更改未使其成为标记.我们现在正在发布1.0.0
而没有改变它.
问题是:我们如何解决这个问题?Maven的发布回滚功能本身是否已损坏?
我跟maven一起玩了这个!我终于让事情正常运行,然后我尝试了我的第一个maven版本:使用外部maven运行时准备通过m2eclipse.
这是我遇到的问题:
[错误]无法执行目标org.apache.maven.plugins:maven-release-plugin:2.0:在项目scs-global-parent上准备(default-cli):无法提交文件
[ERROR]提供程序消息:svn命令失败.
命令输出:SVN:路径"C:\用户\ SAM \的Myproj \型号\ SCS-全球父"似乎是一个颠覆1.7或更大的工作副本的一部分.请升级您的Subversion客户端以使用此工作副本.
我正在使用Subclipse 1.8.x - 它支持1.7个工作副本?必须有一个解决方法......我在这里缺少什么?我是否需要添加maven-release-plugin的"实验性"版本?目前我使用的是"默认",因为我的pom或settings.xml中没有指定版本.谢谢!!
哪个"颠覆客户端"插件对我大吼大叫?
我正在尝试使用maven SCM插件在自动构建期间将一些文件提交到git repo,插件需要将提交消息设置为系统属性,我不想在命令上传递此信息line(我也使用release插件,这会导致问题).
我已经尝试了所有我想通过pom添加消息系统属性但没有运气,这是我的pom的精简版本:
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.monkeys.coding</groupId>
<artifactId>project</artifactId>
<packaging>js</packaging>
<version>1.0.4-SNAPSHOT</version>
<name>Some Project</name>
<description>Some Project where I want to add files to git during build</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<projectVersion>${project.version}</projectVersion>
</properties>
<scm>
<connection>scm:git:http://some.git.repo:9080/git/module.git</connection>
<developerConnection>scm:git:http://some.git.repo:9080/git/module.git</developerConnection>
<url>http://some.git.repo:9080/git/module.git</url>
</scm>
<build>
<finalName>${project.artifactId}</finalName>
<!-- Package as js -->
<extensions>
<extension>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javascript-maven-plugin</artifactId>
<version>2.0.0-alpha-1</version>
</extension>
</extensions>
...
</build>
<profiles>
<!-- run this profile when releasing the library -->
<profile>
<id>release</id>
<properties>
<message>Add version files to git</message>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId> …
Run Code Online (Sandbox Code Playgroud) 之间有什么区别scm:tag
:
<scm>
<connection>scm:git:code.stuff.com/scm/project/repo.git</connection>
<developerConnection>scm:git:ssh://git@code.stuff.com:7999/project/repo.git</developerConnection>
<tag>HEAD</tag>
</scm>
Run Code Online (Sandbox Code Playgroud)
我读到,在release:prepare
目标过程中,系统会提示用户输入要粘贴的所需标签名称;准备工作成功完成后,Maven 将使用传递的名称在 VCS 中标记发布候选版本。此时,还有什么用呢scm:tag
?
我有以下配置 -
<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>
Run Code Online (Sandbox Code Playgroud)
我的问题是每次scm配置上的项目版本更改都会发生变化.说从0.1到0.2等...我们是否需要确保在svn中创建这些标签或maven创建标签?如果Maven使用我的上述配置创建标签,我已经有http://example.com/tags/MyProject可用,但它没有标记上面的内容?
请问有什么想法吗?