问题描述
我的设置: git -repository Atlassian Stash -server和 Atlassian Bamboo 。
我在 release-plugin 2.3.2 中使用 Maven 3.1.1 。 Bamboo 中的计划如下所示:
- 从<$ c $退房c> git -repository
- 执行干净安装 >执行释放:准备和释放:使用执行 ignoreSnapshots = true 和 resume = false
,但 Maven 状态,它不能标记发布,因为标记已经存在。这里是日志:
build 26-Nov-2013 10:36:37 [错误]无法执行目标org.apache .maven.plugins:maven-release-plugin:2.3.2:在项目[PROJECT-NAME]上编写(default-cli):无法标记SCM
build 26-Nov-2013 10:36:37 [ERROR ]提供者消息:
build 26-Nov-2013 10:36:37 [错误] git-tag命令失败。
生成26-Nov-2013 10:36:37 [错误]命令输出:
生成26-Nov-2013 10:36:37 [错误]致命:标记'[PROJECT-NAME] -6.2 .2'已经存在
很明显,标签已经存在了,没什么大不了的。但是,这就是我的存储库中 git tag 的样子:
bash:〜/ git / repositories / PROJECT-NAME $ git tag
[PROJECT-NAME] -5.2.5
[PROJECT-NAME] -5.3.0
[PROJECT-NAME] - 5.3.1
[PROJECT-NAME] -5.4.0
[PROJECT-NAME] -5.5.0
[PROJECT-NAME] -5.5.1
[PROJECT-NAME ] -5.5.2
[PROJECT-NAME] -5.5.3
[PROJECT-NAME] -5.5.4
[PROJECT-NAME] -5.6.0
[PROJECT -5.6.1
[PROJECT-NAME] -5.6.2
[PROJECT-NAME] -5.6.3
[PROJECT-NAME] -5.6.4
[PROJECT-NAME] -5.6.5
[PROJECT-NAME] -5.6.6
[PROJECT-NAME] -6.0.0
[PROJECT-NAME] -6.0.1
[PROJECT-NAME] -6.0.2
[PROJECT-NAME] -6.1.0
[PROJECT-NAME] -6.1.1
[PROJECT-NAME] -6.1.2
[PROJECT-NAME] -6.2.0
[PROJECT-NAME] -6.2.1
通过 svn 从 svn2git 克隆 git code> -repository。我尝试了多次重新导入存储库并删除并重新克隆它在存储 -server上。然而,标签 6.2.2 似乎存在于 Maven 的深处。这里发生了什么?
更新:我试图从存储库中删除所有标签。同样的结果。将版本从 6.2.2 更改为 6.2.3 显示出正面结果。
另一个更新:它似乎与存储库的名称有关。创建一个具有相同名称的新存储库,但在最后添加 -2 有所帮助。
在我最后一次发现CACHE PROBLEM!的尖叫后不久,我找到了解决方案。我按照本网站上的说明删除了所有存储库缓存数据:
My setup: git-repository on an Atlassian Stash-server and Atlassian Bamboo.I'm using Maven 3.1.1 with the release-plugin 2.3.2. The plan in Bamboo looks like this:
- Check out from git-repository
- perform a clean install
- perform release:prepare and release:perform with ignoreSnapshots=true and resume=false
Everything up to the last step works fine, but Maven states, that it can't tag the release, because the tag already exists. Here is the log:
build 26-Nov-2013 10:36:37 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project [PROJECT-NAME]: Unable to tag SCM build 26-Nov-2013 10:36:37 [ERROR] Provider message: build 26-Nov-2013 10:36:37 [ERROR] The git-tag command failed. build 26-Nov-2013 10:36:37 [ERROR] Command output: build 26-Nov-2013 10:36:37 [ERROR] fatal: tag '[PROJECT-NAME]-6.2.2' already exists
Well, obviously the tag already exists, no big deal. However, this is what git tag looks like for my repository:
bash:~/git/repositories/PROJECT-NAME$ git tag [PROJECT-NAME]-5.2.5 [PROJECT-NAME]-5.3.0 [PROJECT-NAME]-5.3.1 [PROJECT-NAME]-5.4.0 [PROJECT-NAME]-5.5.0 [PROJECT-NAME]-5.5.1 [PROJECT-NAME]-5.5.2 [PROJECT-NAME]-5.5.3 [PROJECT-NAME]-5.5.4 [PROJECT-NAME]-5.6.0 [PROJECT-NAME]-5.6.1 [PROJECT-NAME]-5.6.2 [PROJECT-NAME]-5.6.3 [PROJECT-NAME]-5.6.4 [PROJECT-NAME]-5.6.5 [PROJECT-NAME]-5.6.6 [PROJECT-NAME]-6.0.0 [PROJECT-NAME]-6.0.1 [PROJECT-NAME]-6.0.2 [PROJECT-NAME]-6.1.0 [PROJECT-NAME]-6.1.1 [PROJECT-NAME]-6.1.2 [PROJECT-NAME]-6.2.0 [PROJECT-NAME]-6.2.1
The git-repository is cloned via svn2git from an svn-repository. I've tried multiple times reimporting the repository and deleting and re-cloning it on the stash-server. Yet the tag 6.2.2 seems to exist somewhere in the depths for Maven. What's going on here?
Update: I just tried removing ALL tags from the repository. Same result. Changing the version from 6.2.2 to 6.2.3 showed positive results.
Another update: It seems to have something to do with the name of the repository. Creating a new repository with the same name but adding -2 at the end helped.
Shortly after my last discovery which screamed "CACHE PROBLEM!" I found the solution. I deleted all repository-cache-data following the instructions on this site: https://confluence.atlassian.com/display/BAMKB/Git+cache+removal+in+Bamboo
这篇关于Maven发布插件“标签已经存在”用于不敏感的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!