[
https://issues.apache.org/jira/browse/SCM-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16741987#comment-16741987
]
Chris Graham edited comment on SCM-889 at 1/14/19 12:10 PM:
------------------------------------------------------------
Here is the output of a release:prepare
{code}
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "scm create changeset --username Deb --password
***** "[maven-release-plugin] prepare release GPDB-1.0.56""
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm changeset associate --username Deb
--password ***** 2397 62"
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm checkin --username Deb --password *****
C:\Workspaces\Apache\GPDB\pom.xml
C:\Workspaces\Apache\GPDB\GPDBResources\pom.xml C:\Wor
kspaces\Apache\GPDB\GPDBWeb\pom.xml C:\Workspaces\Apache\GPDB\GPDBEAR\pom.xml"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm deliver --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --source GPDBWorkspace
--target GPDBStream --over
write-uncommitted"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Tagging release with the label GPDB-1.0.56...
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm create snapshot --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --name GPDB-1.0.56
--description "[maven-release-plugin] copy for tag GPDB-1.0.56" GPDBWorkspace"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm create workspace --repository-uri
https://rtc:9444/jazz --username Deb --password ***** GPDB-1.0.56 --snapshot
GPDB-1.0.56"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm deliver --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --source GPDB-1.0.56
--target GPDBStream"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm snapshot promote --repository-uri
https://rtc:9444/jazz --username Deb --password ***** GPDBStream GPDB-1.0.56"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Transforming 'GPDB - J2EE Multi Module Project'...
[INFO] Transforming 'GPDB - Resources Project'...
[INFO] Transforming 'GPDB - WAR Project'...
[INFO] Updating GPDBResources to 1.0.57-SNAPSHOT
[INFO] Transforming 'GPDB - EAR Project'...
[INFO] Updating GPDBWeb to 1.0.57-SNAPSHOT
[INFO] Not removing release POMs
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "scm create changeset --username Deb --password
***** "[maven-release-plugin] prepare for next development iteration""
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm changeset associate --username Deb
--password ***** 2401 62"
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm checkin --username Deb --password *****
C:\Workspaces\Apache\GPDB\pom.xml
C:\Workspaces\Apache\GPDB\GPDBResources\pom.xml
C:\Workspaces\Apache\GPDB\GPDBWeb\pom.xml
C:\Workspaces\Apache\GPDB\GPDBEAR\pom.xml"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm deliver --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --source GPDBWorkspace
--target GPDBStream --over
write-uncommitted"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Release preparation complete.
{code}
and the checkout (or load in jazz SCM terms) is:
{code}
[INFO] --- maven-release-plugin:3.0.0-SNAPSHOT:perform (default-cli) @ GPDB ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: cmd.exe /X /C "scm load --force --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --dir C:\tmp\maven
GPDB-1.0.56"
[INFO] Working directory: C:\tmp\maven
[INFO] Invoking perform goals in directory C:\tmp\maven\GPDB
[INFO] Executing goals 'deploy'...
{code}
The reason the original code used getRepositoryWorkspace() which is parsed from
the pom before anything else happens, over the change to getWorkspace(), which
is parsed from the output of a {code}scm status{code} command, is that the
status command may not have been called.
There is an (from memory, I will have to cross check all of the calls across
all commands) an implicit assumption that the repository workspace matches the
value in the pom.
What the reporter here appears to have done, is switched/changed workspaces -
without reflecting those changes in the pom - which is there the inconsistency
has come from.
The deliver command might also fail as a result of this.
In short, I don't think it's a valid error, and the user's workflow is wrong.
So I need them to comment on how it is being used, and why they think the
original implementation is wrong.
It is the last value to the create snapshot command in question:
{code}
scm create snapshot --repository-uri https://rtc:9444/jazz --username Deb
--password ***** --name GPDB-1.0.56 --description "[maven-release-plugin] copy
for tag GPDB-1.0.56" GPDBWorkspace
{code}
If that is different to the value in the pom, the source parameter to the
deliver command:
{code}
scm deliver --repository-uri https://rtc:9444/jazz --username Deb --password
***** --source GPDBWorkspace --target GPDBStream --overwrite-uncommitted
{code}
also needs to be the same value as above.
was (Author: chrisgwarp):
Here is the output of a release:prepare
{code}
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "scm create changeset --username Deb --password
***** "[maven-release-plugin] prepare release GPDB-1.0.56""
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm changeset associate --username Deb
--password ***** 2397 62"
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm checkin --username Deb --password *****
C:\Workspaces\Apache\GPDB\pom.xml
C:\Workspaces\Apache\GPDB\GPDBResources\pom.xml C:\Wor
kspaces\Apache\GPDB\GPDBWeb\pom.xml C:\Workspaces\Apache\GPDB\GPDBEAR\pom.xml"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm deliver --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --source GPDBWorkspace
--target GPDBStream --over
write-uncommitted"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Tagging release with the label GPDB-1.0.56...
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm create snapshot --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --name GPDB-1.0.56
--description "[maven-
release-plugin] copy for tag GPDB-1.0.56" GPDBWorkspace"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm create workspace --repository-uri
https://rtc:9444/jazz --username Deb --password ***** GPDB-1.0.56 --snapshot
GPDB-1.0.56"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm deliver --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --source GPDB-1.0.56
--target GPDBStream"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm snapshot promote --repository-uri
https://rtc:9444/jazz --username Deb --password ***** GPDBStream GPDB-1.0.56"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Transforming 'GPDB - J2EE Multi Module Project'...
[INFO] Transforming 'GPDB - Resources Project'...
[INFO] Transforming 'GPDB - WAR Project'...
[INFO] Updating GPDBResources to 1.0.57-SNAPSHOT
[INFO] Transforming 'GPDB - EAR Project'...
[INFO] Updating GPDBWeb to 1.0.57-SNAPSHOT
[INFO] Not removing release POMs
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "scm create changeset --username Deb --password
***** "[maven-release-plugin] prepare for next development iteration""
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm changeset associate --username Deb
--password ***** 2401 62"
[INFO] Executing: cmd.exe /X /C "scm status --username Deb --password *****
--wide"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm checkin --username Deb --password *****
C:\Workspaces\Apache\GPDB\pom.xml
C:\Workspaces\Apache\GPDB\GPDBResources\pom.xml C:\Wor
kspaces\Apache\GPDB\GPDBWeb\pom.xml C:\Workspaces\Apache\GPDB\GPDBEAR\pom.xml"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Executing: cmd.exe /X /C "scm deliver --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --source GPDBWorkspace
--target GPDBStream --over
write-uncommitted"
[INFO] Working directory: C:\Workspaces\Apache\GPDB
[INFO] Release preparation complete.
{code}
and the checkout (or load in jazz SCM terms) is:
{code}
[INFO] --- maven-release-plugin:3.0.0-SNAPSHOT:perform (default-cli) @ GPDB ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: cmd.exe /X /C "scm load --force --repository-uri
https://rtc:9444/jazz --username Deb --password ***** --dir C:\tmp\maven
GPDB-1.0.56"
[INFO] Working directory: C:\tmp\maven
[INFO] Invoking perform goals in directory C:\tmp\maven\GPDB
[INFO] Executing goals 'deploy'...
{code}
The reason the original code used getRepositoryWorkspace() which is parsed from
the pom before anything else happens, over the change to getWorkspace(), which
is parsed from the output of a {code}scm status{code} command, is that the
status command may not have been called.
There is an (from memory, I will have to cross check all of the calls across
all commands) an implicit assumption that the repository workspace matches the
value in the pom.
What the reporter here appears to have done, is switched/changed workspaces -
without reflecting those changes in the pom - which is there the inconsistency
has come from.
The deliver command might also fail as a result of this.
In short, I don't think it's a valid error, and the user's workflow is wrong.
So I need them to comment on how it is being used, and why they think the
original implementation is wrong.
> Jazz tag command creates snapshot in wrong workspace
> ----------------------------------------------------
>
> Key: SCM-889
> URL: https://issues.apache.org/jira/browse/SCM-889
> Project: Maven SCM
> Issue Type: Bug
> Components: maven-scm-provider-jazz
> Affects Versions: 1.9.5, 1.10.0
> Reporter: Sérgio Ozaki
> Assignee: Chris Graham
> Priority: Major
> Fix For: 1.11.1
>
>
> Jazz provider tag command uses the jazz workspace set int the pom.xml scm
> tag. When in other jazz workspace, the snapshot is not created based on the
> current work.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)