如何将 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 ...) ?
我正在使用 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