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

Cannot release M2 project to tfs by m2release plugin - Access denied

      I have configured 2/3 maven project. Set TFS properly. command line tf works fine. I do the same steps as I would like to release m2 project stored in svn (It works fine btw). Error occured when pom.xml was going to be changed from snapshot to release. This is the point where error occures every time. Console output attached - consoleText_release.txt. If I make mvn release:prepare release:perform -DuseEditMode=true everything is fine. Works great. Jenkins never does checkout but makes always get.

          [JENKINS-12319] Cannot release M2 project to tfs by m2release plugin - Access denied

          James Nord added a comment -

          Sorry I don't fully understand what you have said.

          If I make mvn release:prepare release:perform -DuseEditMode=true everything is fine

          is this from the command line or with Jenkins?

          Jenkins never does checkout but makes always get.

          I don't understand what you mean by this.

          When the release fails - what are the NTFS security permissions on the pom.xml file? Does it have the "read only" file attribute?

          I'm not familiar with TFS but if the following contains your username and password I would suggest you change it "AC\papiez,Vy100ho500exit"

          James Nord added a comment - Sorry I don't fully understand what you have said. If I make mvn release:prepare release:perform -DuseEditMode=true everything is fine is this from the command line or with Jenkins? Jenkins never does checkout but makes always get. I don't understand what you mean by this. When the release fails - what are the NTFS security permissions on the pom.xml file? Does it have the "read only" file attribute? I'm not familiar with TFS but if the following contains your username and password I would suggest you change it "AC\papiez,Vy100ho500exit"

          Hello,

          my apologies I didn´t be clear.

          Command

          mvn release:prepare release:perform -DuseEditMode=true

          is run from windows command line.

          As far as I know TFS there are two possibilities how to get source code. The first is

          tf get

          which makes read-only copy from server to client (Your geuss is correct - NTFS attribute is set to read only because of $tf get). The second one is

          tf checkout

          which makes writable copy from server. So maven is able to edit pom.xml. Jenkins makes the first one. I think that Jenkins should make checkout rather than get source code.

          Feel free to ask if something is not clearly explained

          Password is changed. My falt

          Vitezslav Papiez added a comment - Hello, my apologies I didn´t be clear. Command mvn release:prepare release:perform -DuseEditMode=true is run from windows command line. As far as I know TFS there are two possibilities how to get source code. The first is tf get which makes read-only copy from server to client (Your geuss is correct - NTFS attribute is set to read only because of $tf get). The second one is tf checkout which makes writable copy from server. So maven is able to edit pom.xml. Jenkins makes the first one. I think that Jenkins should make checkout rather than get source code. Feel free to ask if something is not clearly explained Password is changed. My falt

          James Nord added a comment -

          in summary the tfs plugin is performing a get rather than checkout so editing the files fails.

          Assigning to TFS plugin.

          James Nord added a comment - in summary the tfs plugin is performing a get rather than checkout so editing the files fails. Assigning to TFS plugin.

          I should read more carefully other forums. I have added -DuseEditMode=true in jenkins release command and it works. No I have an other error which isn't associated with this issue.

          Vitezslav Papiez added a comment - I should read more carefully other forums. I have added -DuseEditMode=true in jenkins release command and it works. No I have an other error which isn't associated with this issue.

          mvn -DuseEditMode=true release:prepare release:perform

          Vitezslav Papiez added a comment - mvn -DuseEditMode=true release:prepare release:perform

            Unassigned Unassigned
            vitezslav_papiez Vitezslav Papiez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: