Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-13734

CVS plugin crashes Maven release builds with the error "Cannot prepare the release because you have local modifications"

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • cvs-plugin
    • CentOS, Jenkins 1.463, CVS plugin 2.3, Jenkins Maven Release Plugin 0.9.1

      1. Install Jenkins Maven Release Plugin 0.9.1
      2. Make a new project and add the pom.xml file containing the following settings:

      ...
      <scm>
          <developerConnection>scm:cvs:pserver:CVS-ACCOUNT:PASSWORD@CVS-SERVER:/REPOSITORY:MODULE</developerConnection>
      </scm>
      ...
      <build>
      <plugins>
      <plugin>
          <groupId>maven</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.6.1</version>
      </plugin>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.2.2</version>
          <configuration>
             <useReleaseProfile>false</useReleaseProfile>
          </configuration>
      </plugin>
      </plugins>
      </build>
      ...
      <distributionManagement>
          <repository>
              <id>my-releases</id>
              <!-- specify any valid HTTP URL -->
              <url>ANY_RELEASES_REPOSITORY_URL</url>
          </repository>
      </distributionManagement>
      ...
      

      3. Import the project into your CVS server
      4. Create a new maven job and specify all the necessary CVS connection settings
      5. Open the job page and click the link "Perform Maven Release"

      Expected: the job compiles the project and publishes a newly created artefact

      Actual: the job is crushed with the error "Cannot prepare the release because you have local modifications" (see attachments for details)

      Important note: everything works properly if I use CVS plugin version 1.6

        1. config.xml
          4 kB
        2. log
          111 kB

          [JENKINS-13734] CVS plugin crashes Maven release builds with the error "Cannot prepare the release because you have local modifications"

          Sergey Skladchikov created issue -
          Sergey Skladchikov made changes -
          Description Original: 1. Install Jenkins Maven Release Plugin 0.9.1
          2. Make a new project and add the pom.xml file containing the following settings:

          {code:xml}
          ...
          <scm>
              <developerConnection>scm:cvs:pserver:CVS-ACCOUNT:PASSWORD@CVS-SERVER:/REPOSITORY:MODULE</developerConnection>
          </scm>
          ...
          <build>
          <plugins>
          <plugin>
              <groupId>maven</groupId>
              <artifactId>maven-scm-plugin</artifactId>
              <version>1.6.1</version>
          </plugin>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-release-plugin</artifactId>
              <version>2.2.2</version>
              <configuration>
                 <useReleaseProfile>false</useReleaseProfile>
              </configuration>
          </plugin>
          </plugins>
          </build>
          ...
          <distributionManagement>
              <repository>
                  <id>my-releases</id>
                  <!-- specify any valid HTTP URL -->
                  <url>ANY_RELEASES_REPOSITORY_URL</url>
              </repository>
          </distributionManagement>
          ...
          {code:xml}

          3. Import the project into your CVS server
          4. Create a new maven job and specify all the necessary CVS connection settings
          5. Open the job page and click the link "Perform Maven Release"

          Expected: the job compiles the project and publishes a newly created artefact

          Actual: the job is crushed with the error "Cannot prepare the release because you have local modifications" (see attachments for details)

          Important note: everything works properly if I use CVS plugin version 1.6
          New: 1. Install Jenkins Maven Release Plugin 0.9.1
          2. Make a new project and add the pom.xml file containing the following settings:

          {code:xml}
          ...
          <scm>
              <developerConnection>scm:cvs:pserver:CVS-ACCOUNT:PASSWORD@CVS-SERVER:/REPOSITORY:MODULE</developerConnection>
          </scm>
          ...
          <build>
          <plugins>
          <plugin>
              <groupId>maven</groupId>
              <artifactId>maven-scm-plugin</artifactId>
              <version>1.6.1</version>
          </plugin>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-release-plugin</artifactId>
              <version>2.2.2</version>
              <configuration>
                 <useReleaseProfile>false</useReleaseProfile>
              </configuration>
          </plugin>
          </plugins>
          </build>
          ...
          <distributionManagement>
              <repository>
                  <id>my-releases</id>
                  <!-- specify any valid HTTP URL -->
                  <url>ANY_RELEASES_REPOSITORY_URL</url>
              </repository>
          </distributionManagement>
          ...
          {code}

          3. Import the project into your CVS server
          4. Create a new maven job and specify all the necessary CVS connection settings
          5. Open the job page and click the link "Perform Maven Release"

          Expected: the job compiles the project and publishes a newly created artefact

          Actual: the job is crushed with the error "Cannot prepare the release because you have local modifications" (see attachments for details)

          Important note: everything works properly if I use CVS plugin version 1.6

          Can we get some details on your job config: are you building on a branch/tag/head, and are you using 'update' or 'checkout'? If possible, attach your config.xml for your job (obscure any sensitive values) so I can try and replicate your setup.

          Michael Clarke added a comment - Can we get some details on your job config: are you building on a branch/tag/head, and are you using 'update' or 'checkout'? If possible, attach your config.xml for your job (obscure any sensitive values) so I can try and replicate your setup.

          1. I'm building on HEAD revision.
          2. Update.
          3. Unfortunately I had to rollback the plugin and therefore lost my buggy job. But my current configuration (with the rolled back CVS plugin) is rather similar (attached).

          Sergey Skladchikov added a comment - 1. I'm building on HEAD revision. 2. Update. 3. Unfortunately I had to rollback the plugin and therefore lost my buggy job. But my current configuration (with the rolled back CVS plugin) is rather similar (attached).
          Sergey Skladchikov made changes -
          Attachment New: config.xml [ 21930 ]

          Code changed in jenkins
          User: mc1arke
          Path:
          src/main/java/hudson/scm/CVSSCM.java
          http://jenkins-ci.org/commit/cvs-plugin/b0653878a7316dc676e25894b10235590e7fe327
          Log:
          [FIXED JENKINS-13734] Remove sticky date tag properly
          Prevent CVS thinking we're on an old date and therefore aren't up-to-date

          Compare: https://github.com/jenkinsci/cvs-plugin/compare/de148b3...b065387

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: mc1arke Path: src/main/java/hudson/scm/CVSSCM.java http://jenkins-ci.org/commit/cvs-plugin/b0653878a7316dc676e25894b10235590e7fe327 Log: [FIXED JENKINS-13734] Remove sticky date tag properly Prevent CVS thinking we're on an old date and therefore aren't up-to-date Compare: https://github.com/jenkinsci/cvs-plugin/compare/de148b3...b065387
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Michael Clarke made changes -
          Assignee New: Michael Clarke [ mc1arke ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 144201 ] New: JNJira + In-Review [ 190964 ]

            mc1arke Michael Clarke
            sskladchikov Sergey Skladchikov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: