如何将 CVS 与 maven-release-plugin 一起使用?
我很难让 maven-release-plugin 与我们的 CVS 存储库一起使用。希望我遗漏了一些明显的东西,或者没有人再使用 CVS/pserver 和 Maven2/3 了?
第一个问题是 scm URL:
maven CVS 提供程序声明有效的 scm URL 如下所示:
scm:cvs<delimiter>pserver<delimiter>[username[<delimiter>password]@]servername[<delimiter>port]<delimiter>path_to_repository<delimiter>module_name
所以,我正在尝试
<scm>
<connection>scm:cvs:pserver:cvssserver:/home/cvs/repository/projecta:ejbprojectA</connection>
</scm>
哪个应该是有效的 cvs scm url。对于发布插件,我将直接在发布插件配置中的本地 settings.xml 中设置用户名。发布插件可以正常工作,但这会导致构建 Maven 站点时出错:
[INFO] Username isn't defined.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalArgumentException: Username isn't defined.
at org.apache.maven.scm.provider.cvslib.repository.CvsScmProviderRepository.getCvsRootForCvsPass(CvsScmProviderRepository.java:113)
这似乎是 scm 插件中的一个三年前的错误:http://jira.codehaus.org/browse/SCM-350
添加用户名变量来满足站点插件也不起作用,因为这会触发另一个(4岁)maven-release-plugin 中的错误: http://jira.codehaus.org/browse /MRELEASE-128
如果我使用固定的用户名,我可以让它以某种方式工作,但这并不是很令人满意。
第二个问题是扁平的项目结构,maven发布插件似乎无法在它们上使用CVS,似乎有一些针对SVN的修复,但这些更改完全破坏了扁平的cvs结构(项目模块旁边的主pom模块)
所以,最大的问题是,还有其他人将 maven-release-plugin 与 cvs 一起使用吗?你的设置怎么样?您如何处理这些问题?您是否使用扁平项目结构(在 Eclipse 中使用更方便......)?
i'm having a hard time getting the maven-release-plugin to work with our CVS repository. Hope I'm missing something obvious, or is noone using CVS/pserver and Maven2/3 anymore ?
The first problem is the scm URL:
The maven CVS provider states that a valid scm URL looks like this:
scm:cvs<delimiter>pserver<delimiter>[username[<delimiter>password]@]servername[<delimiter>port]<delimiter>path_to_repository<delimiter>module_name
So, i'm trying
<scm>
<connection>scm:cvs:pserver:cvssserver:/home/cvs/repository/projecta:ejbprojectA</connection>
</scm>
which should be a valid cvs scm url. For the release-plugin i'll set the username inside a local settings.xml directly in the relase plugins configuration. The release plugin works ok with that, but this leads to an error building the maven site:
[INFO] Username isn't defined.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalArgumentException: Username isn't defined.
at org.apache.maven.scm.provider.cvslib.repository.CvsScmProviderRepository.getCvsRootForCvsPass(CvsScmProviderRepository.java:113)
This seems to be a three year old bug in the scm plugin: http://jira.codehaus.org/browse/SCM-350
Adding a username variable to satisfy the site plugin also does not work, as this would trigger another (4 year old) bug in the maven-release-plugin: http://jira.codehaus.org/browse/MRELEASE-128
If i use a fixed username i can get it somehow to work, but this is not really satisfactory.
The second problem are flat project structures, the maven release plugin seems unable to work with CVS on them, there seems to be some fixes for SVN, but these changes totally break flat cvs structures (main pom module beside project modules)
So, the biggest question is, is anyone else using the maven-release-plugin with cvs ? How is your setup ? How do you deal with these problems ? Do you use flat project structures at all (which are much more convinient to use in eclipse ...) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我正在使用 CVS 的发布插件。
这是我的版本:
这是我的 scm 元素:
我同时调用
release:prepare
和 <代码>release:执行与-Dusername=用户名
:mvnrelease:执行-Dusername=用户名
I'm using the release plugin with CVS.
Here are my versions:
Here's my scm element:
And I call both
release:prepare
andrelease:perform
with-Dusername=username
:mvn release:perform -Dusername=username
你必须在网址中输入一个虚拟用户名,然后它就可以工作了。另一种选择是将 cvs 配置放在开发人员 url 中,也许这样就可以了。
you have to put a dummy username in the url and it's gona work. an other option is to put the cvs configuration in the developer url, maybe it will work then.