0

In our POM files we have the scm section where we define the url to our cvs repository, including a variable for the current system user from the environment settings.

<developerConnection>scm:cvs:pserver:${env.CVS_USER}@servercvs01:/path/to/cvs/project:module</developerConnection>

The problem now is, if I execute the maven goal release:prepare the variable will be interpolated with the current user (which is fine generally) but when the execution is over I end up with a POM file where not only the versionString is updated (which is fine too), but also the ${env.CVS_USER} variable stays replaced with the current user. If I now want to automatically checkin the changed POM file because of the changed version string, I suddenly checkin the absolute user info too, that doesn't make any sense for other users then.

So my question is, why the variable interpolation in maven doesn't work just on RUNTIME, but lets the POM file variable declarations unchanged, so that the only change would be the versionString in this usecase!

SingerOfTheFall
  • 29,228
  • 8
  • 68
  • 105
Hannes Kogler
  • 469
  • 6
  • 12
  • Simple solution: Not storing the user information in the url. Why do you need the user information being stored into the pom. The user can do a login via cvs login so no real need for this. – khmarbaise Sep 19 '12 at 19:29
  • 2
    I know for Subversion, the latest version of the release plugin allows a property `project.scm.id`. The value is an ID that corresponds to a `` ID in your `settings.xml` file. This is where the credentials can go. Since credentials are in `settings.xml` they don't break anyone else's builds. Not sure if this works for CVS though. – user944849 Sep 19 '12 at 20:07
  • 1
    I would assume it will work with CVS as well. – khmarbaise Sep 20 '12 at 07:09
  • really good question ! I was facing the same issue, and gave up to solve it ! – Jean-Rémy Revy Sep 20 '12 at 07:50
  • @khmarbaise the user information here is just an example. another variable would be the name of the module which definitely changes project-dependent and we have the same problem with it – Hannes Kogler Feb 18 '13 at 15:53

0 Answers0