如何将 CVS 与 maven-release-plugin 一起使用?

发布于 2024-10-11 07:26:05 字数 1589 浏览 4 评论 0原文

我很难让 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

帥小哥 2024-10-18 07:26:06

我正在使用 CVS 的发布插件。

这是我的版本:

  • cvs 1.12.13-MirDebian-9
  • Apache Maven 2.2.1 (rdebian-8)
  • Java 版本:1.7.0_25

这是我的 scm 元素:

  <scm>
            <connection>scm:cvs:ext:@cvshostname:/path/to/cvsroot/:projectname</connection>
  </scm>

我同时调用 release:prepare 和 <代码>release:执行与-Dusername=用户名

mvnrelease:执行-Dusername=用户名

I'm using the release plugin with CVS.

Here are my versions:

  • cvs 1.12.13-MirDebian-9
  • Apache Maven 2.2.1 (rdebian-8)
  • Java version: 1.7.0_25

Here's my scm element:

  <scm>
            <connection>scm:cvs:ext:@cvshostname:/path/to/cvsroot/:projectname</connection>
  </scm>

And I call both release:prepare and release:perform with -Dusername=username:

mvn release:perform -Dusername=username

一个人的旅程 2024-10-18 07:26:05

你必须在网址中输入一个虚拟用户名,然后它就可以工作了。另一种选择是将 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文