简体   繁体   English

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

[英]How to use CVS with the maven-release-plugin?

i'm having a hard time getting the maven-release-plugin to work with our CVS repository. 我很难让maven-release-plugin与我们的CVS存储库一起工作。 Hope I'm missing something obvious, or is noone using CVS/pserver and Maven2/3 anymore ? 希望我遗漏了一些明显的东西,或者再也没有人使用CVS / pserver和Maven2 / 3了?

The first problem is the scm URL: 第一个问题是scm URL:

The maven CVS provider states that a valid scm URL looks like this: maven CVS提供程序声明有效的scm URL如下所示:

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. 这应该是一个有效的cvs scm url。 For the release-plugin i'll set the username inside a local settings.xml directly in the relase plugins configuration. 对于release-plugin,我将直接在relase插件配置中将用户名设置在本地settings.xml中。 The release plugin works ok with that, but this leads to an error building the maven site: 发布插件可以正常工作,但这会导致构建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)

This seems to be a three year old bug in the scm plugin: http://jira.codehaus.org/browse/SCM-350 这似乎是scm插件中的一个三岁的bug: 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 添加用户名变量以满足网站插件也不起作用,因为这会触发maven-release-plugin中的另一个(4岁)错误: 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) 第二个问题是平面项目结构,maven发布插件似乎无法与它们一起使用CVS,似乎有一些SVN的修复,但这些更改完全打破了平坦的cvs结构(项目模块旁边的主pom模块)

So, the biggest question is, is anyone else using the maven-release-plugin with cvs ? 所以,最大的问题是,是否有其他人使用带有cvs的maven-release-plugin? 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 ...) ? 你是否使用平面项目结构(在eclipse中使用它更方便......)?

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. 另一个选择是将cvs配置放在开发人员网址中,也许它会起作用。

I'm using the release plugin with CVS. 我正在使用CVS的发布插件。

Here are my versions: 这是我的版本:

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

Here's my scm element: 这是我的scm元素:

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

And I call both release:prepare and release:perform with -Dusername=username : 我称之为release:preparerelease:perform使用-Dusername=username release:perform

mvn release:perform -Dusername=username

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM