Class SynergyTaskManager
java.lang.Object
org.apache.maven.scm.provider.synergy.util.SynergyTaskManager
In some Synergy versions (ie. 6.5) closing a session results in de-selecting
the current (default) task. Therefore, the maven release-plugin fails, as the
Synergy commands, as implemented in the Synergy-SCM-Provider, always close
their session after being executed.
This manager circumvents this problem by storing the last created task which causes all check outs to be associated with it. Then, when this task gets checked in, all associated files get checked in as well.
This manager circumvents this problem by storing the last created task which causes all check outs to be associated with it. Then, when this task gets checked in, all associated files get checked in as well.
- Since:
- 1.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The number of the current Synergy-Task.private short
The state of the current Synergy-Task.private static final SynergyTaskManager
singleton instance.private static final short
The current Synergy-Task is completed.private static final short
The current Synergy-Task is created but not yet completed.private static final short
No Synergy-Task was created yet. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkinDefaultTask
(ScmLogger logger, String comment, String ccmAddr) Check in (that is: complete) the default task.int
createTask
(ScmLogger logger, String synopsis, String release, boolean defaultTask, String ccmAddr) If necessary create a new task.static SynergyTaskManager
-
Field Details
-
TASK_STATE_NONE
private static final short TASK_STATE_NONENo Synergy-Task was created yet.- See Also:
-
TASK_STATE_CREATED
private static final short TASK_STATE_CREATEDThe current Synergy-Task is created but not yet completed.- See Also:
-
TASK_STATE_COMPLETED
private static final short TASK_STATE_COMPLETEDThe current Synergy-Task is completed.- See Also:
-
INSTANCE
singleton instance. -
currentTaskNumber
private int currentTaskNumberThe number of the current Synergy-Task. -
currentTaskState
private short currentTaskStateThe state of the current Synergy-Task.
-
-
Constructor Details
-
SynergyTaskManager
public SynergyTaskManager()
-
-
Method Details
-
getInstance
- Returns:
- singleton instance.
-
createTask
public int createTask(ScmLogger logger, String synopsis, String release, boolean defaultTask, String ccmAddr) throws ScmException If necessary create a new task. Otherwise return the current task.- Parameters:
logger
- a logger.synopsis
- short description of task.release
- release.defaultTask
- should this task become the default task?ccmAddr
- current Synergy session ID. Used to run in multi-session.- Returns:
- Task number
- Throws:
ScmException
-
checkinDefaultTask
public void checkinDefaultTask(ScmLogger logger, String comment, String ccmAddr) throws ScmException Check in (that is: complete) the default task. This is either the current task managed bySynergyTaskManager
or, if none is managed, the default task.
In case no task has yet been created bySynergyTaskManager
AND no default task is set, then this is an error.
However, if the task that was created bySynergyTaskManager
has already been checked in AND no default task is set, then it is assumed that all files that were checked out are already checked in because checking in a task checks in all files associated with it.- Parameters:
logger
- a logger.comment
- a comment for checkin.ccmAddr
- current Synergy session ID. Used to run in multi-session.- Throws:
ScmException
-