You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/03/12 12:48:15 UTC
[maven-scm] branch parent-39 updated (3028d6840 -> 219811b09)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch parent-39
in repository https://gitbox.apache.org/repos/asf/maven-scm.git
discard 3028d6840 [SCM-1005] Upgrade Parent to 39
new 219811b09 [SCM-1005] Upgrade Parent to 39
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (3028d6840)
\
N -- N -- N refs/heads/parent-39 (219811b09)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[maven-scm] 01/01: [SCM-1005] Upgrade Parent to 39
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch parent-39
in repository https://gitbox.apache.org/repos/asf/maven-scm.git
commit 219811b09b97d1e4ad9777fb017a6599e05aa3b6
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Mar 12 13:24:21 2023 +0100
[SCM-1005] Upgrade Parent to 39
This closes #165
---
maven-scm-api/pom.xml | 2 -
.../org/apache/maven/scm/AbstractScmVersion.java | 26 +-
.../main/java/org/apache/maven/scm/ChangeFile.java | 78 +-
.../main/java/org/apache/maven/scm/ChangeSet.java | 462 +++++------
.../org/apache/maven/scm/CommandParameter.java | 72 +-
.../org/apache/maven/scm/CommandParameters.java | 188 ++---
.../maven/scm/NoSuchCommandScmException.java | 17 +-
.../main/java/org/apache/maven/scm/ScmBranch.java | 17 +-
.../org/apache/maven/scm/ScmBranchParameters.java | 42 +-
.../java/org/apache/maven/scm/ScmException.java | 19 +-
.../main/java/org/apache/maven/scm/ScmFile.java | 39 +-
.../main/java/org/apache/maven/scm/ScmFileSet.java | 80 +-
.../java/org/apache/maven/scm/ScmFileStatus.java | 59 +-
.../main/java/org/apache/maven/scm/ScmRequest.java | 34 +-
.../main/java/org/apache/maven/scm/ScmResult.java | 53 +-
.../java/org/apache/maven/scm/ScmRevision.java | 17 +-
.../src/main/java/org/apache/maven/scm/ScmTag.java | 17 +-
.../org/apache/maven/scm/ScmTagParameters.java | 48 +-
.../org/apache/maven/scm/ScmUntagParameters.java | 27 +-
.../main/java/org/apache/maven/scm/ScmVersion.java | 10 +-
.../apache/maven/scm/command/AbstractCommand.java | 42 +-
.../java/org/apache/maven/scm/command/Command.java | 12 +-
.../maven/scm/command/add/AbstractAddCommand.java | 27 +-
.../apache/maven/scm/command/add/AddScmResult.java | 41 +-
.../scm/command/blame/AbstractBlameCommand.java | 27 +-
.../apache/maven/scm/command/blame/BlameLine.java | 61 +-
.../maven/scm/command/blame/BlameScmRequest.java | 43 +-
.../maven/scm/command/blame/BlameScmResult.java | 27 +-
.../scm/command/branch/AbstractBranchCommand.java | 54 +-
.../maven/scm/command/branch/BranchScmResult.java | 27 +-
.../changelog/AbstractChangeLogCommand.java | 122 ++-
.../scm/command/changelog/ChangeLogCommand.java | 12 +-
.../scm/command/changelog/ChangeLogScmRequest.java | 143 ++--
.../scm/command/changelog/ChangeLogScmResult.java | 27 +-
.../maven/scm/command/changelog/ChangeLogSet.java | 102 +--
.../command/checkin/AbstractCheckInCommand.java | 27 +-
.../scm/command/checkin/CheckInScmResult.java | 46 +-
.../command/checkout/AbstractCheckOutCommand.java | 42 +-
.../scm/command/checkout/CheckOutScmResult.java | 61 +-
.../scm/command/diff/AbstractDiffCommand.java | 27 +-
.../maven/scm/command/diff/DiffScmResult.java | 37 +-
.../scm/command/edit/AbstractEditCommand.java | 21 +-
.../maven/scm/command/edit/EditScmResult.java | 28 +-
.../scm/command/export/AbstractExportCommand.java | 27 +-
.../maven/scm/command/export/ExportScmResult.java | 22 +-
.../export/ExportScmResultWithRevision.java | 24 +-
.../command/fileinfo/AbstractFileInfoCommand.java | 28 +-
.../apache/maven/scm/command/info/InfoItem.java | 68 +-
.../maven/scm/command/info/InfoScmResult.java | 38 +-
.../scm/command/list/AbstractListCommand.java | 32 +-
.../maven/scm/command/list/ListScmResult.java | 30 +-
.../scm/command/lock/AbstractLockCommand.java | 28 +-
.../scm/command/login/AbstractLoginCommand.java | 22 +-
.../maven/scm/command/login/LoginScmResult.java | 15 +-
.../scm/command/mkdir/AbstractMkdirCommand.java | 36 +-
.../maven/scm/command/mkdir/MkdirScmResult.java | 45 +-
.../remoteinfo/AbstractRemoteInfoCommand.java | 20 +-
.../command/remoteinfo/RemoteInfoScmResult.java | 44 +-
.../scm/command/remove/AbstractRemoveCommand.java | 24 +-
.../maven/scm/command/remove/RemoveScmResult.java | 27 +-
.../scm/command/status/AbstractStatusCommand.java | 21 +-
.../maven/scm/command/status/StatusScmResult.java | 45 +-
.../maven/scm/command/tag/AbstractTagCommand.java | 48 +-
.../apache/maven/scm/command/tag/TagScmResult.java | 29 +-
.../scm/command/unedit/AbstractUnEditCommand.java | 21 +-
.../maven/scm/command/unedit/UnEditScmResult.java | 28 +-
.../scm/command/unlock/AbstractUnlockCommand.java | 25 +-
.../scm/command/untag/AbstractUntagCommand.java | 30 +-
.../maven/scm/command/untag/UntagScmResult.java | 24 +-
.../scm/command/update/AbstractUpdateCommand.java | 77 +-
.../maven/scm/command/update/UpdateScmResult.java | 43 +-
.../update/UpdateScmResultWithRevision.java | 31 +-
.../maven/scm/manager/AbstractScmManager.java | 476 +++++------
.../apache/maven/scm/manager/BasicScmManager.java | 10 +-
.../scm/manager/NoSuchScmProviderException.java | 19 +-
.../org/apache/maven/scm/manager/ScmManager.java | 199 +++--
.../maven/scm/provider/AbstractScmProvider.java | 885 +++++++++------------
.../org/apache/maven/scm/provider/ScmProvider.java | 292 ++++---
.../maven/scm/provider/ScmProviderRepository.java | 51 +-
.../provider/ScmProviderRepositoryWithHost.java | 33 +-
.../org/apache/maven/scm/provider/ScmUrlUtils.java | 87 +-
.../apache/maven/scm/repository/ScmRepository.java | 21 +-
.../scm/repository/ScmRepositoryException.java | 31 +-
.../scm/repository/UnknownRepositoryStructure.java | 9 +-
.../apache/maven/scm/util/AbstractConsumer.java | 86 +-
.../org/apache/maven/scm/util/ConsumerUtils.java | 29 +-
.../org/apache/maven/scm/util/FilenameUtils.java | 26 +-
.../maven/scm/util/ThreadSafeDateFormat.java | 48 +-
.../java/org/apache/maven/scm/ChangeFileTest.java | 41 +-
.../java/org/apache/maven/scm/ChangeSetTest.java | 159 ++--
.../java/org/apache/maven/scm/ScmFileSetTest.java | 81 +-
.../java/org/apache/maven/scm/ScmResultTest.java | 33 +-
.../apache/maven/scm/manager/ScmManagerTest.java | 36 +-
.../apache/maven/scm/provider/ScmUrlUtilsTest.java | 50 +-
.../apache/maven/scm/util/FilenameUtilsTest.java | 25 +-
maven-scm-client/pom.xml | 4 +-
.../apache/maven/scm/client/cli/MavenScmCli.java | 277 +++----
.../maven-scm-manager-plexus/pom.xml | 2 -
.../scm/manager/plexus/DefaultScmManager.java | 25 +-
maven-scm-managers/pom.xml | 6 +-
maven-scm-plugin/pom.xml | 82 +-
.../apache/maven/scm/plugin/AbstractScmMojo.java | 353 ++++----
.../java/org/apache/maven/scm/plugin/AddMojo.java | 34 +-
.../org/apache/maven/scm/plugin/BootstrapMojo.java | 142 ++--
.../org/apache/maven/scm/plugin/BranchMojo.java | 62 +-
.../org/apache/maven/scm/plugin/ChangeLogMojo.java | 153 ++--
.../scm/plugin/CheckLocalModificationsMojo.java | 54 +-
.../org/apache/maven/scm/plugin/CheckinMojo.java | 44 +-
.../org/apache/maven/scm/plugin/CheckoutMojo.java | 102 +--
.../java/org/apache/maven/scm/plugin/DiffMojo.java | 67 +-
.../java/org/apache/maven/scm/plugin/EditMojo.java | 32 +-
.../org/apache/maven/scm/plugin/ExportMojo.java | 86 +-
.../java/org/apache/maven/scm/plugin/ListMojo.java | 46 +-
.../org/apache/maven/scm/plugin/RemoveMojo.java | 34 +-
.../org/apache/maven/scm/plugin/StatusMojo.java | 57 +-
.../java/org/apache/maven/scm/plugin/TagMojo.java | 107 ++-
.../org/apache/maven/scm/plugin/UnEditMojo.java | 32 +-
.../org/apache/maven/scm/plugin/UntagMojo.java | 43 +-
.../org/apache/maven/scm/plugin/UpdateMojo.java | 58 +-
.../maven/scm/plugin/UpdateSubprojectsMojo.java | 49 +-
.../org/apache/maven/scm/plugin/ValidateMojo.java | 89 +--
.../maven/scm/plugin/ValidateRecursively.java | 13 +-
.../apache/maven/scm/plugin/BootstrapMojoTest.java | 68 +-
.../apache/maven/scm/plugin/BranchMojoTest.java | 96 +--
.../apache/maven/scm/plugin/ChangeLogMojoTest.java | 136 ++--
.../apache/maven/scm/plugin/CheckoutMojoTest.java | 168 ++--
.../apache/maven/scm/plugin/ExportMojoTest.java | 108 ++-
.../apache/maven/scm/plugin/StatusMojoTest.java | 27 +-
.../org/apache/maven/scm/plugin/TagMojoTest.java | 108 ++-
.../org/apache/maven/scm/plugin/UntagMojoTest.java | 96 +--
.../apache/maven/scm/plugin/UpdateMojoTest.java | 61 +-
.../apache/maven/scm/plugin/ValidateMojoTest.java | 44 +-
maven-scm-providers/maven-scm-provider-hg/pom.xml | 10 +-
.../org/apache/maven/scm/provider/hg/HgConfig.java | 114 +--
.../maven/scm/provider/hg/HgScmProvider.java | 211 ++---
.../org/apache/maven/scm/provider/hg/HgUtils.java | 274 +++----
.../provider/hg/command/HgCommandConstants.java | 16 +-
.../maven/scm/provider/hg/command/HgConsumer.java | 143 ++--
.../scm/provider/hg/command/add/HgAddCommand.java | 38 +-
.../scm/provider/hg/command/add/HgAddConsumer.java | 54 +-
.../provider/hg/command/blame/HgBlameCommand.java | 28 +-
.../provider/hg/command/blame/HgBlameConsumer.java | 45 +-
.../hg/command/branch/HgBranchCommand.java | 117 ++-
.../hg/command/changelog/HgChangeLogCommand.java | 144 ++--
.../hg/command/changelog/HgChangeLogConsumer.java | 103 +--
.../hg/command/checkin/HgCheckInCommand.java | 77 +-
.../hg/command/checkout/HgCheckOutCommand.java | 82 +-
.../hg/command/checkout/HgCheckOutConsumer.java | 33 +-
.../provider/hg/command/diff/HgDiffCommand.java | 39 +-
.../provider/hg/command/diff/HgDiffConsumer.java | 98 +--
.../provider/hg/command/info/HgInfoCommand.java | 23 +-
.../provider/hg/command/info/HgInfoConsumer.java | 23 +-
.../provider/hg/command/inventory/HgChangeSet.java | 19 +-
.../hg/command/inventory/HgListCommand.java | 42 +-
.../hg/command/inventory/HgListConsumer.java | 27 +-
.../hg/command/inventory/HgOutgoingConsumer.java | 28 +-
.../hg/command/remove/HgRemoveCommand.java | 29 +-
.../hg/command/remove/HgRemoveConsumer.java | 56 +-
.../hg/command/status/HgStatusCommand.java | 25 +-
.../hg/command/status/HgStatusConsumer.java | 60 +-
.../scm/provider/hg/command/tag/HgTagCommand.java | 120 ++-
.../scm/provider/hg/command/tag/HgTagConsumer.java | 13 +-
.../hg/command/update/HgUpdateCommand.java | 90 +--
.../hg/repository/HgScmProviderRepository.java | 218 ++---
.../apache/maven/scm/provider/hg/HgRepoUtils.java | 96 +--
.../apache/maven/scm/provider/hg/HgUtilsTest.java | 49 +-
.../hg/command/blame/HgBlameCommandTckTest.java | 33 +-
.../changelog/HgChangeLogCommandTckTest.java | 24 +-
.../command/checkin/HgCheckInCommandTckTest.java | 43 +-
.../command/checkout/HgCheckOutCommandTckTest.java | 20 +-
.../hg/command/diff/HgDiffCommandTckTest.java | 112 ++-
.../hg/command/status/HgStatusCommandTckTest.java | 20 +-
.../hg/command/tag/HgTagCommandTckTest.java | 20 +-
.../hg/command/update/HgUpdateCommandTckTest.java | 20 +-
.../hg/repository/HgScmProviderRepositoryTest.java | 164 ++--
.../maven-scm-provider-local/pom.xml | 14 +-
.../maven/scm/provider/local/LocalScmProvider.java | 152 ++--
.../scm/provider/local/command/LocalCommand.java | 10 +-
.../local/command/add/LocalAddCommand.java | 35 +-
.../command/changelog/LocalChangeLogCommand.java | 113 ++-
.../local/command/checkin/LocalCheckInCommand.java | 106 +--
.../command/checkout/LocalCheckOutCommand.java | 101 +--
.../command/checkout/LocalCheckOutScmResult.java | 14 +-
.../local/command/list/LocalListCommand.java | 101 +--
.../local/command/list/LocalListScmResult.java | 14 +-
.../local/command/mkdir/LocalMkdirCommand.java | 64 +-
.../local/command/status/LocalStatusCommand.java | 17 +-
.../local/command/tag/LocalTagCommand.java | 29 +-
.../local/command/update/LocalUpdateCommand.java | 148 ++--
.../local/command/update/LocalUpdateScmResult.java | 14 +-
.../local/metadata/LocalScmMetadataUtils.java | 91 +--
.../repository/LocalScmProviderRepository.java | 32 +-
.../scm/provider/local/LocalScmProviderTest.java | 20 +-
.../checkin/LocalCheckInCommandTckTest.java | 37 +-
.../checkout/LocalCheckOutCommandTckTest.java | 66 +-
.../command/list/LocalListCommandTckTest.java | 33 +-
.../command/mkdir/LocalMkdirCommandTckTest.java | 67 +-
.../command/update/LocalUpdateCommandTckTest.java | 112 ++-
.../local/repository/LocalRepositoryTest.java | 112 +--
.../maven-scm-provider-git-commons/pom.xml | 62 +-
.../scm/provider/git/AbstractGitScmProvider.java | 216 ++---
.../maven/scm/provider/git/GitCommandUtils.java | 42 +-
.../scm/provider/git/GitConfigFileReader.java | 102 +--
.../maven/scm/provider/git/command/GitCommand.java | 10 +-
.../provider/git/command/diff/GitDiffConsumer.java | 120 ++-
.../scm/provider/git/command/info/GitInfoItem.java | 9 +-
.../git/command/info/GitInfoScmResult.java | 36 +-
.../git/command/update/GitUpdateScmResult.java | 14 +-
.../git/repository/GitScmProviderRepository.java | 346 ++++----
.../scm/provider/git/repository/RepositoryUrl.java | 63 +-
.../maven/scm/provider/git/util/GitUtil.java | 58 +-
.../maven/scm/provider/git/TestGitScmProvider.java | 64 +-
.../git/command/diff/GitDiffConsumerTest.java | 141 ++--
.../repository/GitScmProviderRepositoryTest.java | 608 ++++++++------
.../maven-scm-provider-gitexe/pom.xml | 2 -
.../scm/provider/git/gitexe/GitExeScmProvider.java | 89 +--
.../command/AbstractFileCheckingConsumer.java | 66 +-
.../git/gitexe/command/AnonymousCommandLine.java | 29 +-
.../git/gitexe/command/GitCommandLineUtils.java | 202 ++---
.../git/gitexe/command/add/GitAddCommand.java | 119 ++-
.../git/gitexe/command/blame/GitBlameCommand.java | 64 +-
.../git/gitexe/command/blame/GitBlameConsumer.java | 89 +--
.../gitexe/command/branch/GitBranchCommand.java | 110 ++-
.../command/branch/GitCurrentBranchConsumer.java | 27 +-
.../command/changelog/GitChangeLogCommand.java | 329 ++++----
.../command/changelog/GitChangeLogConsumer.java | 283 +++----
.../gitexe/command/checkin/GitCheckInCommand.java | 224 +++---
.../command/checkout/GitCheckOutCommand.java | 208 +++--
.../git/gitexe/command/diff/GitDiffCommand.java | 82 +-
.../gitexe/command/diff/GitDiffRawConsumer.java | 51 +-
.../git/gitexe/command/info/GitInfoCommand.java | 64 +-
.../git/gitexe/command/info/GitInfoConsumer.java | 43 +-
.../git/gitexe/command/list/GitListCommand.java | 14 +-
.../git/gitexe/command/list/GitListConsumer.java | 28 +-
.../command/remoteinfo/GitRemoteInfoCommand.java | 41 +-
.../command/remoteinfo/GitRemoteInfoConsumer.java | 58 +-
.../gitexe/command/remove/GitRemoveCommand.java | 76 +-
.../gitexe/command/remove/GitRemoveConsumer.java | 57 +-
.../gitexe/command/status/GitStatusCommand.java | 69 +-
.../gitexe/command/status/GitStatusConsumer.java | 276 +++----
.../git/gitexe/command/tag/GitTagCommand.java | 147 ++--
.../git/gitexe/command/untag/GitUntagCommand.java | 70 +-
.../update/GitLatestRevisionCommandConsumer.java | 43 +-
.../gitexe/command/update/GitUpdateCommand.java | 105 ++-
.../gitexe/command/GitCommandLineUtilsTest.java | 109 ++-
.../gitexe/command/add/GitExeAddCommandTest.java | 64 +-
.../gitexe/command/blame/GitBlameConsumerTest.java | 174 ++--
.../command/blame/GitExeBlameCommandTckTest.java | 37 +-
.../command/branch/GitExeBranchCommandTckTest.java | 19 +-
.../command/changelog/GitChangeLogCommandTest.java | 252 +++---
.../changelog/GitChangeLogConsumerTest.java | 232 +++---
.../changelog/GitExeChangeLogCommandTckTest.java | 18 +-
.../checkin/GitCheckInCommandNoBranchTest.java | 81 +-
.../command/checkin/GitCheckInCommandTest.java | 156 ++--
.../checkin/GitExeCheckInCommandTckTest.java | 18 +-
.../command/checkout/GitCheckOutCommandTest.java | 36 +-
.../GitExeCheckOutCommandNoBranchTest.java | 55 +-
.../checkout/GitExeCheckOutCommandTckTest.java | 12 +-
.../checkout/GitExeSshCheckOutCommandTckTest.java | 40 +-
.../command/diff/GitDiffRawConsumerTest.java | 59 +-
.../command/diff/GitExeDiffCommandTckTest.java | 18 +-
.../gitexe/command/info/GitInfoCommandTest.java | 134 ++--
.../remoteinfo/GitExeRemoteInfoCommandTckTest.java | 31 +-
.../remoteinfo/GitRemoteInfoConsumerTest.java | 35 +-
.../command/remove/GitExeRemoveCommandTckTest.java | 28 +-
.../command/remove/GitRemoveCommandTest.java | 63 +-
.../command/remove/GitRemoveConsumerTest.java | 73 +-
.../command/status/GitExeStatusCommandTckTest.java | 18 +-
.../command/status/GitStatusConsumerTest.java | 681 ++++++++--------
.../command/tag/GitExeTagCommandTckTest.java | 18 +-
.../git/gitexe/command/tag/GitTagCommandTest.java | 63 +-
.../command/untag/GitExeUntagCommandTckTest.java | 18 +-
.../command/update/GitExeUpdateCommandTckTest.java | 18 +-
.../GitLatestRevisionCommandConsumerTest.java | 64 +-
.../command/update/GitUpdateCommandTest.java | 67 +-
.../maven-scm-provider-gittest/pom.xml | 4 +-
.../maven/scm/provider/git/GitScmTestUtils.java | 116 +--
.../git/command/blame/GitBlameCommandTckTest.java | 33 +-
.../command/branch/GitBranchCommandTckTest.java | 33 +-
.../changelog/GitChangeLogCommandTckTest.java | 252 +++---
.../command/checkin/GitCheckInCommandTckTest.java | 33 +-
.../checkout/GitCheckOutCommandTckTest.java | 23 +-
.../checkout/GitSshCheckOutCommandTckTest.java | 111 +--
.../git/command/diff/GitDiffCommandTckTest.java | 15 +-
.../git/command/list/GitListCommandTckTest.java | 15 +-
.../AbstractGitRemoteInfoCommandTckTest.java | 24 +-
.../command/remove/GitRemoveCommandTckTest.java | 21 +-
.../command/status/GitStatusCommandTckTest.java | 33 +-
.../git/command/tag/GitTagCommandTckTest.java | 33 +-
.../git/command/untag/GitUntagCommandTckTest.java | 30 +-
.../command/update/GitUpdateCommandTckTest.java | 33 +-
.../maven-scm-provider-jgit/pom.xml | 14 +-
.../scm/provider/git/jgit/JGitScmProvider.java | 91 +--
.../jgit/command/JGitTransportConfigCallback.java | 20 +-
.../scm/provider/git/jgit/command/JGitUtils.java | 411 +++++-----
.../PlexusInteractivityCredentialsProvider.java | 115 +--
.../ScmProviderAwareSshdSessionFactory.java | 56 +-
.../git/jgit/command/add/JGitAddCommand.java | 56 +-
.../git/jgit/command/blame/JGitBlameCommand.java | 58 +-
.../git/jgit/command/branch/JGitBranchCommand.java | 103 +--
.../command/changelog/JGitChangeLogCommand.java | 272 +++----
.../jgit/command/checkin/JGitCheckInCommand.java | 211 ++---
.../jgit/command/checkout/JGitCheckOutCommand.java | 169 ++--
.../git/jgit/command/diff/JGitDiffCommand.java | 107 ++-
.../git/jgit/command/info/JGitInfoCommand.java | 45 +-
.../git/jgit/command/list/JGitListCommand.java | 72 +-
.../command/remoteinfo/JGitRemoteInfoCommand.java | 82 +-
.../git/jgit/command/remove/JGitRemoveCommand.java | 50 +-
.../git/jgit/command/status/JGitStatusCommand.java | 64 +-
.../git/jgit/command/tag/JGitTagCommand.java | 93 +--
.../git/jgit/command/untag/JGitUntagCommand.java | 70 +-
.../scm/provider/git/jgit/JGitTestScmProvider.java | 52 +-
.../command/branch/JGitBranchCommandTckTest.java | 24 +-
.../changelog/JGitChangeLogCommandTckTest.java | 38 +-
.../JGitCheckInCommandCommitterAuthorTckTest.java | 316 ++++----
.../command/checkin/JGitCheckInCommandTckTest.java | 24 +-
.../checkout/JGitCheckOutCommandTckTest.java | 25 +-
.../checkout/JGitSshCheckOutCommandTckTest.java | 96 +--
.../jgit/command/diff/JGitDiffCommandTckTest.java | 24 +-
.../remoteinfo/JGitRemoteInfoCommandTckTest.java | 39 +-
.../command/remove/JGitRemoveCommandTckTest.java | 24 +-
.../command/status/JGitStatusCommandTckTest.java | 24 +-
.../jgit/command/tag/JGitTagCommandTckTest.java | 24 +-
.../command/untag/JGitUntagCommandTckTest.java | 25 +-
.../maven-scm-providers-git/pom.xml | 8 +-
.../maven-scm-providers-standard/pom.xml | 2 -
.../maven-scm-provider-svn-commons/pom.xml | 18 +-
.../scm/provider/svn/AbstractSvnScmProvider.java | 331 +++-----
.../maven/scm/provider/svn/SvnChangeSet.java | 48 +-
.../maven/scm/provider/svn/SvnCommandUtils.java | 32 +-
.../scm/provider/svn/SvnConfigFileReader.java | 99 +--
.../maven/scm/provider/svn/SvnTagBranchUtils.java | 166 ++--
.../maven/scm/provider/svn/command/SvnCommand.java | 9 +-
.../provider/svn/command/diff/SvnDiffConsumer.java | 96 +--
.../scm/provider/svn/command/info/SvnInfoItem.java | 9 +-
.../svn/command/info/SvnInfoScmResult.java | 36 +-
.../svn/command/update/SvnUpdateScmResult.java | 14 +-
.../svn/repository/SvnScmProviderRepository.java | 175 ++--
.../maven/scm/provider/svn/util/SvnUtil.java | 57 +-
.../scm/provider/svn/SvnCommandUtilsTest.java | 71 +-
.../scm/provider/svn/SvnTagBranchUtilsTest.java | 372 ++++-----
.../maven/scm/provider/svn/TestSvnScmProvider.java | 70 +-
.../repository/SvnScmProviderRepositoryTest.java | 315 ++++----
.../maven-scm-provider-svnexe/pom.xml | 4 +-
.../scm/provider/svn/svnexe/SvnExeScmProvider.java | 90 +--
.../command/AbstractFileCheckingConsumer.java | 76 +-
.../svn/svnexe/command/SvnCommandLineUtils.java | 244 +++---
.../svn/svnexe/command/add/SvnAddCommand.java | 92 +--
.../svn/svnexe/command/add/SvnAddConsumer.java | 49 +-
.../svn/svnexe/command/blame/SvnBlameCommand.java | 63 +-
.../svn/svnexe/command/blame/SvnBlameConsumer.java | 87 +-
.../svnexe/command/branch/SvnBranchCommand.java | 183 ++---
.../command/changelog/IllegalOutputException.java | 18 +-
.../command/changelog/SvnChangeLogCommand.java | 277 +++----
.../command/changelog/SvnChangeLogConsumer.java | 215 +++--
.../svnexe/command/checkin/SvnCheckInCommand.java | 121 ++-
.../svnexe/command/checkin/SvnCheckInConsumer.java | 72 +-
.../command/checkout/SvnCheckOutCommand.java | 110 ++-
.../command/checkout/SvnCheckOutConsumer.java | 88 +-
.../svn/svnexe/command/diff/SvnDiffCommand.java | 85 +-
.../svnexe/command/export/SvnExeExportCommand.java | 107 ++-
.../svn/svnexe/command/info/SvnInfoCommand.java | 98 +--
.../svn/svnexe/command/info/SvnInfoConsumer.java | 97 +--
.../svn/svnexe/command/list/SvnListCommand.java | 85 +-
.../svn/svnexe/command/list/SvnListConsumer.java | 24 +-
.../svn/svnexe/command/mkdir/SvnMkdirCommand.java | 137 ++--
.../svn/svnexe/command/mkdir/SvnMkdirConsumer.java | 61 +-
.../command/remoteinfo/SvnRemoteInfoCommand.java | 132 ++-
.../svnexe/command/remove/SvnRemoveCommand.java | 80 +-
.../svnexe/command/remove/SvnRemoveConsumer.java | 49 +-
.../svnexe/command/status/SvnStatusCommand.java | 53 +-
.../svnexe/command/status/SvnStatusConsumer.java | 103 +--
.../svn/svnexe/command/tag/SvnTagCommand.java | 237 +++---
.../svn/svnexe/command/untag/SvnUntagCommand.java | 105 +--
.../svnexe/command/update/SvnUpdateCommand.java | 118 ++-
.../svnexe/command/update/SvnUpdateConsumer.java | 104 +--
.../provider/svn/svnexe/SvnExeScmProviderTest.java | 85 +-
.../svnexe/command/SvnCommandLineUtilsTest.java | 157 ++--
.../command/blame/SvnExeBlameCommandTckTest.java | 16 +-
.../command/branch/SvnExeBranchCommandTckTest.java | 194 ++---
.../command/changelog/SvnChangeLogCommandTest.java | 242 +++---
.../changelog/SvnChangeLogConsumerTest.java | 227 +++---
.../command/checkin/SvnCheckInCommandTest.java | 86 +-
.../checkin/SvnExeCheckInCommandTckTest.java | 12 +-
.../command/checkout/SvnCheckOutCommandTest.java | 88 +-
.../command/checkout/SvnCheckOutConsumerTest.java | 27 +-
.../checkout/SvnExeCheckOutCommandTckTest.java | 12 +-
.../command/diff/SvnExeDiffCommandTckTest.java | 12 +-
.../command/export/SvnExportCommandTest.java | 52 +-
.../svnexe/command/info/SvnInfoCommandTest.java | 33 +-
.../command/list/SvnExeListCommandTckTest.java | 12 +-
.../svnexe/command/list/SvnListCommandTest.java | 80 +-
.../command/mkdir/SvnExeMkdirCommandTckTest.java | 12 +-
.../svnexe/command/mkdir/SvnMkdirCommandTest.java | 68 +-
.../AbstractSvnExeRemoteInfoCommandTckTest.java | 29 +-
.../remoteinfo/SvnExeRemoteInfoCommandTckTest.java | 16 +-
...vnExeRemoteInfoCommandTrailingSlashTckTest.java | 16 +-
.../remoteinfo/SvnRemoteInfoCommandTest.java | 27 +-
.../command/remove/SvnExeRemoveCommandTckTest.java | 12 +-
.../command/status/SvnExeStatusCommandTckTest.java | 12 +-
.../command/tag/SvnExeTagCommandTckTest.java | 141 ++--
.../command/untag/SvnExeUntagCommandTckTest.java | 69 +-
.../svnexe/command/untag/SvnUntagCommandTest.java | 72 +-
.../command/update/SvnExeUpdateCommandTckTest.java | 12 +-
.../command/update/SvnUpdateCommandTest.java | 222 +++---
.../maven-scm-provider-svntest/pom.xml | 2 -
.../maven/scm/provider/svn/SvnScmTestUtils.java | 123 ++-
.../svn/command/blame/SvnBlameCommandTckTest.java | 38 +-
.../command/branch/SvnBranchCommandTckTest.java | 25 +-
.../command/checkin/SvnCheckInCommandTckTest.java | 25 +-
.../checkout/SvnCheckOutCommandTckTest.java | 25 +-
.../svn/command/diff/SvnDiffCommandTckTest.java | 25 +-
.../svn/command/list/SvnListCommandTckTest.java | 25 +-
.../svn/command/mkdir/SvnMkdirCommandTckTest.java | 85 +-
.../AbstractSvnRemoteInfoCommandTckTest.java | 26 +-
.../command/remove/SvnRemoveCommandTckTest.java | 25 +-
.../command/status/SvnStatusCommandTckTest.java | 25 +-
.../svn/command/tag/SvnTagCommandTckTest.java | 25 +-
.../svn/command/untag/SvnUntagCommandTckTest.java | 25 +-
.../command/update/SvnUpdateCommandTckTest.java | 25 +-
.../maven-scm-providers-svn/pom.xml | 4 +-
maven-scm-providers/pom.xml | 4 +-
maven-scm-test/pom.xml | 2 -
.../apache/maven/scm/PlexusJUnit4TestSupport.java | 220 ++---
.../java/org/apache/maven/scm/ScmTckTestCase.java | 153 ++--
.../java/org/apache/maven/scm/ScmTestCase.java | 317 ++++----
.../apache/maven/scm/manager/ScmManagerStub.java | 389 ++++-----
.../scm/provider/ScmProviderRepositoryStub.java | 20 +-
.../apache/maven/scm/provider/ScmProviderStub.java | 535 +++++--------
.../maven/scm/repository/ScmRepositoryStub.java | 15 +-
.../scm/tck/command/blame/BlameCommandTckTest.java | 97 ++-
.../tck/command/branch/BranchCommandTckTest.java | 86 +-
.../command/changelog/ChangeLogCommandTckTest.java | 97 ++-
.../tck/command/checkin/CheckInCommandTckTest.java | 298 ++++---
.../command/checkout/CheckOutCommandTckTest.java | 31 +-
.../scm/tck/command/diff/DiffCommandTckTest.java | 89 +--
.../scm/tck/command/list/ListCommandTckTest.java | 55 +-
.../scm/tck/command/mkdir/MkdirCommandTckTest.java | 29 +-
.../AbstractRemoteInfoCommandTckTest.java | 24 +-
.../tck/command/remove/RemoveCommandTckTest.java | 61 +-
.../tck/command/status/StatusCommandTckTest.java | 96 +--
.../scm/tck/command/tag/TagCommandTckTest.java | 84 +-
.../scm/tck/command/untag/UntagCommandTckTest.java | 53 +-
.../tck/command/update/UpdateCommandTckTest.java | 105 ++-
.../maven/scm/manager/ScmManagerStubTest.java | 76 +-
pom.xml | 161 ++--
446 files changed, 15020 insertions(+), 20899 deletions(-)
diff --git a/maven-scm-api/pom.xml b/maven-scm-api/pom.xml
index b8f81a489..829c67eb7 100644
--- a/maven-scm-api/pom.xml
+++ b/maven-scm-api/pom.xml
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
@@ -18,7 +17,6 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/AbstractScmVersion.java b/maven-scm-api/src/main/java/org/apache/maven/scm/AbstractScmVersion.java
index 34925641b..a6d3f786f 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/AbstractScmVersion.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/AbstractScmVersion.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
@@ -25,9 +24,7 @@ import java.io.Serializable;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public abstract class AbstractScmVersion
- implements ScmVersion, Serializable
-{
+public abstract class AbstractScmVersion implements ScmVersion, Serializable {
private static final long serialVersionUID = -3388495744009098066L;
private String name;
@@ -35,30 +32,25 @@ public abstract class AbstractScmVersion
/**
* @param name could be null
*/
- public AbstractScmVersion( String name )
- {
- setName( name );
+ public AbstractScmVersion(String name) {
+ setName(name);
}
/** {@inheritDoc} */
- public String getName()
- {
+ public String getName() {
return name;
}
/** {@inheritDoc} */
- public void setName( String name )
- {
- if ( name != null )
- {
+ public void setName(String name) {
+ if (name != null) {
name = name.trim();
}
this.name = name;
}
/** {@inheritDoc} */
- public String toString()
- {
+ public String toString() {
return getName();
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeFile.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeFile.java
index 301e1501c..9776c0ae3 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeFile.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeFile.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
@@ -29,9 +28,7 @@ import java.io.Serializable;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class ChangeFile
- implements Serializable
-{
+public class ChangeFile implements Serializable {
private static final long serialVersionUID = 6294855290542668753L;
/**
@@ -68,9 +65,8 @@ public class ChangeFile
*
* @param name file name
*/
- public ChangeFile( String name )
- {
- setName( name );
+ public ChangeFile(String name) {
+ setName(name);
}
/**
@@ -79,11 +75,10 @@ public class ChangeFile
* @param name file name
* @param rev latest revision of the file
*/
- public ChangeFile( String name, String rev )
- {
- setName( name );
+ public ChangeFile(String name, String rev) {
+ setName(name);
- setRevision( rev );
+ setRevision(rev);
}
/**
@@ -91,8 +86,7 @@ public class ChangeFile
*
* @return the file name
*/
- public String getName()
- {
+ public String getName() {
return name;
}
@@ -101,29 +95,24 @@ public class ChangeFile
*
* @param name New value of property name.
*/
- public void setName( String name )
- {
+ public void setName(String name) {
this.name = name;
}
- public String getOriginalName()
- {
+ public String getOriginalName() {
return originalName;
}
- public void setOriginalName( String originalName )
- {
+ public void setOriginalName(String originalName) {
this.originalName = originalName;
}
- public String getOriginalRevision()
- {
+ public String getOriginalRevision() {
return originalRevision;
}
- public void setOriginalRevision( String originalRevision )
- {
+ public void setOriginalRevision(String originalRevision) {
this.originalRevision = originalRevision;
}
@@ -132,8 +121,7 @@ public class ChangeFile
*
* @return the latest revision of the file
*/
- public String getRevision()
- {
+ public String getRevision() {
return revision;
}
@@ -142,18 +130,15 @@ public class ChangeFile
*
* @param revision New value of property revision.
*/
- public void setRevision( String revision )
- {
+ public void setRevision(String revision) {
this.revision = revision;
}
- public ScmFileStatus getAction()
- {
+ public ScmFileStatus getAction() {
return action;
}
- public void setAction( ScmFileStatus action )
- {
+ public void setAction(ScmFileStatus action) {
this.action = action;
}
@@ -162,29 +147,24 @@ public class ChangeFile
*
* @return a {@link String}made up of the properties of the object
*/
- public String toString()
- {
- StringBuilder buffer = new StringBuilder( );
+ public String toString() {
+ StringBuilder buffer = new StringBuilder();
- if ( getAction() != null )
- {
- buffer.append( "[" ).append( getAction() ).append( "]:" );
+ if (getAction() != null) {
+ buffer.append("[").append(getAction()).append("]:");
}
- buffer.append( getName() );
- if ( getRevision() != null )
- {
- buffer.append( ", " ).append( getRevision() );
+ buffer.append(getName());
+ if (getRevision() != null) {
+ buffer.append(", ").append(getRevision());
}
- if ( getOriginalName() != null )
- {
- buffer.append( ", originalName=" ).append( getOriginalName() );
+ if (getOriginalName() != null) {
+ buffer.append(", originalName=").append(getOriginalName());
}
- if ( getOriginalRevision() != null )
- {
- buffer.append( ", originalRevision=" ).append( getOriginalRevision() );
+ if (getOriginalRevision() != null) {
+ buffer.append(", originalRevision=").append(getOriginalRevision());
}
return buffer.toString();
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java
index 6e49543f5..a9663f0ee 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
import java.text.ParseException;
@@ -38,9 +37,7 @@ import org.codehaus.plexus.util.StringUtils;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class ChangeSet
- implements Serializable
-{
+public class ChangeSet implements Serializable {
/**
*
*/
@@ -76,25 +73,25 @@ public class ChangeSet
/**
* Formatter used by the getDateFormatted method.
*/
- private static final ThreadSafeDateFormat DATE_FORMAT = new ThreadSafeDateFormat( DATE_PATTERN );
+ private static final ThreadSafeDateFormat DATE_FORMAT = new ThreadSafeDateFormat(DATE_PATTERN);
private static final String TIME_PATTERN = "HH:mm:ss";
/**
* Formatter used by the getTimeFormatted method.
*/
- private static final ThreadSafeDateFormat TIME_FORMAT = new ThreadSafeDateFormat( TIME_PATTERN );
+ private static final ThreadSafeDateFormat TIME_FORMAT = new ThreadSafeDateFormat(TIME_PATTERN);
/**
* Formatter used to parse date/timestamp.
*/
- private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_1 = new ThreadSafeDateFormat( "yyyy/MM/dd HH:mm:ss" );
+ private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_1 = new ThreadSafeDateFormat("yyyy/MM/dd HH:mm:ss");
- private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_2 = new ThreadSafeDateFormat( "yyyy-MM-dd HH:mm:ss" );
+ private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_2 = new ThreadSafeDateFormat("yyyy-MM-dd HH:mm:ss");
- private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_3 = new ThreadSafeDateFormat( "yyyy/MM/dd HH:mm:ss z" );
+ private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_3 = new ThreadSafeDateFormat("yyyy/MM/dd HH:mm:ss z");
- private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_4 = new ThreadSafeDateFormat( "yyyy-MM-dd HH:mm:ss z" );
+ private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_4 = new ThreadSafeDateFormat("yyyy-MM-dd HH:mm:ss z");
/**
* Date the changes were committed
@@ -146,12 +143,10 @@ public class ChangeSet
* @param author User who made changes
* @param files The ChangeFile list
*/
- public ChangeSet( String strDate, String userDatePattern, String comment, String author,
- List<ChangeFile> files )
- {
- this( null, comment, author, files );
+ public ChangeSet(String strDate, String userDatePattern, String comment, String author, List<ChangeFile> files) {
+ this(null, comment, author, files);
- setDate( strDate, userDatePattern );
+ setDate(strDate, userDatePattern);
}
/**
@@ -160,13 +155,12 @@ public class ChangeSet
* @param author User who made changes
* @param files The ChangeFile list
*/
- public ChangeSet( Date date, String comment, String author, List<ChangeFile> files )
- {
- setDate( date );
+ public ChangeSet(Date date, String comment, String author, List<ChangeFile> files) {
+ setDate(date);
- setAuthor( author );
+ setAuthor(author);
- setComment( comment );
+ setComment(comment);
this.files = files;
}
@@ -174,8 +168,7 @@ public class ChangeSet
/**
* Constructor used when attributes aren't available until later
*/
- public ChangeSet()
- {
+ public ChangeSet() {
// no op
}
@@ -184,10 +177,8 @@ public class ChangeSet
*
* @return List of ChangeFile.
*/
- public List<ChangeFile> getFiles()
- {
- if ( files == null )
- {
+ public List<ChangeFile> getFiles() {
+ if (files == null) {
return new ArrayList<ChangeFile>();
}
return files;
@@ -198,19 +189,16 @@ public class ChangeSet
*
* @param files List of ChangeFiles.
*/
- public void setFiles( List<ChangeFile> files )
- {
+ public void setFiles(List<ChangeFile> files) {
this.files = files;
}
- public void addFile( ChangeFile file )
- {
- if ( files == null )
- {
+ public void addFile(ChangeFile file) {
+ if (files == null) {
files = new ArrayList<ChangeFile>();
}
- files.add( file );
+ files.add(file);
}
/**
@@ -219,21 +207,16 @@ public class ChangeSet
* @param repository NOT USED
* @return TODO
*/
- public boolean containsFilename( String filename, ScmProviderRepository repository )
- {
- return containsFilename( filename );
- }
-
- public boolean containsFilename( String filename )
- {
- if ( files != null )
- {
- for ( ChangeFile file : files )
- {
- String f1 = FilenameUtils.normalizeFilename( file.getName() );
- String f2 = FilenameUtils.normalizeFilename( filename );
- if ( f1.indexOf( f2 ) >= 0 )
- {
+ public boolean containsFilename(String filename, ScmProviderRepository repository) {
+ return containsFilename(filename);
+ }
+
+ public boolean containsFilename(String filename) {
+ if (files != null) {
+ for (ChangeFile file : files) {
+ String f1 = FilenameUtils.normalizeFilename(file.getName());
+ String f2 = FilenameUtils.normalizeFilename(filename);
+ if (f1.indexOf(f2) >= 0) {
return true;
}
}
@@ -247,8 +230,7 @@ public class ChangeSet
*
* @return Value of property author.
*/
- public String getAuthor()
- {
+ public String getAuthor() {
return author;
}
@@ -257,8 +239,7 @@ public class ChangeSet
*
* @param author New value of property author.
*/
- public void setAuthor( String author )
- {
+ public void setAuthor(String author) {
this.author = author;
}
@@ -267,8 +248,7 @@ public class ChangeSet
*
* @return Value of property comment.
*/
- public String getComment()
- {
+ public String getComment() {
return comment;
}
@@ -277,8 +257,7 @@ public class ChangeSet
*
* @param comment New value of property comment.
*/
- public void setComment( String comment )
- {
+ public void setComment(String comment) {
this.comment = comment;
}
@@ -287,10 +266,8 @@ public class ChangeSet
*
* @return Value of property date.
*/
- public Date getDate()
- {
- if ( date != null )
- {
+ public Date getDate() {
+ if (date != null) {
return (Date) date.clone();
}
@@ -302,11 +279,9 @@ public class ChangeSet
*
* @param date New value of property date.
*/
- public void setDate( Date date )
- {
- if ( date != null )
- {
- this.date = new Date( date.getTime() );
+ public void setDate(Date date) {
+ if (date != null) {
+ this.date = new Date(date.getTime());
}
}
@@ -315,9 +290,8 @@ public class ChangeSet
*
* @param date - a string in yyyy/MM/dd HH:mm:ss format
*/
- public void setDate( String date )
- {
- setDate( date, null );
+ public void setDate(String date) {
+ setDate(date, null);
}
/**
@@ -326,76 +300,45 @@ public class ChangeSet
* @param date - a string in yyyy/MM/dd HH:mm:ss format
* @param userDatePattern - pattern of date
*/
- public void setDate( String date, String userDatePattern )
- {
- try
- {
- if ( !StringUtils.isEmpty( userDatePattern ) )
- {
- SimpleDateFormat format = new SimpleDateFormat( userDatePattern );
+ public void setDate(String date, String userDatePattern) {
+ try {
+ if (!StringUtils.isEmpty(userDatePattern)) {
+ SimpleDateFormat format = new SimpleDateFormat(userDatePattern);
- this.date = format.parse( date );
- }
- else
- {
- this.date = TIMESTAMP_FORMAT_3.parse( date );
+ this.date = format.parse(date);
+ } else {
+ this.date = TIMESTAMP_FORMAT_3.parse(date);
}
- }
- catch ( ParseException e )
- {
- if ( !StringUtils.isEmpty( userDatePattern ) )
- {
- try
- {
- this.date = TIMESTAMP_FORMAT_3.parse( date );
- }
- catch ( ParseException pe )
- {
- try
- {
- this.date = TIMESTAMP_FORMAT_4.parse( date );
- }
- catch ( ParseException pe1 )
- {
- try
- {
- this.date = TIMESTAMP_FORMAT_1.parse( date );
- }
- catch ( ParseException pe2 )
- {
- try
- {
- this.date = TIMESTAMP_FORMAT_2.parse( date );
- }
- catch ( ParseException pe3 )
- {
- throw new IllegalArgumentException( "Unable to parse date: " + date );
+ } catch (ParseException e) {
+ if (!StringUtils.isEmpty(userDatePattern)) {
+ try {
+ this.date = TIMESTAMP_FORMAT_3.parse(date);
+ } catch (ParseException pe) {
+ try {
+ this.date = TIMESTAMP_FORMAT_4.parse(date);
+ } catch (ParseException pe1) {
+ try {
+ this.date = TIMESTAMP_FORMAT_1.parse(date);
+ } catch (ParseException pe2) {
+ try {
+ this.date = TIMESTAMP_FORMAT_2.parse(date);
+ } catch (ParseException pe3) {
+ throw new IllegalArgumentException("Unable to parse date: " + date);
}
}
}
}
- }
- else
- {
- try
- {
- this.date = TIMESTAMP_FORMAT_4.parse( date );
- }
- catch ( ParseException pe1 )
- {
- try
- {
- this.date = TIMESTAMP_FORMAT_1.parse( date );
- }
- catch ( ParseException pe2 )
- {
- try
- {
- this.date = TIMESTAMP_FORMAT_2.parse( date );
- }
- catch ( ParseException pe3 )
- {
- throw new IllegalArgumentException( "Unable to parse date: " + date );
+ } else {
+ try {
+ this.date = TIMESTAMP_FORMAT_4.parse(date);
+ } catch (ParseException pe1) {
+ try {
+ this.date = TIMESTAMP_FORMAT_1.parse(date);
+ } catch (ParseException pe2) {
+ try {
+ this.date = TIMESTAMP_FORMAT_2.parse(date);
+ } catch (ParseException pe3) {
+ throw new IllegalArgumentException("Unable to parse date: " + date);
}
}
}
@@ -406,17 +349,15 @@ public class ChangeSet
/**
* @return date in yyyy-mm-dd format
*/
- public String getDateFormatted()
- {
- return DATE_FORMAT.format( getDate() );
+ public String getDateFormatted() {
+ return DATE_FORMAT.format(getDate());
}
/**
* @return time in HH:mm:ss format
*/
- public String getTimeFormatted()
- {
- return TIME_FORMAT.format( getDate() );
+ public String getTimeFormatted() {
+ return TIME_FORMAT.format(getDate());
}
/**
@@ -424,10 +365,8 @@ public class ChangeSet
*
* @return Value of property author.
*/
- public List<String> getTags()
- {
- if ( tags == null )
- {
+ public List<String> getTags() {
+ if (tags == null) {
return new ArrayList<>();
}
return tags;
@@ -438,8 +377,7 @@ public class ChangeSet
*
* @param tags New value of property tags. This replaces the existing list (if any).
*/
- public void setTags( List<String> tags )
- {
+ public void setTags(List<String> tags) {
this.tags = tags;
}
@@ -448,30 +386,25 @@ public class ChangeSet
*
* @param tag New tag to add to the list of tags.
*/
- public void addTag( String tag )
- {
- if ( tag == null )
- {
+ public void addTag(String tag) {
+ if (tag == null) {
return;
}
tag = tag.trim();
- if ( tag.isEmpty() )
- {
+ if (tag.isEmpty()) {
return;
}
- if ( tags == null )
- {
+ if (tags == null) {
tags = new ArrayList<>();
}
- tags.add( tag );
+ tags.add(tag);
}
/**
* @return TODO
* @since 1.3
*/
- public String getRevision()
- {
+ public String getRevision() {
return revision;
}
@@ -479,70 +412,57 @@ public class ChangeSet
* @param revision TODO
* @since 1.3
*/
- public void setRevision( String revision )
- {
+ public void setRevision(String revision) {
this.revision = revision;
}
- public String getParentRevision()
- {
+ public String getParentRevision() {
return parentRevision;
}
- public void setParentRevision( String parentRevision )
- {
+ public void setParentRevision(String parentRevision) {
this.parentRevision = parentRevision;
}
- public void addMergedRevision( String mergedRevision )
- {
- if ( mergedRevisions == null )
- {
+ public void addMergedRevision(String mergedRevision) {
+ if (mergedRevisions == null) {
mergedRevisions = new LinkedHashSet<String>();
}
- mergedRevisions.add( mergedRevision );
+ mergedRevisions.add(mergedRevision);
}
- public Set<String> getMergedRevisions()
- {
+ public Set<String> getMergedRevisions() {
return mergedRevisions == null ? Collections.<String>emptySet() : mergedRevisions;
}
- public void setMergedRevisions( Set<String> mergedRevisions )
- {
+ public void setMergedRevisions(Set<String> mergedRevisions) {
this.mergedRevisions = mergedRevisions;
}
/** {@inheritDoc} */
- public String toString()
- {
- StringBuilder result = new StringBuilder( author == null ? " null " : author );
- result.append( "\n" ).append( date == null ? "null " : date.toString() ).append( "\n" );
+ public String toString() {
+ StringBuilder result = new StringBuilder(author == null ? " null " : author);
+ result.append("\n").append(date == null ? "null " : date.toString()).append("\n");
List<String> tags = getTags();
- if ( !tags.isEmpty() )
- {
- result.append( "tags:" ).append( tags ).append( "\n" );
+ if (!tags.isEmpty()) {
+ result.append("tags:").append(tags).append("\n");
}
// parent(s)
- if ( parentRevision != null )
- {
- result.append( "parent: " ).append( parentRevision );
- if ( !getMergedRevisions().isEmpty() )
- {
- result.append( " + " );
- result.append( getMergedRevisions() );
+ if (parentRevision != null) {
+ result.append("parent: ").append(parentRevision);
+ if (!getMergedRevisions().isEmpty()) {
+ result.append(" + ");
+ result.append(getMergedRevisions());
}
- result.append( "\n" );
+ result.append("\n");
}
- if ( files != null )
- {
- for ( ChangeFile file : files )
- {
- result.append( file == null ? " null " : file.toString() ).append( "\n" );
+ if (files != null) {
+ for (ChangeFile file : files) {
+ result.append(file == null ? " null " : file.toString()).append("\n");
}
}
- result.append( comment == null ? " null " : comment );
+ result.append(comment == null ? " null " : comment);
return result.toString();
}
@@ -553,86 +473,70 @@ public class ChangeSet
* @return a changelog-entry in xml format
* TODO make sure comment doesn't contain CDATA tags - MAVEN114
*/
- public String toXML()
- {
- StringBuilder buffer = new StringBuilder( "\t<changelog-entry>\n" );
-
- if ( getDate() != null )
- {
- buffer.append( "\t\t<date pattern=\"" + DATE_PATTERN + "\">" )
- .append( getDateFormatted() )
- .append( "</date>\n" )
- .append( "\t\t<time pattern=\"" + TIME_PATTERN + "\">" )
- .append( getTimeFormatted() )
- .append( "</time>\n" );
+ public String toXML() {
+ StringBuilder buffer = new StringBuilder("\t<changelog-entry>\n");
+
+ if (getDate() != null) {
+ buffer.append("\t\t<date pattern=\"" + DATE_PATTERN + "\">")
+ .append(getDateFormatted())
+ .append("</date>\n")
+ .append("\t\t<time pattern=\"" + TIME_PATTERN + "\">")
+ .append(getTimeFormatted())
+ .append("</time>\n");
}
- buffer.append( "\t\t<author><![CDATA[" )
- .append( author )
- .append( "]]></author>\n" );
+ buffer.append("\t\t<author><![CDATA[").append(author).append("]]></author>\n");
- if ( parentRevision != null )
- {
- buffer.append( "\t\t<parent>" ).append( getParentRevision() ).append( "</parent>\n" );
+ if (parentRevision != null) {
+ buffer.append("\t\t<parent>").append(getParentRevision()).append("</parent>\n");
}
- for ( String mergedRevision : getMergedRevisions() )
- {
- buffer.append( "\t\t<merge>" ).append( mergedRevision ).append( "</merge>\n" );
+ for (String mergedRevision : getMergedRevisions()) {
+ buffer.append("\t\t<merge>").append(mergedRevision).append("</merge>\n");
}
- if ( files != null )
- {
- for ( ChangeFile file : files )
- {
- buffer.append( "\t\t<file>\n" );
- if ( file.getAction() != null )
- {
- buffer.append( "\t\t\t<action>" ).append( file.getAction() ).append( "</action>\n" );
+ if (files != null) {
+ for (ChangeFile file : files) {
+ buffer.append("\t\t<file>\n");
+ if (file.getAction() != null) {
+ buffer.append("\t\t\t<action>").append(file.getAction()).append("</action>\n");
}
- buffer.append( "\t\t\t<name>" ).append( escapeValue( file.getName() ) ).append( "</name>\n" );
- buffer.append( "\t\t\t<revision>" ).append( file.getRevision() ).append( "</revision>\n" );
- if ( file.getOriginalName() != null )
- {
- buffer.append( "\t\t\t<orig-name>" );
- buffer.append( escapeValue( file.getOriginalName() ) );
- buffer.append( "</orig-name>\n" );
+ buffer.append("\t\t\t<name>")
+ .append(escapeValue(file.getName()))
+ .append("</name>\n");
+ buffer.append("\t\t\t<revision>").append(file.getRevision()).append("</revision>\n");
+ if (file.getOriginalName() != null) {
+ buffer.append("\t\t\t<orig-name>");
+ buffer.append(escapeValue(file.getOriginalName()));
+ buffer.append("</orig-name>\n");
}
- if ( file.getOriginalRevision() != null )
- {
- buffer.append( "\t\t\t<orig-revision>" );
- buffer.append( file.getOriginalRevision() );
- buffer.append( "</orig-revision>\n" );
+ if (file.getOriginalRevision() != null) {
+ buffer.append("\t\t\t<orig-revision>");
+ buffer.append(file.getOriginalRevision());
+ buffer.append("</orig-revision>\n");
}
- buffer.append( "\t\t</file>\n" );
+ buffer.append("\t\t</file>\n");
}
}
- buffer.append( "\t\t<msg><![CDATA[" )
- .append( removeCDataEnd( comment ) )
- .append( "]]></msg>\n" );
+ buffer.append("\t\t<msg><![CDATA[").append(removeCDataEnd(comment)).append("]]></msg>\n");
List<String> tags = getTags();
- if ( !tags.isEmpty() )
- {
- buffer.append( "\t\t<tags>\n" );
- for ( String tag: tags )
- {
- buffer.append( "\t\t\t<tag>" ).append( escapeValue( tag ) ).append( "</tag>\n" );
+ if (!tags.isEmpty()) {
+ buffer.append("\t\t<tags>\n");
+ for (String tag : tags) {
+ buffer.append("\t\t\t<tag>").append(escapeValue(tag)).append("</tag>\n");
}
- buffer.append( "\t\t</tags>\n" );
+ buffer.append("\t\t</tags>\n");
}
- buffer.append( "\t</changelog-entry>\n" );
+ buffer.append("\t</changelog-entry>\n");
return buffer.toString();
}
/** {@inheritDoc} */
- public boolean equals( Object obj )
- {
- if ( obj instanceof ChangeSet )
- {
+ public boolean equals(Object obj) {
+ if (obj instanceof ChangeSet) {
ChangeSet changeSet = (ChangeSet) obj;
- if ( toString().equals( changeSet.toString() ) )
- {
+ if (toString().equals(changeSet.toString())) {
return true;
}
}
@@ -641,16 +545,15 @@ public class ChangeSet
}
/** {@inheritDoc} */
- public int hashCode()
- {
+ public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ( ( author == null ) ? 0 : author.hashCode() );
- result = prime * result + ( ( comment == null ) ? 0 : comment.hashCode() );
- result = prime * result + ( ( date == null ) ? 0 : date.hashCode() );
- result = prime * result + ( ( parentRevision == null ) ? 0 : parentRevision.hashCode() );
- result = prime * result + ( ( mergedRevisions == null ) ? 0 : mergedRevisions.hashCode() );
- result = prime * result + ( ( files == null ) ? 0 : files.hashCode() );
+ result = prime * result + ((author == null) ? 0 : author.hashCode());
+ result = prime * result + ((comment == null) ? 0 : comment.hashCode());
+ result = prime * result + ((date == null) ? 0 : date.hashCode());
+ result = prime * result + ((parentRevision == null) ? 0 : parentRevision.hashCode());
+ result = prime * result + ((mergedRevisions == null) ? 0 : mergedRevisions.hashCode());
+ result = prime * result + ((files == null) ? 0 : files.hashCode());
return result;
}
@@ -660,13 +563,11 @@ public class ChangeSet
* @param message The message to modify
* @return a clean string
*/
- private String removeCDataEnd( String message )
- {
+ private String removeCDataEnd(String message) {
// check for invalid sequence ]]>
int endCdata;
- while ( message != null && ( endCdata = message.indexOf( "]]>" ) ) > -1 )
- {
- message = message.substring( 0, endCdata ) + "] ] >" + message.substring( endCdata + 3, message.length() );
+ while (message != null && (endCdata = message.indexOf("]]>")) > -1) {
+ message = message.substring(0, endCdata) + "] ] >" + message.substring(endCdata + 3, message.length());
}
return message;
}
@@ -680,35 +581,32 @@ public class ChangeSet
* @param value escape <code>value.toString()</code>
* @return text with characters restricted (for use in attributes) escaped
*/
- public static String escapeValue( Object value )
- {
- StringBuilder buffer = new StringBuilder( value.toString() );
- for ( int i = 0, size = buffer.length(); i < size; i++ )
- {
- switch ( buffer.charAt( i ) )
- {
- case'<':
- buffer.replace( i, i + 1, LESS_THAN_ENTITY );
+ public static String escapeValue(Object value) {
+ StringBuilder buffer = new StringBuilder(value.toString());
+ for (int i = 0, size = buffer.length(); i < size; i++) {
+ switch (buffer.charAt(i)) {
+ case '<':
+ buffer.replace(i, i + 1, LESS_THAN_ENTITY);
size += 3;
i += 3;
break;
- case'>':
- buffer.replace( i, i + 1, GREATER_THAN_ENTITY );
+ case '>':
+ buffer.replace(i, i + 1, GREATER_THAN_ENTITY);
size += 3;
i += 3;
break;
- case'&':
- buffer.replace( i, i + 1, AMPERSAND_ENTITY );
+ case '&':
+ buffer.replace(i, i + 1, AMPERSAND_ENTITY);
size += 4;
i += 4;
break;
- case'\'':
- buffer.replace( i, i + 1, APOSTROPHE_ENTITY );
+ case '\'':
+ buffer.replace(i, i + 1, APOSTROPHE_ENTITY);
size += 5;
i += 5;
break;
- case'\"':
- buffer.replace( i, i + 1, QUOTE_ENTITY );
+ case '\"':
+ buffer.replace(i, i + 1, QUOTE_ENTITY);
size += 5;
i += 5;
break;
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java b/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
index c8edd3541..ceff4c6fd 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
@@ -25,78 +24,74 @@ import java.io.Serializable;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public class CommandParameter
- implements Serializable
-{
+public class CommandParameter implements Serializable {
private static final long serialVersionUID = -3391190831054016735L;
- public static final CommandParameter BINARY = new CommandParameter( "binary" );
+ public static final CommandParameter BINARY = new CommandParameter("binary");
- public static final CommandParameter RECURSIVE = new CommandParameter( "recursive" );
+ public static final CommandParameter RECURSIVE = new CommandParameter("recursive");
- public static final CommandParameter SHALLOW = new CommandParameter( "shallow" );
+ public static final CommandParameter SHALLOW = new CommandParameter("shallow");
- public static final CommandParameter MESSAGE = new CommandParameter( "message" );
+ public static final CommandParameter MESSAGE = new CommandParameter("message");
- public static final CommandParameter BRANCH_NAME = new CommandParameter( "branchName" );
+ public static final CommandParameter BRANCH_NAME = new CommandParameter("branchName");
- public static final CommandParameter START_DATE = new CommandParameter( "startDate" );
+ public static final CommandParameter START_DATE = new CommandParameter("startDate");
- public static final CommandParameter END_DATE = new CommandParameter( "endDate" );
+ public static final CommandParameter END_DATE = new CommandParameter("endDate");
- public static final CommandParameter NUM_DAYS = new CommandParameter( "numDays" );
+ public static final CommandParameter NUM_DAYS = new CommandParameter("numDays");
- public static final CommandParameter LIMIT = new CommandParameter( "limit" );
+ public static final CommandParameter LIMIT = new CommandParameter("limit");
- public static final CommandParameter BRANCH = new CommandParameter( "branch" );
+ public static final CommandParameter BRANCH = new CommandParameter("branch");
- public static final CommandParameter START_SCM_VERSION = new CommandParameter( "startScmVersion" );
+ public static final CommandParameter START_SCM_VERSION = new CommandParameter("startScmVersion");
- public static final CommandParameter END_SCM_VERSION = new CommandParameter( "endScmVersion" );
+ public static final CommandParameter END_SCM_VERSION = new CommandParameter("endScmVersion");
- public static final CommandParameter CHANGELOG_DATE_PATTERN = new CommandParameter( "changelogDatePattern" );
+ public static final CommandParameter CHANGELOG_DATE_PATTERN = new CommandParameter("changelogDatePattern");
- public static final CommandParameter SCM_VERSION = new CommandParameter( "scmVersion" );
+ public static final CommandParameter SCM_VERSION = new CommandParameter("scmVersion");
- public static final CommandParameter TAG_NAME = new CommandParameter( "tagName" );
+ public static final CommandParameter TAG_NAME = new CommandParameter("tagName");
- public static final CommandParameter FILE = new CommandParameter( "file" );
+ public static final CommandParameter FILE = new CommandParameter("file");
- public static final CommandParameter FILES = new CommandParameter( "files" );
+ public static final CommandParameter FILES = new CommandParameter("files");
- public static final CommandParameter OUTPUT_FILE = new CommandParameter( "outputFile" );
+ public static final CommandParameter OUTPUT_FILE = new CommandParameter("outputFile");
- public static final CommandParameter OUTPUT_DIRECTORY = new CommandParameter( "outputDirectory" );
+ public static final CommandParameter OUTPUT_DIRECTORY = new CommandParameter("outputDirectory");
- public static final CommandParameter RUN_CHANGELOG_WITH_UPDATE =
- new CommandParameter( "run_changelog_with_update" );
+ public static final CommandParameter RUN_CHANGELOG_WITH_UPDATE = new CommandParameter("run_changelog_with_update");
- public static final CommandParameter SCM_TAG_PARAMETERS = new CommandParameter( "ScmTagParameters" );
+ public static final CommandParameter SCM_TAG_PARAMETERS = new CommandParameter("ScmTagParameters");
- public static final CommandParameter SCM_BRANCH_PARAMETERS = new CommandParameter( "ScmBranchParameters" );
+ public static final CommandParameter SCM_BRANCH_PARAMETERS = new CommandParameter("ScmBranchParameters");
- public static final CommandParameter SCM_MKDIR_CREATE_IN_LOCAL = new CommandParameter( "createInLocal" );
+ public static final CommandParameter SCM_MKDIR_CREATE_IN_LOCAL = new CommandParameter("createInLocal");
/**
* Parameter used only for Git SCM and simulate the <code>git rev-parse --short=lenght</code> command.
*
* @since 1.7
*/
- public static final CommandParameter SCM_SHORT_REVISION_LENGTH = new CommandParameter( "shortRevisionLength" );
+ public static final CommandParameter SCM_SHORT_REVISION_LENGTH = new CommandParameter("shortRevisionLength");
/**
* Parameter to force add
*
* @since 1.7
*/
- public static final CommandParameter FORCE_ADD = new CommandParameter( "forceAdd" );
+ public static final CommandParameter FORCE_ADD = new CommandParameter("forceAdd");
/**
* contains true or false
* @since 1.8
*/
- public static final CommandParameter IGNORE_WHITESPACE = new CommandParameter( "ignoreWhitespace" );
-
+ public static final CommandParameter IGNORE_WHITESPACE = new CommandParameter("ignoreWhitespace");
/**
* Parameter name
@@ -106,21 +101,18 @@ public class CommandParameter
/**
* @param name The parameter name
*/
- private CommandParameter( String name )
- {
+ private CommandParameter(String name) {
this.name = name;
}
/**
* @return The parameter name
*/
- public String getName()
- {
+ public String getName() {
return name;
}
- public String toString()
- {
+ public String toString() {
return name;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java b/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
index 3c71b65f4..4cca6878a 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.File;
import java.io.Serializable;
@@ -30,9 +29,7 @@ import java.util.Map;
* @author Olivier Lamy
*
*/
-public class CommandParameters
- implements Serializable
-{
+public class CommandParameters implements Serializable {
private static final long serialVersionUID = -7346070735958137283L;
private Map<String, Object> parameters = new HashMap<String, Object>();
@@ -48,10 +45,8 @@ public class CommandParameters
* @return The parameter value as a String
* @throws ScmException if the parameter doesn't exist
*/
- public String getString( CommandParameter parameter )
- throws ScmException
- {
- Object object = getObject( String.class, parameter );
+ public String getString(CommandParameter parameter) throws ScmException {
+ Object object = getObject(String.class, parameter);
return object.toString();
}
@@ -64,13 +59,10 @@ public class CommandParameters
* @return The parameter value as a String
* @throws ScmException if the value is in the wrong type
*/
- public String getString( CommandParameter parameter, String defaultValue )
- throws ScmException
- {
- Object object = getObject( String.class, parameter, null );
+ public String getString(CommandParameter parameter, String defaultValue) throws ScmException {
+ Object object = getObject(String.class, parameter, null);
- if ( object == null )
- {
+ if (object == null) {
return defaultValue;
}
@@ -84,10 +76,8 @@ public class CommandParameters
* @param value The value of the parameter
* @throws ScmException if the parameter already exist
*/
- public void setString( CommandParameter parameter, String value )
- throws ScmException
- {
- setObject( parameter, value );
+ public void setString(CommandParameter parameter, String value) throws ScmException {
+ setObject(parameter, value);
}
// ----------------------------------------------------------------------
@@ -101,10 +91,8 @@ public class CommandParameters
* @return The parameter value as a String
* @throws ScmException if the parameter doesn't exist
*/
- public int getInt( CommandParameter parameter )
- throws ScmException
- {
- return ( (Integer) getObject( Integer.class, parameter ) ).intValue();
+ public int getInt(CommandParameter parameter) throws ScmException {
+ return ((Integer) getObject(Integer.class, parameter)).intValue();
}
/**
@@ -115,13 +103,10 @@ public class CommandParameters
* @return The parameter value as a int
* @throws ScmException if the value is in the wrong type
*/
- public int getInt( CommandParameter parameter, int defaultValue )
- throws ScmException
- {
- Integer value = ( (Integer) getObject( Integer.class, parameter, null ) );
+ public int getInt(CommandParameter parameter, int defaultValue) throws ScmException {
+ Integer value = ((Integer) getObject(Integer.class, parameter, null));
- if ( value == null )
- {
+ if (value == null) {
return defaultValue;
}
@@ -135,10 +120,8 @@ public class CommandParameters
* @param value The value of the parameter
* @throws ScmException if the parameter already exist
*/
- public void setInt( CommandParameter parameter, int value )
- throws ScmException
- {
- setObject( parameter, Integer.valueOf( value ) );
+ public void setInt(CommandParameter parameter, int value) throws ScmException {
+ setObject(parameter, Integer.valueOf(value));
}
// ----------------------------------------------------------------------
@@ -152,10 +135,8 @@ public class CommandParameters
* @return The parameter value as a Date
* @throws ScmException if the parameter doesn't exist
*/
- public Date getDate( CommandParameter parameter )
- throws ScmException
- {
- return (Date) getObject( Date.class, parameter );
+ public Date getDate(CommandParameter parameter) throws ScmException {
+ return (Date) getObject(Date.class, parameter);
}
/**
@@ -166,10 +147,8 @@ public class CommandParameters
* @return The parameter value as a Date
* @throws ScmException if the value is in the wrong type
*/
- public Date getDate( CommandParameter parameter, Date defaultValue )
- throws ScmException
- {
- return (Date) getObject( Date.class, parameter, defaultValue );
+ public Date getDate(CommandParameter parameter, Date defaultValue) throws ScmException {
+ return (Date) getObject(Date.class, parameter, defaultValue);
}
/**
@@ -179,10 +158,8 @@ public class CommandParameters
* @param date The value of the parameter
* @throws ScmException if the parameter already exist
*/
- public void setDate( CommandParameter parameter, Date date )
- throws ScmException
- {
- setObject( parameter, date );
+ public void setDate(CommandParameter parameter, Date date) throws ScmException {
+ setObject(parameter, date);
}
// ----------------------------------------------------------------------
@@ -196,10 +173,8 @@ public class CommandParameters
* @return The parameter value as a boolean
* @throws ScmException if the parameter doesn't exist
*/
- public boolean getBoolean( CommandParameter parameter )
- throws ScmException
- {
- return Boolean.valueOf( getString( parameter ) ).booleanValue();
+ public boolean getBoolean(CommandParameter parameter) throws ScmException {
+ return Boolean.valueOf(getString(parameter)).booleanValue();
}
/**
@@ -211,10 +186,9 @@ public class CommandParameters
* @return The parameter value as a boolean
* @throws ScmException if the parameter doesn't exist
*/
- public boolean getBoolean( CommandParameter parameter, boolean defaultValue )
- throws ScmException
- {
- return Boolean.valueOf( getString( parameter, Boolean.toString( defaultValue ) ) ).booleanValue();
+ public boolean getBoolean(CommandParameter parameter, boolean defaultValue) throws ScmException {
+ return Boolean.valueOf(getString(parameter, Boolean.toString(defaultValue)))
+ .booleanValue();
}
// ----------------------------------------------------------------------
@@ -228,10 +202,8 @@ public class CommandParameters
* @return The parameter value as a ScmVersion
* @throws ScmException if the parameter doesn't exist
*/
- public ScmVersion getScmVersion( CommandParameter parameter )
- throws ScmException
- {
- return (ScmVersion) getObject( ScmVersion.class, parameter );
+ public ScmVersion getScmVersion(CommandParameter parameter) throws ScmException {
+ return (ScmVersion) getObject(ScmVersion.class, parameter);
}
/**
@@ -242,10 +214,8 @@ public class CommandParameters
* @return The parameter value as a ScmVersion
* @throws ScmException if the parameter doesn't exist
*/
- public ScmVersion getScmVersion( CommandParameter parameter, ScmVersion defaultValue )
- throws ScmException
- {
- return (ScmVersion) getObject( ScmVersion.class, parameter, defaultValue );
+ public ScmVersion getScmVersion(CommandParameter parameter, ScmVersion defaultValue) throws ScmException {
+ return (ScmVersion) getObject(ScmVersion.class, parameter, defaultValue);
}
/**
@@ -255,10 +225,8 @@ public class CommandParameters
* @param scmVersion The tbranch/tag/revision
* @throws ScmException if the parameter already exist
*/
- public void setScmVersion( CommandParameter parameter, ScmVersion scmVersion )
- throws ScmException
- {
- setObject( parameter, scmVersion );
+ public void setScmVersion(CommandParameter parameter, ScmVersion scmVersion) throws ScmException {
+ setObject(parameter, scmVersion);
}
// ----------------------------------------------------------------------
@@ -270,10 +238,8 @@ public class CommandParameters
* @return an array of files
* @throws ScmException if any
*/
- public File[] getFileArray( CommandParameter parameter )
- throws ScmException
- {
- return (File[]) getObject( File[].class, parameter );
+ public File[] getFileArray(CommandParameter parameter) throws ScmException {
+ return (File[]) getObject(File[].class, parameter);
}
/**
@@ -282,35 +248,25 @@ public class CommandParameters
* @return an array of files
* @throws ScmException if any
*/
- public File[] getFileArray( CommandParameter parameter, File[] defaultValue )
- throws ScmException
- {
- return (File[]) getObject( File[].class, parameter, defaultValue );
+ public File[] getFileArray(CommandParameter parameter, File[] defaultValue) throws ScmException {
+ return (File[]) getObject(File[].class, parameter, defaultValue);
}
-
- public ScmTagParameters getScmTagParameters( CommandParameter parameter )
- throws ScmException
- {
- return (ScmTagParameters) getObject( ScmTagParameters.class, parameter, new ScmTagParameters() );
+ public ScmTagParameters getScmTagParameters(CommandParameter parameter) throws ScmException {
+ return (ScmTagParameters) getObject(ScmTagParameters.class, parameter, new ScmTagParameters());
}
- public void setScmTagParameters( CommandParameter parameter, ScmTagParameters scmTagParameters )
- throws ScmException
- {
- setObject( parameter, scmTagParameters );
+ public void setScmTagParameters(CommandParameter parameter, ScmTagParameters scmTagParameters) throws ScmException {
+ setObject(parameter, scmTagParameters);
}
- public void setScmBranchParameters( CommandParameter parameter, ScmBranchParameters scmBranchParameters )
- throws ScmException
- {
- setObject( parameter, scmBranchParameters );
+ public void setScmBranchParameters(CommandParameter parameter, ScmBranchParameters scmBranchParameters)
+ throws ScmException {
+ setObject(parameter, scmBranchParameters);
}
- public ScmBranchParameters getScmBranchParameters( CommandParameter parameter )
- throws ScmException
- {
- return (ScmBranchParameters) getObject( ScmBranchParameters.class, parameter, new ScmBranchParameters() );
+ public ScmBranchParameters getScmBranchParameters(CommandParameter parameter) throws ScmException {
+ return (ScmBranchParameters) getObject(ScmBranchParameters.class, parameter, new ScmBranchParameters());
}
// ----------------------------------------------------------------------
@@ -325,14 +281,11 @@ public class CommandParameters
* @return The parameter value
* @throws ScmException if the parameter doesn't exist
*/
- private Object getObject( Class<?> clazz, CommandParameter parameter )
- throws ScmException
- {
- Object object = getObject( clazz, parameter, null );
-
- if ( object == null )
- {
- throw new ScmException( "Missing parameter: '" + parameter.getName() + "'." );
+ private Object getObject(Class<?> clazz, CommandParameter parameter) throws ScmException {
+ Object object = getObject(clazz, parameter, null);
+
+ if (object == null) {
+ throw new ScmException("Missing parameter: '" + parameter.getName() + "'.");
}
return object;
@@ -347,21 +300,16 @@ public class CommandParameters
* @return The parameter value
* @throws ScmException if the defaultValue is in the wrong type
*/
- private Object getObject( Class<?> clazz, CommandParameter parameter, Object defaultValue )
- throws ScmException
- {
- Object object = parameters.get( parameter.getName() );
+ private Object getObject(Class<?> clazz, CommandParameter parameter, Object defaultValue) throws ScmException {
+ Object object = parameters.get(parameter.getName());
- if ( object == null )
- {
+ if (object == null) {
return defaultValue;
}
- if ( clazz != null && !clazz.isAssignableFrom( object.getClass() ) )
- {
- throw new ScmException(
- "Wrong parameter type for '" + parameter.getName() + ". " + "Expected: " + clazz.getName() + ", got: "
- + object.getClass().getName() );
+ if (clazz != null && !clazz.isAssignableFrom(object.getClass())) {
+ throw new ScmException("Wrong parameter type for '" + parameter.getName() + ". " + "Expected: "
+ + clazz.getName() + ", got: " + object.getClass().getName());
}
return object;
@@ -374,17 +322,14 @@ public class CommandParameters
* @param value The parameter value
* @throws ScmException if the parameter already exist
*/
- private void setObject( CommandParameter parameter, Object value )
- throws ScmException
- {
- Object object = getObject( null, parameter, null );
-
- if ( object != null )
- {
- throw new ScmException( "The parameter is already set: " + parameter.getName() );
+ private void setObject(CommandParameter parameter, Object value) throws ScmException {
+ Object object = getObject(null, parameter, null);
+
+ if (object != null) {
+ throw new ScmException("The parameter is already set: " + parameter.getName());
}
- parameters.put( parameter.getName(), value );
+ parameters.put(parameter.getName(), value);
}
/**
@@ -392,8 +337,7 @@ public class CommandParameters
*
* @param parameter to remove
*/
- public void remove( CommandParameter parameter )
- {
- parameters.remove( parameter.getName() );
+ public void remove(CommandParameter parameter) {
+ parameters.remove(parameter.getName());
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/NoSuchCommandScmException.java b/maven-scm-api/src/main/java/org/apache/maven/scm/NoSuchCommandScmException.java
index d96f22140..b9e743a0b 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/NoSuchCommandScmException.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/NoSuchCommandScmException.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,22 +16,20 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public class NoSuchCommandScmException
- extends ScmException
-{
+public class NoSuchCommandScmException extends ScmException {
static final long serialVersionUID = 5789657554664703221L;
private String commandName;
- public NoSuchCommandScmException( String commandName )
- {
- super( "No such command '" + commandName + "'." );
+ public NoSuchCommandScmException(String commandName) {
+ super("No such command '" + commandName + "'.");
}
/**
@@ -41,8 +37,7 @@ public class NoSuchCommandScmException
*
* @return The command name
*/
- public String getCommandName()
- {
+ public String getCommandName() {
return commandName;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranch.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranch.java
index 9c8704a70..690b3ba3b 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranch.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranch.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,27 +16,24 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class ScmBranch
- extends AbstractScmVersion
-{
+public class ScmBranch extends AbstractScmVersion {
private static final long serialVersionUID = 6305050785257168739L;
/** {@inheritDoc} */
- public String getType()
- {
+ public String getType() {
return "Branch";
}
/**
* @param name the branch name
*/
- public ScmBranch( String name )
- {
- super( name );
+ public ScmBranch(String name) {
+ super(name);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranchParameters.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranchParameters.java
index 06d374583..f035dec43 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranchParameters.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranchParameters.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
@@ -25,9 +24,7 @@ import java.io.Serializable;
* @author Olivier Lamy
* @since 1.2
*/
-public class ScmBranchParameters
- implements Serializable
-{
+public class ScmBranchParameters implements Serializable {
private static final long serialVersionUID = 7241536408630608707L;
private String message;
@@ -38,59 +35,48 @@ public class ScmBranchParameters
private String scmRevision;
- public ScmBranchParameters()
- {
+ public ScmBranchParameters() {
this.remoteBranching = false;
this.pinExternals = false;
}
- public ScmBranchParameters( String message )
- {
+ public ScmBranchParameters(String message) {
this.message = message;
}
- public String getMessage()
- {
+ public String getMessage() {
return message;
}
- public void setMessage( String message )
- {
+ public void setMessage(String message) {
this.message = message;
}
- public String getScmRevision()
- {
+ public String getScmRevision() {
return scmRevision;
}
- public void setScmRevision( String scmRevision )
- {
+ public void setScmRevision(String scmRevision) {
this.scmRevision = scmRevision;
}
- public boolean isRemoteBranching()
- {
+ public boolean isRemoteBranching() {
return remoteBranching;
}
- public void setRemoteBranching( boolean remoteBranching )
- {
+ public void setRemoteBranching(boolean remoteBranching) {
this.remoteBranching = remoteBranching;
}
- public boolean isPinExternals()
- {
+ public boolean isPinExternals() {
return pinExternals;
}
- public void setPinExternals( boolean pinExternals )
- {
+ public void setPinExternals(boolean pinExternals) {
this.pinExternals = pinExternals;
}
- public String toString()
- {
+ public String toString() {
return "[" + scmRevision + "] " + message;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmException.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmException.java
index 812641f3e..fe188eb92 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmException.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmException.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,30 +16,27 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
/**
* @author <a href="evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class ScmException
- extends Exception
-{
+public class ScmException extends Exception {
static final long serialVersionUID = 5041965569154385323L;
/**
* @param message the message could be null
*/
- public ScmException( String message )
- {
- super( message );
+ public ScmException(String message) {
+ super(message);
}
/**
* @param message the message could be null
* @param cause the cause could be null
*/
- public ScmException( String message, Throwable cause )
- {
- super( message, cause );
+ public ScmException(String message, Throwable cause) {
+ super(message, cause);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java
index d677a0c16..04ee15f41 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
@@ -25,9 +24,7 @@ import java.io.Serializable;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public class ScmFile
- implements Comparable<ScmFile>, Serializable
-{
+public class ScmFile implements Comparable<ScmFile>, Serializable {
private static final long serialVersionUID = -9133015730693522690L;
private String path;
@@ -38,8 +35,7 @@ public class ScmFile
* @param path The relative path of the file, should <b>never</b> start with any {@link java.io.File#separator}.
* @param status The file status
*/
- public ScmFile( String path, ScmFileStatus status )
- {
+ public ScmFile(String path, ScmFileStatus status) {
this.path = path;
this.status = status;
@@ -47,19 +43,17 @@ public class ScmFile
/**
* Returns the relative path of the file.
- *
+ *
* @return the file path
*/
- public String getPath()
- {
+ public String getPath() {
return path;
}
/**
* @return The file status
*/
- public ScmFileStatus getStatus()
- {
+ public ScmFileStatus getStatus() {
return status;
}
@@ -68,9 +62,8 @@ public class ScmFile
// ----------------------------------------------------------------------
/** {@inheritDoc} */
- public int compareTo( ScmFile other )
- {
- return other.getPath().compareTo( path );
+ public int compareTo(ScmFile other) {
+ return other.getPath().compareTo(path);
}
// ----------------------------------------------------------------------
@@ -78,25 +71,21 @@ public class ScmFile
// ----------------------------------------------------------------------
/** {@inheritDoc} */
- public boolean equals( Object other )
- {
- if ( !( other instanceof ScmFile ) )
- {
+ public boolean equals(Object other) {
+ if (!(other instanceof ScmFile)) {
return false;
}
- return ( (ScmFile) other ).getPath().equals( path );
+ return ((ScmFile) other).getPath().equals(path);
}
/** {@inheritDoc} */
- public int hashCode()
- {
+ public int hashCode() {
return path.hashCode();
}
/** {@inheritDoc} */
- public String toString()
- {
+ public String toString() {
return "[" + path + ":" + status + "]";
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java
index 8401c844b..6c02d7dbe 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.File;
import java.io.IOException;
@@ -37,15 +36,13 @@ import org.codehaus.plexus.util.StringUtils;
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*
*/
-public class ScmFileSet
- implements Serializable
-{
+public class ScmFileSet implements Serializable {
private static final long serialVersionUID = -5978597349974797556L;
private static final String DELIMITER = ",";
/** @see DirectoryScanner#DEFAULTEXCLUDES */
- private static final String DEFAULT_EXCLUDES = StringUtils.join( DirectoryScanner.DEFAULTEXCLUDES, DELIMITER );
+ private static final String DEFAULT_EXCLUDES = StringUtils.join(DirectoryScanner.DEFAULTEXCLUDES, DELIMITER);
private final File basedir;
@@ -63,9 +60,8 @@ public class ScmFileSet
*
* @param basedir directory files in the set are relative to
*/
- public ScmFileSet( File basedir )
- {
- this( basedir, new ArrayList<File>( 0 ) );
+ public ScmFileSet(File basedir) {
+ this(basedir, new ArrayList<File>(0));
}
/**
@@ -74,9 +70,8 @@ public class ScmFileSet
* @param basedir directory file is relative to
* @param file file that the set will contain, has to be relative to basedir
*/
- public ScmFileSet( File basedir, File file )
- {
- this( basedir, new File[]{file} );
+ public ScmFileSet(File basedir, File file) {
+ this(basedir, new File[] {file});
}
/**
@@ -89,20 +84,15 @@ public class ScmFileSet
* if null DEFAULT_EXCLUDES is used, else DEFAULT_EXCLUDES is added.
* @throws IOException if any
*/
- public ScmFileSet( File basedir, String includes, String excludes )
- throws IOException
- {
+ public ScmFileSet(File basedir, String includes, String excludes) throws IOException {
this.basedir = basedir;
- if ( excludes != null && excludes.length() > 0 )
- {
+ if (excludes != null && excludes.length() > 0) {
excludes += DELIMITER + DEFAULT_EXCLUDES;
- }
- else
- {
+ } else {
excludes = DEFAULT_EXCLUDES;
}
- this.files = FileUtils.getFiles( basedir, includes, excludes, false );
+ this.files = FileUtils.getFiles(basedir, includes, excludes, false);
this.includes = includes;
this.excludes = excludes;
}
@@ -115,10 +105,8 @@ public class ScmFileSet
* @throws IOException if any
* @since 1.0
*/
- public ScmFileSet( File basedir, String includes )
- throws IOException
- {
- this( basedir, includes, null );
+ public ScmFileSet(File basedir, String includes) throws IOException {
+ this(basedir, includes, null);
}
/**
@@ -128,9 +116,8 @@ public class ScmFileSet
* @param files files that the set will contain, have to be relative to basedir
* @deprecated use ScmFileSet( File, List )
*/
- public ScmFileSet( File basedir, File[] files )
- {
- this( basedir, Arrays.asList( files ) );
+ public ScmFileSet(File basedir, File[] files) {
+ this(basedir, Arrays.asList(files));
}
/**
@@ -139,16 +126,13 @@ public class ScmFileSet
* @param basedir directory files are relative to
* @param files list of File objects, files that the set will contain, have to be relative to basedir
*/
- public ScmFileSet( File basedir, List<File> files )
- {
- if ( basedir == null )
- {
- throw new NullPointerException( "basedir must not be null" );
+ public ScmFileSet(File basedir, List<File> files) {
+ if (basedir == null) {
+ throw new NullPointerException("basedir must not be null");
}
- if ( files == null )
- {
- throw new NullPointerException( "files must not be null" );
+ if (files == null) {
+ throw new NullPointerException("files must not be null");
}
this.basedir = basedir;
@@ -160,8 +144,7 @@ public class ScmFileSet
*
* @return base directory
*/
- public File getBasedir()
- {
+ public File getBasedir() {
return basedir;
}
@@ -171,9 +154,8 @@ public class ScmFileSet
* @return files in this set
* @deprecated use getFileList() instead
*/
- public File[] getFiles()
- {
- return this.files.toArray( new File[this.files.size()] );
+ public File[] getFiles() {
+ return this.files.toArray(new File[this.files.size()]);
}
/**
@@ -181,32 +163,26 @@ public class ScmFileSet
*
* @return List of File objects
*/
- public List<File> getFileList()
- {
+ public List<File> getFileList() {
return this.files;
}
-
/**
* @return the includes files as a comma separated string
*/
- public String getIncludes()
- {
+ public String getIncludes() {
return this.includes;
}
-
/**
* @return the excludes files as a comma separated string
*/
- public String getExcludes()
- {
+ public String getExcludes() {
return this.excludes;
}
/** {@inheritDoc} */
- public String toString()
- {
+ public String toString() {
return "basedir = " + basedir + "; files = " + files;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java
index 6a3a8720f..3ca51b704 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
@@ -35,106 +34,102 @@ import java.io.Serializable;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public final class ScmFileStatus
- implements Serializable
-{
+public final class ScmFileStatus implements Serializable {
private static final long serialVersionUID = -7840223279162817915L;
/**
* File is added to the working tree and does not yet exist in the repository
*/
- public static final ScmFileStatus ADDED = new ScmFileStatus( "added" );
+ public static final ScmFileStatus ADDED = new ScmFileStatus("added");
/**
* File is removed from the working tree thus not revisioned anymore.<br>
* The file is still present in the repository.<br>
* The file could be deleted from the filesystem depending on the provider.
*/
- public static final ScmFileStatus DELETED = new ScmFileStatus( "deleted" );
+ public static final ScmFileStatus DELETED = new ScmFileStatus("deleted");
/**
* The file has been modified in the working tree.
*/
- public static final ScmFileStatus MODIFIED = new ScmFileStatus( "modified" );
+ public static final ScmFileStatus MODIFIED = new ScmFileStatus("modified");
/**
* The file has been renamed or moved in the working tree.
* @since 1.7
*/
- public static final ScmFileStatus RENAMED = new ScmFileStatus( "renamed" );
+ public static final ScmFileStatus RENAMED = new ScmFileStatus("renamed");
/**
* The file has been copied in the working tree.
* @since 1.7
*/
- public static final ScmFileStatus COPIED = new ScmFileStatus( "copied" );
+ public static final ScmFileStatus COPIED = new ScmFileStatus("copied");
/**
* The file is missing in the working tree.
*/
- public static final ScmFileStatus MISSING = new ScmFileStatus( "missing" );
+ public static final ScmFileStatus MISSING = new ScmFileStatus("missing");
/**
* File from working tree is checked into the repository
*/
- public static final ScmFileStatus CHECKED_IN = new ScmFileStatus( "checked-in" );
+ public static final ScmFileStatus CHECKED_IN = new ScmFileStatus("checked-in");
/**
* File is checked out from the repository and into the working tree
*/
- public static final ScmFileStatus CHECKED_OUT = new ScmFileStatus( "checked-out" );
+ public static final ScmFileStatus CHECKED_OUT = new ScmFileStatus("checked-out");
/**
* The file in the working tree has differences to the one in repository that
* conflicts ie. it cannot automatically be merged.
*/
- public static final ScmFileStatus CONFLICT = new ScmFileStatus( "conflict" );
+ public static final ScmFileStatus CONFLICT = new ScmFileStatus("conflict");
/**
* The file in the working tree has been updated with changes from the repository.
*/
- public static final ScmFileStatus PATCHED = new ScmFileStatus( "patched" );
+ public static final ScmFileStatus PATCHED = new ScmFileStatus("patched");
/**
* The file is added, removed or updated from the repository, thus its
* up-to-date with the version in the repository. See also isUpdate()
*/
- public static final ScmFileStatus UPDATED = new ScmFileStatus( "updated" );
+ public static final ScmFileStatus UPDATED = new ScmFileStatus("updated");
/**
* The file is part of a tag.
*/
- public static final ScmFileStatus TAGGED = new ScmFileStatus( "tagged" );
+ public static final ScmFileStatus TAGGED = new ScmFileStatus("tagged");
/**
* The file is locked.
*/
- public static final ScmFileStatus LOCKED = new ScmFileStatus( "locked" );
+ public static final ScmFileStatus LOCKED = new ScmFileStatus("locked");
/**
* The file is in the working tree but is not versioned and not ignored either.
*/
- public static final ScmFileStatus UNKNOWN = new ScmFileStatus( "unknown" );
+ public static final ScmFileStatus UNKNOWN = new ScmFileStatus("unknown");
/**
* @since 1.5
* The file is being edited
*/
- public static final ScmFileStatus EDITED = new ScmFileStatus( "edit" );
-
+ public static final ScmFileStatus EDITED = new ScmFileStatus("edit");
+
/**
* The status name
*/
private final String name;
- private ScmFileStatus( String name )
- {
+ private ScmFileStatus(String name) {
this.name = name;
}
/** {@inheritDoc} */
- public String toString()
- {
+ public String toString() {
return name;
}
@@ -144,8 +139,7 @@ public final class ScmFileStatus
*
* @return true on changes in the working tree or if the file is unknown.
*/
- public boolean isStatus()
- {
+ public boolean isStatus() {
return this == UNKNOWN || isDiff();
}
@@ -154,16 +148,14 @@ public final class ScmFileStatus
*
* @return true on changes in the working tree
*/
- public boolean isDiff()
- {
+ public boolean isDiff() {
return this == ADDED || this == DELETED || this == MODIFIED;
}
/**
* @return true if the file was part of a transaction with the repository.
*/
- public boolean isTransaction()
- {
+ public boolean isTransaction() {
return this == CHECKED_IN || this == CHECKED_OUT || this == LOCKED || this == TAGGED || isUpdate();
}
@@ -176,8 +168,7 @@ public final class ScmFileStatus
*
* @return true if the status is conflict, updated or patched.
*/
- public boolean isUpdate()
- {
+ public boolean isUpdate() {
return this == CONFLICT || this == UPDATED || this == PATCHED;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRequest.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRequest.java
index 9541a03b4..2ac10a1d8 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRequest.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRequest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,11 +16,12 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
-
-import org.apache.maven.scm.repository.ScmRepository;
+package org.apache.maven.scm;
import java.io.Serializable;
+import org.apache.maven.scm.repository.ScmRepository;
+
/**
* Base class for SCM wrapped parameters.
* Unlike {@link ScmResult}, this is mutable, as its use requires more flexibility when configuring the call.
@@ -35,9 +34,7 @@ import java.io.Serializable;
* @author Petr Kozelka
* @since 1.8
*/
-public class ScmRequest
- implements Serializable
-{
+public class ScmRequest implements Serializable {
private static final long serialVersionUID = 20120620L;
private ScmRepository scmRepository;
@@ -46,32 +43,27 @@ public class ScmRequest
protected final CommandParameters parameters = new CommandParameters();
- public ScmRequest()
- {
+ public ScmRequest() {
// no op
}
- public ScmRequest( ScmRepository scmRepository, ScmFileSet scmFileSet )
- {
+ public ScmRequest(ScmRepository scmRepository, ScmFileSet scmFileSet) {
this.scmRepository = scmRepository;
this.scmFileSet = scmFileSet;
}
- public ScmRepository getScmRepository()
- {
+ public ScmRepository getScmRepository() {
return scmRepository;
}
/**
* @param scmRepository the source control system
*/
- public void setScmRepository( ScmRepository scmRepository )
- {
+ public void setScmRepository(ScmRepository scmRepository) {
this.scmRepository = scmRepository;
}
- public ScmFileSet getScmFileSet()
- {
+ public ScmFileSet getScmFileSet() {
return scmFileSet;
}
@@ -80,8 +72,7 @@ public class ScmRequest
* {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param scmFileSet working copy and its selected files
*/
- public void setScmFileSet( ScmFileSet scmFileSet )
- {
+ public void setScmFileSet(ScmFileSet scmFileSet) {
this.scmFileSet = scmFileSet;
}
@@ -90,8 +81,7 @@ public class ScmRequest
* These parameters are usually translated to commandline options or arguments.
* @return command parameters
*/
- public CommandParameters getCommandParameters()
- {
+ public CommandParameters getCommandParameters() {
return parameters;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java
index aefd9a555..229675091 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
import java.util.regex.Matcher;
@@ -27,9 +26,7 @@ import java.util.regex.Pattern;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public class ScmResult
- implements Serializable
-{
+public class ScmResult implements Serializable {
private static final long serialVersionUID = 7037918334820621525L;
private final boolean success;
@@ -40,11 +37,10 @@ public class ScmResult
private final String commandLine;
-
public static final String PASSWORD_PLACE_HOLDER = "********";
- //works for SVN and git
- private Pattern patternForUserColonPasswordAtHost = Pattern.compile( "^.*:(.*)@.*$", Pattern.DOTALL );
+ // works for SVN and git
+ private Pattern patternForUserColonPasswordAtHost = Pattern.compile("^.*:(.*)@.*$", Pattern.DOTALL);
/**
* Copy constructor.
@@ -54,18 +50,16 @@ public class ScmResult
*
* @param scmResult not null
*/
- public ScmResult( ScmResult scmResult )
- {
+ public ScmResult(ScmResult scmResult) {
this.commandLine = scmResult.commandLine;
this.providerMessage = scmResult.providerMessage;
- this.commandOutput = masked( scmResult.commandOutput );
+ this.commandOutput = masked(scmResult.commandOutput);
this.success = scmResult.success;
}
-
/**
* ScmResult contructor.
*
@@ -74,13 +68,12 @@ public class ScmResult
* @param commandOutput The command output of the scm tool
* @param success True if the command is in success
*/
- public ScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
+ public ScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
this.commandLine = commandLine;
this.providerMessage = providerMessage;
- this.commandOutput = masked( commandOutput );
+ this.commandOutput = masked(commandOutput);
this.success = success;
}
@@ -88,8 +81,7 @@ public class ScmResult
/**
* @return True if the command was in success
*/
- public boolean isSuccess()
- {
+ public boolean isSuccess() {
return success;
}
@@ -97,8 +89,7 @@ public class ScmResult
* @return A message from the provider. On success this would typically be null or
* an empty string. On failure it would be the error message from the provider
*/
- public String getProviderMessage()
- {
+ public String getProviderMessage() {
return providerMessage;
}
@@ -106,31 +97,25 @@ public class ScmResult
* @return Output from Std.Out from the provider during execution
* of the command that resulted in this
*/
- public String getCommandOutput()
- {
+ public String getCommandOutput() {
return commandOutput;
}
/**
* @return The actual provider specific command that resulted in this
*/
- public String getCommandLine()
- {
+ public String getCommandLine() {
return commandLine;
}
-
- private String masked( String commandOutput )
- {
- if ( null != commandOutput )
- {
- final Matcher passwordMatcher = patternForUserColonPasswordAtHost.matcher( commandOutput );
- if ( passwordMatcher.find() )
- {
+ private String masked(String commandOutput) {
+ if (null != commandOutput) {
+ final Matcher passwordMatcher = patternForUserColonPasswordAtHost.matcher(commandOutput);
+ if (passwordMatcher.find()) {
// clear password
- final String clearPassword = passwordMatcher.group( 1 );
+ final String clearPassword = passwordMatcher.group(1);
// to be replaced in output by stars
- commandOutput = commandOutput.replace( clearPassword, PASSWORD_PLACE_HOLDER );
+ commandOutput = commandOutput.replace(clearPassword, PASSWORD_PLACE_HOLDER);
}
}
return commandOutput;
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java
index 76b70eceb..9d8983aa0 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,24 +16,21 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class ScmRevision
- extends AbstractScmVersion
-{
+public class ScmRevision extends AbstractScmVersion {
private static final long serialVersionUID = 3831426256650754391L;
/** {@inheritDoc} */
- public String getType()
- {
+ public String getType() {
return "Revision";
}
- public ScmRevision( String name )
- {
- super( name );
+ public ScmRevision(String name) {
+ super(name);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTag.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTag.java
index 162b592dd..3b5be6546 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTag.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTag.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,27 +16,24 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class ScmTag
- extends ScmBranch
-{
+public class ScmTag extends ScmBranch {
private static final long serialVersionUID = 2286671802987769257L;
/** {@inheritDoc} */
- public String getType()
- {
+ public String getType() {
return "Tag";
}
/**
* @param name not null
*/
- public ScmTag( String name )
- {
- super( name );
+ public ScmTag(String name) {
+ super(name);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTagParameters.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTagParameters.java
index 12cea80b2..c3f7dcf51 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTagParameters.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTagParameters.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
@@ -25,9 +24,7 @@ import java.io.Serializable;
* @author Olivier Lamy
* @since 1.2
*/
-public class ScmTagParameters
- implements Serializable
-{
+public class ScmTagParameters implements Serializable {
private static final long serialVersionUID = 7241536408630606807L;
private String message;
@@ -40,70 +37,57 @@ public class ScmTagParameters
private String scmRevision;
- public ScmTagParameters()
- {
+ public ScmTagParameters() {
this.remoteTagging = false;
this.pinExternals = false;
this.sign = false;
}
- public ScmTagParameters( String message )
- {
+ public ScmTagParameters(String message) {
this.message = message;
}
- public String getMessage()
- {
+ public String getMessage() {
return message;
}
- public void setMessage( String message )
- {
+ public void setMessage(String message) {
this.message = message;
}
- public boolean isRemoteTagging()
- {
+ public boolean isRemoteTagging() {
return remoteTagging;
}
- public void setRemoteTagging( boolean remoteTagging )
- {
+ public void setRemoteTagging(boolean remoteTagging) {
this.remoteTagging = remoteTagging;
}
- public boolean isPinExternals()
- {
+ public boolean isPinExternals() {
return pinExternals;
}
- public void setPinExternals( boolean pinExternals )
- {
+ public void setPinExternals(boolean pinExternals) {
this.pinExternals = pinExternals;
}
- public boolean isSign()
- {
+ public boolean isSign() {
return sign;
}
- public void setSign( boolean sign )
- {
+ public void setSign(boolean sign) {
this.sign = sign;
}
- public String getScmRevision()
- {
+ public String getScmRevision() {
return scmRevision;
}
- public void setScmRevision( String scmRevision )
- {
+ public void setScmRevision(String scmRevision) {
this.scmRevision = scmRevision;
}
- public String toString()
- {
+ public String toString() {
return "[" + scmRevision + "] " + message;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmUntagParameters.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmUntagParameters.java
index cda8ab3f4..099ce7460 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmUntagParameters.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmUntagParameters.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
import java.io.Serializable;
@@ -26,9 +25,7 @@ import java.io.Serializable;
*
* @since 1.11.2
*/
-public class ScmUntagParameters
- implements Serializable
-{
+public class ScmUntagParameters implements Serializable {
/**
* serial version id
*/
@@ -50,8 +47,7 @@ public class ScmUntagParameters
* @param tag tag id
* @param message commit message
*/
- public ScmUntagParameters( String tag, String message )
- {
+ public ScmUntagParameters(String tag, String message) {
this.tag = tag;
this.message = message;
}
@@ -61,8 +57,7 @@ public class ScmUntagParameters
*
* @return tag id
*/
- public String getTag()
- {
+ public String getTag() {
return tag;
}
@@ -71,8 +66,7 @@ public class ScmUntagParameters
*
* @param tag tag id
*/
- public void setTag( String tag )
- {
+ public void setTag(String tag) {
this.tag = tag;
}
@@ -81,8 +75,7 @@ public class ScmUntagParameters
*
* @return commit message
*/
- public String getMessage()
- {
+ public String getMessage() {
return message;
}
@@ -91,14 +84,12 @@ public class ScmUntagParameters
*
* @param message commit message
*/
- public void setMessage( String message )
- {
+ public void setMessage(String message) {
this.message = message;
}
@Override
- public String toString()
- {
+ public String toString() {
return ScmUntagParameters.class.getSimpleName() + " [tag=" + tag + ", message=" + message + "]";
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmVersion.java b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmVersion.java
index f8bc9747f..9503c044a 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/ScmVersion.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/ScmVersion.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,13 +16,13 @@ package org.apache.maven.scm;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public interface ScmVersion
-{
+public interface ScmVersion {
/**
* @return the Version type like branch
*/
@@ -38,5 +36,5 @@ public interface ScmVersion
/**
* @param name new Version name could be null
*/
- void setName( String name );
+ void setName(String name);
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/AbstractCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/AbstractCommand.java
index 5dbceea3c..cb12be3ca 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/AbstractCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/AbstractCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command;
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmException;
@@ -32,36 +31,27 @@ import org.slf4j.LoggerFactory;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public abstract class AbstractCommand
- implements Command
-{
- protected Logger logger = LoggerFactory.getLogger( getClass() );
+public abstract class AbstractCommand implements Command {
+ protected Logger logger = LoggerFactory.getLogger(getClass());
- protected abstract ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException;
+ protected abstract ScmResult executeCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException;
/** {@inheritDoc} */
- public final ScmResult execute( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- if ( repository == null )
- {
- throw new NullPointerException( "repository cannot be null" );
+ public final ScmResult execute(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ if (repository == null) {
+ throw new NullPointerException("repository cannot be null");
}
- if ( fileSet == null )
- {
- throw new NullPointerException( "fileSet cannot be null" );
+ if (fileSet == null) {
+ throw new NullPointerException("fileSet cannot be null");
}
- try
- {
- return executeCommand( repository, fileSet, parameters );
- }
- catch ( Exception ex )
- {
- throw new ScmException( "Exception while executing SCM command.", ex );
+ try {
+ return executeCommand(repository, fileSet, parameters);
+ } catch (Exception ex) {
+ throw new ScmException("Exception while executing SCM command.", ex);
}
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/Command.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/Command.java
index 47cd10477..7debbf0bd 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/Command.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/Command.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command;
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmException;
@@ -30,8 +29,7 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public interface Command
-{
+public interface Command {
/** Plexus component key */
String ROLE = Command.class.getName();
@@ -42,6 +40,6 @@ public interface Command
* @return the result object
* @throws ScmException if any
*/
- ScmResult execute( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException;
+ ScmResult execute(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException;
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/add/AbstractAddCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/add/AbstractAddCommand.java
index 4a65bb2a5..8553d6da6 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/add/AbstractAddCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/add/AbstractAddCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.add;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.add;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.add;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.add;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -31,19 +30,17 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public abstract class AbstractAddCommand
- extends AbstractCommand
-{
- protected abstract ScmResult executeAddCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- String message, boolean binary )
- throws ScmException;
+public abstract class AbstractAddCommand extends AbstractCommand {
+ protected abstract ScmResult executeAddCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, String message, boolean binary) throws ScmException;
/** {@inheritDoc} */
- protected ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- return executeAddCommand( repository, fileSet, parameters.getString( CommandParameter.MESSAGE, "no message" ),
- parameters.getBoolean( CommandParameter.BINARY ) );
+ protected ScmResult executeCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
+ return executeAddCommand(
+ repository,
+ fileSet,
+ parameters.getString(CommandParameter.MESSAGE, "no message"),
+ parameters.getBoolean(CommandParameter.BINARY));
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/add/AddScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/add/AddScmResult.java
index 507dc1eea..ade880aa5 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/add/AddScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/add/AddScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.add;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.add;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.add;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.add;
import java.util.ArrayList;
import java.util.List;
@@ -31,39 +30,32 @@ import org.apache.maven.scm.ScmResult;
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*
*/
-public class AddScmResult
- extends ScmResult
-{
+public class AddScmResult extends ScmResult {
private static final long serialVersionUID = 1L;
-
+
private List<ScmFile> addedFiles;
- public AddScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public AddScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
- addedFiles = new ArrayList<ScmFile>( 0 );
+ addedFiles = new ArrayList<ScmFile>(0);
}
- public AddScmResult( String commandLine, List<ScmFile> addedFiles )
- {
- this( commandLine, null, null, true );
+ public AddScmResult(String commandLine, List<ScmFile> addedFiles) {
+ this(commandLine, null, null, true);
- if ( addedFiles == null )
- {
- throw new NullPointerException( "addedFiles can't be null" );
+ if (addedFiles == null) {
+ throw new NullPointerException("addedFiles can't be null");
}
this.addedFiles = addedFiles;
}
- public AddScmResult( List<ScmFile> addedFiles, ScmResult result )
- {
- super( result );
+ public AddScmResult(List<ScmFile> addedFiles, ScmResult result) {
+ super(result);
- if ( addedFiles == null )
- {
- throw new NullPointerException( "addedFiles can't be null" );
+ if (addedFiles == null) {
+ throw new NullPointerException("addedFiles can't be null");
}
this.addedFiles = addedFiles;
@@ -74,8 +66,7 @@ public class AddScmResult
*
* @return non null list of added files
*/
- public List<ScmFile> getAddedFiles()
- {
+ public List<ScmFile> getAddedFiles() {
return addedFiles;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/AbstractBlameCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/AbstractBlameCommand.java
index d66298fa2..763d82f96 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/AbstractBlameCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/AbstractBlameCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.blame;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.blame;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.blame;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.blame;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -31,21 +30,15 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author Evgeny Mandrikov
* @since 1.4
*/
-public abstract class AbstractBlameCommand
- extends AbstractCommand
-{
- public abstract BlameScmResult executeBlameCommand( ScmProviderRepository repo, ScmFileSet workingDirectory,
- String filename )
- throws ScmException;
+public abstract class AbstractBlameCommand extends AbstractCommand {
+ public abstract BlameScmResult executeBlameCommand(
+ ScmProviderRepository repo, ScmFileSet workingDirectory, String filename) throws ScmException;
- protected ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet workingDirectory,
- CommandParameters parameters )
- throws ScmException
- {
- String file = parameters.getString( CommandParameter.FILE );
+ protected ScmResult executeCommand(
+ ScmProviderRepository repository, ScmFileSet workingDirectory, CommandParameters parameters)
+ throws ScmException {
+ String file = parameters.getString(CommandParameter.FILE);
- return executeBlameCommand( repository, workingDirectory, file );
+ return executeBlameCommand(repository, workingDirectory, file);
}
-
-
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameLine.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameLine.java
index 0cba26cdf..9e9a6ebc1 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameLine.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameLine.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.blame;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.blame;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.blame;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.blame;
import java.io.Serializable;
import java.util.Date;
@@ -26,9 +25,7 @@ import java.util.Date;
* @author Evgeny Mandrikov
* @since 1.4
*/
-public class BlameLine
- implements Serializable
-{
+public class BlameLine implements Serializable {
private static final long serialVersionUID = 2675122069344705612L;
@@ -45,9 +42,8 @@ public class BlameLine
* @param revision of the commit
* @param author will also be used as committer identification
*/
- public BlameLine( Date date, String revision, String author )
- {
- this( date, revision, author, author );
+ public BlameLine(Date date, String revision, String author) {
+ this(date, revision, author, author);
}
/**
@@ -57,64 +53,51 @@ public class BlameLine
* @param author the person who wrote the line
* @param committer the person who committed the change
*/
- public BlameLine( Date date, String revision, String author, String committer )
- {
- setDate( date );
- setRevision( revision );
- setAuthor( author );
- setCommitter( committer );
+ public BlameLine(Date date, String revision, String author, String committer) {
+ setDate(date);
+ setRevision(revision);
+ setAuthor(author);
+ setCommitter(committer);
}
- public String getRevision()
- {
+ public String getRevision() {
return revision;
}
- public void setRevision( String revision )
- {
+ public void setRevision(String revision) {
this.revision = revision;
}
- public String getAuthor()
- {
+ public String getAuthor() {
return author;
}
- public void setAuthor( String author )
- {
+ public void setAuthor(String author) {
this.author = author;
}
- public String getCommitter()
- {
+ public String getCommitter() {
return committer;
}
- public void setCommitter( String committer )
- {
+ public void setCommitter(String committer) {
this.committer = committer;
}
/**
* @return the commit date
*/
- public Date getDate()
- {
- if ( date != null )
- {
+ public Date getDate() {
+ if (date != null) {
return (Date) date.clone();
}
return null;
}
- public void setDate( Date date )
- {
- if ( date != null )
- {
- this.date = new Date( date.getTime() );
- }
- else
- {
+ public void setDate(Date date) {
+ if (date != null) {
+ this.date = new Date(date.getTime());
+ } else {
this.date = null;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameScmRequest.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameScmRequest.java
index b8eec3fc3..318c6b37e 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameScmRequest.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameScmRequest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.blame;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.blame;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.blame;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.ScmException;
@@ -29,9 +28,7 @@ import org.apache.maven.scm.repository.ScmRepository;
* @author Olivier Lamy
* @since 1.8
*/
-public class BlameScmRequest
- extends ScmRequest
-{
+public class BlameScmRequest extends ScmRequest {
private static final long serialVersionUID = 8257038591897128936L;
/**
@@ -39,41 +36,29 @@ public class BlameScmRequest
*/
private boolean ignoreWhitespace;
-
- public BlameScmRequest( ScmRepository scmRepository, ScmFileSet scmFileSet )
- {
- super( scmRepository, scmFileSet );
+ public BlameScmRequest(ScmRepository scmRepository, ScmFileSet scmFileSet) {
+ super(scmRepository, scmFileSet);
}
- public void setFilename( String filename )
- throws ScmException
- {
- this.getCommandParameters().setString( CommandParameter.FILE, filename );
+ public void setFilename(String filename) throws ScmException {
+ this.getCommandParameters().setString(CommandParameter.FILE, filename);
}
- public String getFilename()
- throws ScmException
- {
- return this.getCommandParameters().getString( CommandParameter.FILE );
+ public String getFilename() throws ScmException {
+ return this.getCommandParameters().getString(CommandParameter.FILE);
}
- public boolean isIgnoreWhitespace()
- {
+ public boolean isIgnoreWhitespace() {
return ignoreWhitespace;
}
- public void setIgnoreWhitespace( boolean ignoreWhitespace )
- throws ScmException
- {
+ public void setIgnoreWhitespace(boolean ignoreWhitespace) throws ScmException {
this.ignoreWhitespace = ignoreWhitespace;
- if ( ignoreWhitespace )
- {
- this.getCommandParameters().setString( CommandParameter.IGNORE_WHITESPACE, "TRUE" );
- }
- else
- {
- this.getCommandParameters().setString( CommandParameter.IGNORE_WHITESPACE, "FALSE" );
+ if (ignoreWhitespace) {
+ this.getCommandParameters().setString(CommandParameter.IGNORE_WHITESPACE, "TRUE");
+ } else {
+ this.getCommandParameters().setString(CommandParameter.IGNORE_WHITESPACE, "FALSE");
}
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameScmResult.java
index ddbaf2ede..8db68a0b8 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/blame/BlameScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.blame;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.blame;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.blame;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.blame;
import java.util.List;
@@ -28,34 +27,28 @@ import org.apache.maven.scm.ScmResult;
* @author Olivier Lamy
* @since 1.4
*/
-public class BlameScmResult
- extends ScmResult
-{
+public class BlameScmResult extends ScmResult {
private static final long serialVersionUID = -3877526036464636595L;
private List<BlameLine> lines;
- public BlameScmResult( String commandLine, List<BlameLine> lines )
- {
- this( commandLine, null, null, true );
+ public BlameScmResult(String commandLine, List<BlameLine> lines) {
+ this(commandLine, null, null, true);
this.lines = lines;
}
- public BlameScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public BlameScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public BlameScmResult( List<BlameLine> lines, ScmResult scmResult )
- {
- super( scmResult );
+ public BlameScmResult(List<BlameLine> lines, ScmResult scmResult) {
+ super(scmResult);
this.lines = lines;
}
- public List<BlameLine> getLines()
- {
+ public List<BlameLine> getLines() {
return lines;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/branch/AbstractBranchCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/branch/AbstractBranchCommand.java
index 09fbf4d2e..b5a8cb0e1 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/branch/AbstractBranchCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/branch/AbstractBranchCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.branch;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.branch;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.branch;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.branch;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -34,13 +33,11 @@ import org.codehaus.plexus.util.StringUtils;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public abstract class AbstractBranchCommand
- extends AbstractCommand
-{
- protected abstract ScmResult executeBranchCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- String branchName, String message )
- throws ScmException;
-
+public abstract class AbstractBranchCommand extends AbstractCommand {
+ protected abstract ScmResult executeBranchCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, String branchName, String message)
+ throws ScmException;
+
/**
* default impl to provide backward comp
* @since 1.3
@@ -51,30 +48,29 @@ public abstract class AbstractBranchCommand
* @return TODO
* @throws ScmException if any
*/
- protected ScmResult executeBranchCommand( ScmProviderRepository repository, ScmFileSet fileSet, String branchName,
- ScmBranchParameters scmBranchParameters )
- throws ScmException
- {
- return executeBranchCommand( repository, fileSet, branchName, scmBranchParameters.getMessage() );
+ protected ScmResult executeBranchCommand(
+ ScmProviderRepository repository,
+ ScmFileSet fileSet,
+ String branchName,
+ ScmBranchParameters scmBranchParameters)
+ throws ScmException {
+ return executeBranchCommand(repository, fileSet, branchName, scmBranchParameters.getMessage());
}
/** {@inheritDoc} */
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- String branchName = parameters.getString( CommandParameter.BRANCH_NAME );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ String branchName = parameters.getString(CommandParameter.BRANCH_NAME);
ScmBranchParameters scmBranchParameters =
- parameters.getScmBranchParameters( CommandParameter.SCM_BRANCH_PARAMETERS );
-
- String message = parameters.getString( CommandParameter.MESSAGE, "[maven-scm] copy for branch " + branchName );
-
- if ( StringUtils.isBlank( scmBranchParameters.getMessage() ) && StringUtils.isNotBlank( message ) )
- {
- scmBranchParameters.setMessage( message );
+ parameters.getScmBranchParameters(CommandParameter.SCM_BRANCH_PARAMETERS);
+
+ String message = parameters.getString(CommandParameter.MESSAGE, "[maven-scm] copy for branch " + branchName);
+
+ if (StringUtils.isBlank(scmBranchParameters.getMessage()) && StringUtils.isNotBlank(message)) {
+ scmBranchParameters.setMessage(message);
}
-
- return executeBranchCommand( repository, fileSet, branchName, scmBranchParameters );
+
+ return executeBranchCommand(repository, fileSet, branchName, scmBranchParameters);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/branch/BranchScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/branch/BranchScmResult.java
index 7c0bcc912..493d24e76 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/branch/BranchScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/branch/BranchScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.branch;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.branch;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.branch;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.branch;
import java.util.List;
@@ -29,34 +28,28 @@ import org.apache.maven.scm.ScmResult;
* @author Olivier Lamy
*
*/
-public class BranchScmResult
- extends ScmResult
-{
+public class BranchScmResult extends ScmResult {
private static final long serialVersionUID = -4241972929129557932L;
private List<ScmFile> branchedFiles;
- public BranchScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public BranchScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public BranchScmResult( String commandLine, List<ScmFile> branchedFiles )
- {
- super( commandLine, null, null, true );
+ public BranchScmResult(String commandLine, List<ScmFile> branchedFiles) {
+ super(commandLine, null, null, true);
this.branchedFiles = branchedFiles;
}
- public BranchScmResult( List<ScmFile> branchedFiles, ScmResult result )
- {
- super( result );
+ public BranchScmResult(List<ScmFile> branchedFiles, ScmResult result) {
+ super(result);
this.branchedFiles = branchedFiles;
}
- public List<ScmFile> getBranchedFiles()
- {
+ public List<ScmFile> getBranchedFiles() {
return branchedFiles;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
index aeaae563e..1dd6f01cc 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.changelog;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.changelog;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,9 @@ package org.apache.maven.scm.command.changelog;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.changelog;
+
+import java.util.Date;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -29,111 +30,96 @@ import org.apache.maven.scm.ScmVersion;
import org.apache.maven.scm.command.AbstractCommand;
import org.apache.maven.scm.provider.ScmProviderRepository;
-import java.util.Date;
-
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @author Olivier Lamy
*
*/
-public abstract class AbstractChangeLogCommand
- extends AbstractCommand
- implements ChangeLogCommand
-{
+public abstract class AbstractChangeLogCommand extends AbstractCommand implements ChangeLogCommand {
@Deprecated
- protected abstract ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- Date startDate, Date endDate, ScmBranch branch,
- String datePattern )
- throws ScmException;
+ protected abstract ChangeLogScmResult executeChangeLogCommand(
+ ScmProviderRepository repository,
+ ScmFileSet fileSet,
+ Date startDate,
+ Date endDate,
+ ScmBranch branch,
+ String datePattern)
+ throws ScmException;
@Deprecated
- protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- ScmVersion startVersion, ScmVersion endVersion,
- String datePattern )
- throws ScmException
- {
- throw new ScmException( "Unsupported method for this provider." );
+ protected ChangeLogScmResult executeChangeLogCommand(
+ ScmProviderRepository repository,
+ ScmFileSet fileSet,
+ ScmVersion startVersion,
+ ScmVersion endVersion,
+ String datePattern)
+ throws ScmException {
+ throw new ScmException("Unsupported method for this provider.");
}
@Deprecated
- protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- ScmVersion version, String datePattern )
- throws ScmException
- {
- throw new ScmException( "Unsupported method for this provider." );
+ protected ChangeLogScmResult executeChangeLogCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern)
+ throws ScmException {
+ throw new ScmException("Unsupported method for this provider.");
}
/**
* {@inheritDoc}
*/
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- Date startDate = parameters.getDate( CommandParameter.START_DATE, null );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ Date startDate = parameters.getDate(CommandParameter.START_DATE, null);
- Date endDate = parameters.getDate( CommandParameter.END_DATE, null );
+ Date endDate = parameters.getDate(CommandParameter.END_DATE, null);
- int numDays = parameters.getInt( CommandParameter.NUM_DAYS, 0 );
+ int numDays = parameters.getInt(CommandParameter.NUM_DAYS, 0);
- Integer limit = parameters.getInt( CommandParameter.LIMIT, -1 );
- if ( limit < 1 )
- {
+ Integer limit = parameters.getInt(CommandParameter.LIMIT, -1);
+ if (limit < 1) {
limit = null;
}
- ScmBranch branch = (ScmBranch) parameters.getScmVersion( CommandParameter.BRANCH, null );
+ ScmBranch branch = (ScmBranch) parameters.getScmVersion(CommandParameter.BRANCH, null);
- ScmVersion version = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
+ ScmVersion version = parameters.getScmVersion(CommandParameter.SCM_VERSION, null);
- ScmVersion startVersion = parameters.getScmVersion( CommandParameter.START_SCM_VERSION, null );
+ ScmVersion startVersion = parameters.getScmVersion(CommandParameter.START_SCM_VERSION, null);
- ScmVersion endVersion = parameters.getScmVersion( CommandParameter.END_SCM_VERSION, null );
+ ScmVersion endVersion = parameters.getScmVersion(CommandParameter.END_SCM_VERSION, null);
- String datePattern = parameters.getString( CommandParameter.CHANGELOG_DATE_PATTERN, null );
+ String datePattern = parameters.getString(CommandParameter.CHANGELOG_DATE_PATTERN, null);
boolean versionOnly = startVersion == null && endVersion == null && version != null;
- if ( versionOnly )
- {
- return executeChangeLogCommand( repository, fileSet, version, datePattern );
- }
- else if ( startVersion != null || endVersion != null )
- {
- return executeChangeLogCommand( repository, fileSet, startVersion, endVersion, datePattern );
- }
- else
- {
- if ( numDays != 0 && ( startDate != null || endDate != null ) )
- {
- throw new ScmException( "Start or end date cannot be set if num days is set." );
+ if (versionOnly) {
+ return executeChangeLogCommand(repository, fileSet, version, datePattern);
+ } else if (startVersion != null || endVersion != null) {
+ return executeChangeLogCommand(repository, fileSet, startVersion, endVersion, datePattern);
+ } else {
+ if (numDays != 0 && (startDate != null || endDate != null)) {
+ throw new ScmException("Start or end date cannot be set if num days is set.");
}
- if ( endDate != null && startDate == null )
- {
- throw new ScmException( "The end date is set but the start date isn't." );
+ if (endDate != null && startDate == null) {
+ throw new ScmException("The end date is set but the start date isn't.");
}
- if ( numDays > 0 )
- {
- @SuppressWarnings( "checkstyle:magicnumber" )
+ if (numDays > 0) {
+ @SuppressWarnings("checkstyle:magicnumber")
int day = 24 * 60 * 60 * 1000;
- startDate = new Date( System.currentTimeMillis() - (long) numDays * day );
+ startDate = new Date(System.currentTimeMillis() - (long) numDays * day);
- endDate = new Date( System.currentTimeMillis() + (long) day );
- }
- else if ( endDate == null )
- {
+ endDate = new Date(System.currentTimeMillis() + (long) day);
+ } else if (endDate == null) {
endDate = new Date();
}
- return executeChangeLogCommand( repository, fileSet, startDate, endDate, branch, datePattern );
+ return executeChangeLogCommand(repository, fileSet, startDate, endDate, branch, datePattern);
}
}
- protected ChangeLogScmResult executeChangeLogCommand( ChangeLogScmRequest request )
- throws ScmException
- {
- throw new ScmException( "Unsupported method for this provider." );
+ protected ChangeLogScmResult executeChangeLogCommand(ChangeLogScmRequest request) throws ScmException {
+ throw new ScmException("Unsupported method for this provider.");
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogCommand.java
index c9c0099a5..bb12fc53d 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.changelog;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.changelog;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.changelog;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.changelog;
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmException;
@@ -29,8 +28,7 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public interface ChangeLogCommand
-{
- ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException;
+public interface ChangeLogCommand {
+ ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException;
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmRequest.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmRequest.java
index 3591ed009..517022cc8 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmRequest.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmRequest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.changelog;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.changelog;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,9 @@ package org.apache.maven.scm.command.changelog;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.changelog;
+
+import java.util.Date;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.ScmBranch;
@@ -27,134 +28,99 @@ import org.apache.maven.scm.ScmRequest;
import org.apache.maven.scm.ScmVersion;
import org.apache.maven.scm.repository.ScmRepository;
-import java.util.Date;
-
/**
* @author Petr Kozelka
* @since 1.8
*/
-public class ChangeLogScmRequest
- extends ScmRequest
-{
+public class ChangeLogScmRequest extends ScmRequest {
private static final long serialVersionUID = 20120620L;
- public ChangeLogScmRequest( ScmRepository scmRepository, ScmFileSet scmFileSet )
- {
- super( scmRepository, scmFileSet );
+ public ChangeLogScmRequest(ScmRepository scmRepository, ScmFileSet scmFileSet) {
+ super(scmRepository, scmFileSet);
}
- public ScmBranch getScmBranch()
- throws ScmException
- {
- return (ScmBranch) parameters.getScmVersion( CommandParameter.BRANCH, null );
+ public ScmBranch getScmBranch() throws ScmException {
+ return (ScmBranch) parameters.getScmVersion(CommandParameter.BRANCH, null);
}
- public void setScmBranch( ScmBranch scmBranch )
- throws ScmException
- {
- parameters.setScmVersion( CommandParameter.BRANCH, scmBranch );
+ public void setScmBranch(ScmBranch scmBranch) throws ScmException {
+ parameters.setScmVersion(CommandParameter.BRANCH, scmBranch);
}
- public Date getStartDate()
- throws ScmException
- {
- return parameters.getDate( CommandParameter.START_DATE );
+ public Date getStartDate() throws ScmException {
+ return parameters.getDate(CommandParameter.START_DATE);
}
/**
* @param startDate the start date of the period
* @throws ScmException if any
*/
- public void setStartDate( Date startDate )
- throws ScmException
- {
- parameters.setDate( CommandParameter.START_DATE, startDate );
+ public void setStartDate(Date startDate) throws ScmException {
+ parameters.setDate(CommandParameter.START_DATE, startDate);
}
- public Date getEndDate()
- throws ScmException
- {
- return parameters.getDate( CommandParameter.END_DATE );
+ public Date getEndDate() throws ScmException {
+ return parameters.getDate(CommandParameter.END_DATE);
}
/**
* @param endDate the end date of the period
* @throws ScmException if any
*/
- public void setEndDate( Date endDate )
- throws ScmException
- {
- parameters.setDate( CommandParameter.END_DATE, endDate );
+ public void setEndDate(Date endDate) throws ScmException {
+ parameters.setDate(CommandParameter.END_DATE, endDate);
}
- public int getNumDays()
- throws ScmException
- {
- return parameters.getInt( CommandParameter.START_DATE );
+ public int getNumDays() throws ScmException {
+ return parameters.getInt(CommandParameter.START_DATE);
}
/**
* @param numDays the number days before the current time if startdate and enddate are null
* @throws ScmException if any
*/
- public void setNumDays( int numDays )
- throws ScmException
- {
- parameters.setInt( CommandParameter.NUM_DAYS, numDays );
+ public void setNumDays(int numDays) throws ScmException {
+ parameters.setInt(CommandParameter.NUM_DAYS, numDays);
}
- public ScmVersion getStartRevision()
- throws ScmException
- {
- return parameters.getScmVersion( CommandParameter.START_SCM_VERSION, null );
+ public ScmVersion getStartRevision() throws ScmException {
+ return parameters.getScmVersion(CommandParameter.START_SCM_VERSION, null);
}
/**
* @param startRevision the start branch/tag/revision
* @throws ScmException if any
*/
- public void setStartRevision( ScmVersion startRevision )
- throws ScmException
- {
- parameters.setScmVersion( CommandParameter.START_SCM_VERSION, startRevision );
+ public void setStartRevision(ScmVersion startRevision) throws ScmException {
+ parameters.setScmVersion(CommandParameter.START_SCM_VERSION, startRevision);
}
- public ScmVersion getEndRevision()
- throws ScmException
- {
- return parameters.getScmVersion( CommandParameter.END_SCM_VERSION, null );
+ public ScmVersion getEndRevision() throws ScmException {
+ return parameters.getScmVersion(CommandParameter.END_SCM_VERSION, null);
}
/**
* @param endRevision the end branch/tag/revision
* @throws ScmException if any
*/
- public void setEndRevision( ScmVersion endRevision )
- throws ScmException
- {
- parameters.setScmVersion( CommandParameter.END_SCM_VERSION, endRevision );
+ public void setEndRevision(ScmVersion endRevision) throws ScmException {
+ parameters.setScmVersion(CommandParameter.END_SCM_VERSION, endRevision);
}
- public String getDatePattern()
- throws ScmException
- {
- return parameters.getString( CommandParameter.CHANGELOG_DATE_PATTERN, null );
+ public String getDatePattern() throws ScmException {
+ return parameters.getString(CommandParameter.CHANGELOG_DATE_PATTERN, null);
}
/**
* @param datePattern the date pattern used in changelog output returned by scm tool
* @throws ScmException if any
*/
- public void setDatePattern( String datePattern )
- throws ScmException
- {
- parameters.setString( CommandParameter.CHANGELOG_DATE_PATTERN, datePattern );
+ public void setDatePattern(String datePattern) throws ScmException {
+ parameters.setString(CommandParameter.CHANGELOG_DATE_PATTERN, datePattern);
}
- public Integer getLimit()
- throws ScmException
- {
- final int limit = parameters.getInt( CommandParameter.LIMIT, -1 );
+ public Integer getLimit() throws ScmException {
+ final int limit = parameters.getInt(CommandParameter.LIMIT, -1);
return limit > 0 ? limit : null;
}
@@ -162,35 +128,24 @@ public class ChangeLogScmRequest
* @param limit the maximal count of returned changesets
* @throws ScmException if any
*/
- public void setLimit( Integer limit )
- throws ScmException
- {
- if ( limit != null )
- {
- parameters.setInt( CommandParameter.LIMIT, limit );
- }
- else
- {
- parameters.remove( CommandParameter.LIMIT );
+ public void setLimit(Integer limit) throws ScmException {
+ if (limit != null) {
+ parameters.setInt(CommandParameter.LIMIT, limit);
+ } else {
+ parameters.remove(CommandParameter.LIMIT);
}
}
- public void setDateRange( Date startDate, Date endDate )
- throws ScmException
- {
- setStartDate( startDate );
- setEndDate( endDate );
+ public void setDateRange(Date startDate, Date endDate) throws ScmException {
+ setStartDate(startDate);
+ setEndDate(endDate);
}
- public void setRevision( ScmVersion revision )
- throws ScmException
- {
- parameters.setScmVersion( CommandParameter.SCM_VERSION, revision );
+ public void setRevision(ScmVersion revision) throws ScmException {
+ parameters.setScmVersion(CommandParameter.SCM_VERSION, revision);
}
- public ScmVersion getRevision()
- throws ScmException
- {
- return parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
+ public ScmVersion getRevision() throws ScmException {
+ return parameters.getScmVersion(CommandParameter.SCM_VERSION, null);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmResult.java
index 9826b639d..09044459d 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.changelog;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.changelog;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.changelog;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.changelog;
import org.apache.maven.scm.ScmResult;
@@ -26,34 +25,28 @@ import org.apache.maven.scm.ScmResult;
* @author Olivier Lamy
*
*/
-public class ChangeLogScmResult
- extends ScmResult
-{
+public class ChangeLogScmResult extends ScmResult {
private static final long serialVersionUID = 559431861541372265L;
private ChangeLogSet changeLog;
- public ChangeLogScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public ChangeLogScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public ChangeLogScmResult( String commandLine, ChangeLogSet changeLog )
- {
- super( commandLine, null, null, true );
+ public ChangeLogScmResult(String commandLine, ChangeLogSet changeLog) {
+ super(commandLine, null, null, true);
this.changeLog = changeLog;
}
- public ChangeLogScmResult( ChangeLogSet changeLog, ScmResult result )
- {
- super( result );
+ public ChangeLogScmResult(ChangeLogSet changeLog, ScmResult result) {
+ super(result);
this.changeLog = changeLog;
}
- public ChangeLogSet getChangeLog()
- {
+ public ChangeLogSet getChangeLog() {
return changeLog;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogSet.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogSet.java
index 7a545df9a..6f46c8ce3 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogSet.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ChangeLogSet.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.changelog;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.changelog;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.changelog;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.changelog;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -30,8 +29,7 @@ import org.apache.maven.scm.ScmVersion;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class ChangeLogSet
-{
+public class ChangeLogSet {
public static final String DEFAULT_ENCODING = "ISO-8859-1";
private List<ChangeSet> entries;
@@ -50,8 +48,7 @@ public class ChangeLogSet
* @param startDate the start date/tag for this set.
* @param endDate the end date/tag for this set, or <code>null</code> if this set goes to the present time.
*/
- public ChangeLogSet( Date startDate, Date endDate )
- {
+ public ChangeLogSet(Date startDate, Date endDate) {
this.startDate = startDate;
this.endDate = endDate;
}
@@ -63,10 +60,9 @@ public class ChangeLogSet
* @param startDate the start date/tag for this set.
* @param endDate the end date/tag for this set, or <code>null</code> if this set goes to the present time.
*/
- public ChangeLogSet( List<ChangeSet> entries, Date startDate, Date endDate )
- {
- this( startDate, endDate );
- setChangeSets( entries );
+ public ChangeLogSet(List<ChangeSet> entries, Date startDate, Date endDate) {
+ this(startDate, endDate);
+ setChangeSets(entries);
}
/**
@@ -74,8 +70,7 @@ public class ChangeLogSet
*
* @return the start date.
*/
- public Date getStartDate()
- {
+ public Date getStartDate() {
return startDate;
}
@@ -84,8 +79,7 @@ public class ChangeLogSet
*
* @return the end date for this set, or <code>null</code> if this set goes to the present time.
*/
- public Date getEndDate()
- {
+ public Date getEndDate() {
return endDate;
}
@@ -94,13 +88,11 @@ public class ChangeLogSet
*
* @return the start version (revision/branch/label) for this set, or <code>null</code>.
*/
- public ScmVersion getStartVersion()
- {
+ public ScmVersion getStartVersion() {
return startVersion;
}
- public void setStartVersion( ScmVersion startVersion )
- {
+ public void setStartVersion(ScmVersion startVersion) {
this.startVersion = startVersion;
}
@@ -109,13 +101,11 @@ public class ChangeLogSet
*
* @return the end version (revision/branch/label) for this set, or <code>null</code>.
*/
- public ScmVersion getEndVersion()
- {
+ public ScmVersion getEndVersion() {
return endVersion;
}
- public void setEndVersion( ScmVersion endVersion )
- {
+ public void setEndVersion(ScmVersion endVersion) {
this.endVersion = endVersion;
}
@@ -124,13 +114,11 @@ public class ChangeLogSet
*
* @return the collection of {@link org.apache.maven.scm.ChangeSet} objects for this set.
*/
- public List<ChangeSet> getChangeSets()
- {
+ public List<ChangeSet> getChangeSets() {
return entries;
}
- public void setChangeSets( List<ChangeSet> changeSets )
- {
+ public void setChangeSets(List<ChangeSet> changeSets) {
this.entries = changeSets;
}
@@ -139,9 +127,8 @@ public class ChangeLogSet
*
* @return TODO
*/
- public String toXML()
- {
- return toXML( DEFAULT_ENCODING );
+ public String toXML() {
+ return toXML(DEFAULT_ENCODING);
}
/**
@@ -150,59 +137,42 @@ public class ChangeLogSet
* @param encoding encoding of output
* @return TODO
*/
- public String toXML( String encoding )
- {
+ public String toXML(String encoding) {
String encodingString = encoding;
- if ( encodingString == null )
- {
+ if (encodingString == null) {
encodingString = DEFAULT_ENCODING;
}
StringBuilder buffer = new StringBuilder();
String pattern = "yyyyMMdd HH:mm:ss z";
- SimpleDateFormat formatter = new SimpleDateFormat( pattern );
-
- buffer.append( "<?xml version=\"1.0\" encoding=\"" + encodingString + "\"?>\n" );
- buffer.append( "<changeset datePattern=\"" )
- .append( pattern )
- .append( "\"" );
-
- if ( startDate != null )
- {
- buffer.append( " start=\"" )
- .append( formatter.format( getStartDate() ) )
- .append( "\"" );
+ SimpleDateFormat formatter = new SimpleDateFormat(pattern);
+
+ buffer.append("<?xml version=\"1.0\" encoding=\"" + encodingString + "\"?>\n");
+ buffer.append("<changeset datePattern=\"").append(pattern).append("\"");
+
+ if (startDate != null) {
+ buffer.append(" start=\"").append(formatter.format(getStartDate())).append("\"");
}
- if ( endDate != null )
- {
- buffer.append( " end=\"" )
- .append( formatter.format( getEndDate() ) )
- .append( "\"" );
+ if (endDate != null) {
+ buffer.append(" end=\"").append(formatter.format(getEndDate())).append("\"");
}
- if ( startVersion != null )
- {
- buffer.append( " startVersion=\"" )
- .append( getStartVersion() )
- .append( "\"" );
+ if (startVersion != null) {
+ buffer.append(" startVersion=\"").append(getStartVersion()).append("\"");
}
- if ( endVersion != null )
- {
- buffer.append( " endVersion=\"" )
- .append( getEndVersion() )
- .append( "\"" );
+ if (endVersion != null) {
+ buffer.append(" endVersion=\"").append(getEndVersion()).append("\"");
}
- buffer.append( ">\n" );
+ buffer.append(">\n");
// Write out the entries
- for ( ChangeSet changeSet : getChangeSets() )
- {
- buffer.append( changeSet.toXML() );
+ for (ChangeSet changeSet : getChangeSets()) {
+ buffer.append(changeSet.toXML());
}
- buffer.append( "</changeset>\n" );
+ buffer.append("</changeset>\n");
return buffer.toString();
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkin/AbstractCheckInCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkin/AbstractCheckInCommand.java
index 0204bc1d8..c09abd374 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkin/AbstractCheckInCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkin/AbstractCheckInCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.checkin;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.checkin;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.checkin;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.checkin;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -34,23 +33,19 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author Olivier Lamy
*
*/
-public abstract class AbstractCheckInCommand
- extends AbstractCommand
-{
+public abstract class AbstractCheckInCommand extends AbstractCommand {
public static final String NAME = "check-in";
- protected abstract CheckInScmResult executeCheckInCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- String message, ScmVersion scmVersion )
- throws ScmException;
+ protected abstract CheckInScmResult executeCheckInCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, String message, ScmVersion scmVersion)
+ throws ScmException;
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- String message = parameters.getString( CommandParameter.MESSAGE );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ String message = parameters.getString(CommandParameter.MESSAGE);
- ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
+ ScmVersion scmVersion = parameters.getScmVersion(CommandParameter.SCM_VERSION, null);
- return executeCheckInCommand( repository, fileSet, message, scmVersion );
+ return executeCheckInCommand(repository, fileSet, message, scmVersion);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkin/CheckInScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkin/CheckInScmResult.java
index 3a5d8000e..a2c6aa609 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkin/CheckInScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkin/CheckInScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.checkin;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.checkin;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.checkin;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.checkin;
import java.util.ArrayList;
import java.util.List;
@@ -30,23 +29,19 @@ import org.apache.maven.scm.ScmResult;
* @author Olivier Lamy
*
*/
-public class CheckInScmResult
- extends ScmResult
-{
+public class CheckInScmResult extends ScmResult {
private static final long serialVersionUID = 954225589449445354L;
private List<ScmFile> checkedInFiles;
-
+
private String scmRevision;
- public CheckInScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public CheckInScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public CheckInScmResult( String commandLine, List<ScmFile> checkedInFiles )
- {
- super( commandLine, null, null, true );
+ public CheckInScmResult(String commandLine, List<ScmFile> checkedInFiles) {
+ super(commandLine, null, null, true);
this.checkedInFiles = checkedInFiles;
}
@@ -57,24 +52,20 @@ public class CheckInScmResult
* @param scmRevision TODO
* @since 1.2
*/
- public CheckInScmResult( String commandLine, List<ScmFile> checkedInFiles, String scmRevision )
- {
- this( commandLine, checkedInFiles );
+ public CheckInScmResult(String commandLine, List<ScmFile> checkedInFiles, String scmRevision) {
+ this(commandLine, checkedInFiles);
this.scmRevision = scmRevision;
- }
-
- public CheckInScmResult( List<ScmFile> checkedInFiles, ScmResult result )
- {
- super( result );
+ }
+
+ public CheckInScmResult(List<ScmFile> checkedInFiles, ScmResult result) {
+ super(result);
this.checkedInFiles = checkedInFiles;
}
-
- public List<ScmFile> getCheckedInFiles()
- {
- if ( this.checkedInFiles == null )
- {
+
+ public List<ScmFile> getCheckedInFiles() {
+ if (this.checkedInFiles == null) {
this.checkedInFiles = new ArrayList<ScmFile>();
}
return checkedInFiles;
@@ -84,8 +75,7 @@ public class CheckInScmResult
* @since 1.2
* @return can be null for some providers (implemented at least for svn)
*/
- public String getScmRevision()
- {
+ public String getScmRevision() {
return scmRevision;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkout/AbstractCheckOutCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkout/AbstractCheckOutCommand.java
index 56d35c88b..90ce3f40d 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkout/AbstractCheckOutCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkout/AbstractCheckOutCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.checkout;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.checkout;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.checkout;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.checkout;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -34,9 +33,7 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author Olivier Lamy
*
*/
-public abstract class AbstractCheckOutCommand
- extends AbstractCommand
-{
+public abstract class AbstractCheckOutCommand extends AbstractCommand {
/**
* Execute Check out command line in a recursive check out way.
*
@@ -47,11 +44,9 @@ public abstract class AbstractCheckOutCommand
* @throws ScmException if any
* @see #executeCheckOutCommand(ScmProviderRepository, ScmFileSet, ScmVersion, boolean, boolean)
*/
- protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- ScmVersion scmVersion )
- throws ScmException
- {
- return executeCheckOutCommand( repository, fileSet, scmVersion, true, false );
+ protected CheckOutScmResult executeCheckOutCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, ScmVersion scmVersion) throws ScmException {
+ return executeCheckOutCommand(repository, fileSet, scmVersion, true, false);
}
/**
@@ -66,19 +61,20 @@ public abstract class AbstractCheckOutCommand
* @throws ScmException if any
* @since 1.1.1
*/
- protected abstract CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- ScmVersion scmVersion, boolean recursive,
- boolean shallow )
- throws ScmException;
+ protected abstract CheckOutScmResult executeCheckOutCommand(
+ ScmProviderRepository repository,
+ ScmFileSet fileSet,
+ ScmVersion scmVersion,
+ boolean recursive,
+ boolean shallow)
+ throws ScmException;
/** {@inheritDoc} */
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
- boolean recursive = parameters.getBoolean( CommandParameter.RECURSIVE, true );
- boolean shallow = parameters.getBoolean( CommandParameter.SHALLOW, false );
- return executeCheckOutCommand( repository, fileSet, scmVersion, recursive, shallow );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ ScmVersion scmVersion = parameters.getScmVersion(CommandParameter.SCM_VERSION, null);
+ boolean recursive = parameters.getBoolean(CommandParameter.RECURSIVE, true);
+ boolean shallow = parameters.getBoolean(CommandParameter.SHALLOW, false);
+ return executeCheckOutCommand(repository, fileSet, scmVersion, recursive, shallow);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkout/CheckOutScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkout/CheckOutScmResult.java
index 6e3ae21b1..a5198c134 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkout/CheckOutScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/checkout/CheckOutScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.checkout;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.checkout;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,20 +16,19 @@ package org.apache.maven.scm.command.checkout;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.checkout;
+
+import java.util.List;
import org.apache.maven.scm.ScmFile;
import org.apache.maven.scm.ScmResult;
-import java.util.List;
-
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @author Olivier Lamy
*
*/
-public class CheckOutScmResult
- extends ScmResult
-{
+public class CheckOutScmResult extends ScmResult {
private static final long serialVersionUID = 3345964619749320210L;
@@ -54,54 +51,44 @@ public class CheckOutScmResult
*/
protected String relativePathProjectDirectory = "";
- public CheckOutScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public CheckOutScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public CheckOutScmResult( String commandLine, List<ScmFile> checkedOutFiles )
- {
- this( commandLine, null, checkedOutFiles );
+ public CheckOutScmResult(String commandLine, List<ScmFile> checkedOutFiles) {
+ this(commandLine, null, checkedOutFiles);
}
- public CheckOutScmResult( String commandLine, String revision, List<ScmFile> checkedOutFiles )
- {
- super( commandLine, null, null, true );
+ public CheckOutScmResult(String commandLine, String revision, List<ScmFile> checkedOutFiles) {
+ super(commandLine, null, null, true);
this.revision = revision;
this.checkedOutFiles = checkedOutFiles;
}
- public CheckOutScmResult( String commandLine, List<ScmFile> checkedOutFiles, String relativePathProjectDirectory )
- {
- this( commandLine, null, checkedOutFiles );
- if ( relativePathProjectDirectory != null )
- {
+ public CheckOutScmResult(String commandLine, List<ScmFile> checkedOutFiles, String relativePathProjectDirectory) {
+ this(commandLine, null, checkedOutFiles);
+ if (relativePathProjectDirectory != null) {
this.relativePathProjectDirectory = relativePathProjectDirectory;
}
}
- public CheckOutScmResult( String commandLine, String revision, List<ScmFile> checkedOutFiles,
- String relativePathProjectDirectory )
- {
- this( commandLine, revision, checkedOutFiles );
- if ( relativePathProjectDirectory != null )
- {
+ public CheckOutScmResult(
+ String commandLine, String revision, List<ScmFile> checkedOutFiles, String relativePathProjectDirectory) {
+ this(commandLine, revision, checkedOutFiles);
+ if (relativePathProjectDirectory != null) {
this.relativePathProjectDirectory = relativePathProjectDirectory;
}
-
}
- public CheckOutScmResult( List<ScmFile> checkedOutFiles, ScmResult result )
- {
- super( result );
+ public CheckOutScmResult(List<ScmFile> checkedOutFiles, ScmResult result) {
+ super(result);
this.checkedOutFiles = checkedOutFiles;
}
- public List<ScmFile> getCheckedOutFiles()
- {
+ public List<ScmFile> getCheckedOutFiles() {
return checkedOutFiles;
}
@@ -109,8 +96,7 @@ public class CheckOutScmResult
* @return the contents of {@link #relativePathProjectDirectory}
* @see #relativePathProjectDirectory
*/
- public String getRelativePathProjectDirectory()
- {
+ public String getRelativePathProjectDirectory() {
return relativePathProjectDirectory;
}
@@ -121,8 +107,7 @@ public class CheckOutScmResult
* @return the revision that was checked out.
* @since 1.8
*/
- public String getRevision()
- {
+ public String getRevision() {
return revision;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/diff/AbstractDiffCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/diff/AbstractDiffCommand.java
index 53049e77c..37d549546 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/diff/AbstractDiffCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/diff/AbstractDiffCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.diff;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.diff;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.diff;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.diff;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -38,22 +37,18 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*
*/
-public abstract class AbstractDiffCommand
- extends AbstractCommand
-{
- protected abstract DiffScmResult executeDiffCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- ScmVersion startRevision, ScmVersion endRevision )
- throws ScmException;
+public abstract class AbstractDiffCommand extends AbstractCommand {
+ protected abstract DiffScmResult executeDiffCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, ScmVersion startRevision, ScmVersion endRevision)
+ throws ScmException;
/** {@inheritDoc} */
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- ScmVersion startRevision = parameters.getScmVersion( CommandParameter.START_SCM_VERSION, null );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ ScmVersion startRevision = parameters.getScmVersion(CommandParameter.START_SCM_VERSION, null);
- ScmVersion endRevision = parameters.getScmVersion( CommandParameter.END_SCM_VERSION, null );
+ ScmVersion endRevision = parameters.getScmVersion(CommandParameter.END_SCM_VERSION, null);
- return executeDiffCommand( repository, fileSet, startRevision, endRevision );
+ return executeDiffCommand(repository, fileSet, startRevision, endRevision);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/diff/DiffScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/diff/DiffScmResult.java
index 64107e9a9..0ca17aed6 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/diff/DiffScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/diff/DiffScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.diff;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.diff;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.diff;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.diff;
import java.util.List;
import java.util.Map;
@@ -29,9 +28,7 @@ import org.apache.maven.scm.ScmResult;
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*
*/
-public class DiffScmResult
- extends ScmResult
-{
+public class DiffScmResult extends ScmResult {
private static final long serialVersionUID = 4036970486972633082L;
private List<ScmFile> changedFiles;
@@ -40,24 +37,21 @@ public class DiffScmResult
private String patch;
- public DiffScmResult( String commandLine, List<ScmFile> changedFiles, Map<String, CharSequence> differences,
- String patch )
- {
- this( commandLine, null, null, true );
+ public DiffScmResult(
+ String commandLine, List<ScmFile> changedFiles, Map<String, CharSequence> differences, String patch) {
+ this(commandLine, null, null, true);
this.changedFiles = changedFiles;
this.differences = differences;
this.patch = patch;
}
- public DiffScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public DiffScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public DiffScmResult( List<ScmFile> changedFiles, Map<String, CharSequence> differences, String patch,
- ScmResult result )
- {
- super( result );
+ public DiffScmResult(
+ List<ScmFile> changedFiles, Map<String, CharSequence> differences, String patch, ScmResult result) {
+ super(result);
this.changedFiles = changedFiles;
@@ -66,18 +60,15 @@ public class DiffScmResult
this.patch = patch;
}
- public List<ScmFile> getChangedFiles()
- {
+ public List<ScmFile> getChangedFiles() {
return changedFiles;
}
- public Map<String, CharSequence> getDifferences()
- {
+ public Map<String, CharSequence> getDifferences() {
return differences;
}
- public String getPatch()
- {
+ public String getPatch() {
return patch;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/edit/AbstractEditCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/edit/AbstractEditCommand.java
index b8a98bce2..333de68cf 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/edit/AbstractEditCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/edit/AbstractEditCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.edit;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.edit;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.edit;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.edit;
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmException;
@@ -29,17 +28,13 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
/**
*
*/
-public abstract class AbstractEditCommand
- extends AbstractCommand
-{
+public abstract class AbstractEditCommand extends AbstractCommand {
/** {@inheritDoc} */
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- return executeEditCommand( repository, fileSet );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ return executeEditCommand(repository, fileSet);
}
- protected abstract ScmResult executeEditCommand( ScmProviderRepository repository, ScmFileSet fileSet )
- throws ScmException;
+ protected abstract ScmResult executeEditCommand(ScmProviderRepository repository, ScmFileSet fileSet)
+ throws ScmException;
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/edit/EditScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/edit/EditScmResult.java
index 5d7be1736..017dabf04 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/edit/EditScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/edit/EditScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.edit;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.edit;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.edit;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.edit;
import java.util.List;
@@ -28,35 +27,28 @@ import org.apache.maven.scm.ScmResult;
* @since 1.5 {@link ScmFile} will have the {@link org.apache.maven.scm.ScmFileStatus}
* {@link org.apache.maven.scm.ScmFileStatus#EDITED}
*/
-public class EditScmResult
- extends ScmResult
-{
+public class EditScmResult extends ScmResult {
private static final long serialVersionUID = -6274938710679161288L;
private List<ScmFile> editFiles;
- public EditScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public EditScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public EditScmResult( String commandLine, List<ScmFile> editFiles )
- {
- super( commandLine, null, null, true );
+ public EditScmResult(String commandLine, List<ScmFile> editFiles) {
+ super(commandLine, null, null, true);
this.editFiles = editFiles;
}
- public EditScmResult( List<ScmFile> editFiles, ScmResult result )
- {
- super( result );
+ public EditScmResult(List<ScmFile> editFiles, ScmResult result) {
+ super(result);
this.editFiles = editFiles;
}
- public List<ScmFile> getEditFiles()
- {
+ public List<ScmFile> getEditFiles() {
return editFiles;
}
-
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/AbstractExportCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/AbstractExportCommand.java
index 2097ce127..1de37edec 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/AbstractExportCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/AbstractExportCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.export;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.export;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.export;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.export;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -32,22 +31,18 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public abstract class AbstractExportCommand
- extends AbstractCommand
-{
- protected abstract ExportScmResult executeExportCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- ScmVersion scmVersion, String outputDirectory )
- throws ScmException;
+public abstract class AbstractExportCommand extends AbstractCommand {
+ protected abstract ExportScmResult executeExportCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, String outputDirectory)
+ throws ScmException;
/** {@inheritDoc} */
- protected ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
+ protected ScmResult executeCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
+ ScmVersion scmVersion = parameters.getScmVersion(CommandParameter.SCM_VERSION, null);
- String outputDirectory = parameters.getString( CommandParameter.OUTPUT_DIRECTORY, null );
+ String outputDirectory = parameters.getString(CommandParameter.OUTPUT_DIRECTORY, null);
- return executeExportCommand( repository, fileSet, scmVersion, outputDirectory );
+ return executeExportCommand(repository, fileSet, scmVersion, outputDirectory);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/ExportScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/ExportScmResult.java
index d86c46a98..e4da89987 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/ExportScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/ExportScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.export;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.export;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.export;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.export;
import java.util.List;
@@ -28,27 +27,22 @@ import org.apache.maven.scm.ScmResult;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class ExportScmResult
- extends ScmResult
-{
+public class ExportScmResult extends ScmResult {
private static final long serialVersionUID = 8564643361304165292L;
private List<ScmFile> exportedFiles;
- public ExportScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public ExportScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public ExportScmResult( String commandLine, List<ScmFile> updatedFiles )
- {
- super( commandLine, null, null, true );
+ public ExportScmResult(String commandLine, List<ScmFile> updatedFiles) {
+ super(commandLine, null, null, true);
this.exportedFiles = updatedFiles;
}
- public List<ScmFile> getExportedFiles()
- {
+ public List<ScmFile> getExportedFiles() {
return exportedFiles;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/ExportScmResultWithRevision.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/ExportScmResultWithRevision.java
index 23476ff6a..06d4d1e95 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/ExportScmResultWithRevision.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/export/ExportScmResultWithRevision.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.export;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.export;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.export;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.export;
import java.util.List;
@@ -27,30 +26,25 @@ import org.apache.maven.scm.ScmFile;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class ExportScmResultWithRevision
- extends ExportScmResult
-{
+public class ExportScmResultWithRevision extends ExportScmResult {
private static final long serialVersionUID = -7962912849216079039L;
private String revision;
- public ExportScmResultWithRevision( String commandLine, String providerMessage, String commandOutput,
- String revision, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public ExportScmResultWithRevision(
+ String commandLine, String providerMessage, String commandOutput, String revision, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
this.revision = revision;
}
- public ExportScmResultWithRevision( String commandLine, List<ScmFile> exportedFiles, String revision )
- {
- super( commandLine, exportedFiles );
+ public ExportScmResultWithRevision(String commandLine, List<ScmFile> exportedFiles, String revision) {
+ super(commandLine, exportedFiles);
this.revision = revision;
}
- public String getRevision()
- {
+ public String getRevision() {
return revision;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/fileinfo/AbstractFileInfoCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/fileinfo/AbstractFileInfoCommand.java
index 10774e86d..a3a40bed7 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/fileinfo/AbstractFileInfoCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/fileinfo/AbstractFileInfoCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.fileinfo;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.fileinfo;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,9 @@ package org.apache.maven.scm.command.fileinfo;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.fileinfo;
+
+import java.io.File;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -26,26 +27,19 @@ import org.apache.maven.scm.ScmResult;
import org.apache.maven.scm.command.AbstractCommand;
import org.apache.maven.scm.provider.ScmProviderRepository;
-import java.io.File;
-
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public abstract class AbstractFileInfoCommand
- extends AbstractCommand
-{
- protected abstract ScmResult executeFileInfoCommand( ScmProviderRepository repository, File workingDirectory,
- String filename )
- throws ScmException;
+public abstract class AbstractFileInfoCommand extends AbstractCommand {
+ protected abstract ScmResult executeFileInfoCommand(
+ ScmProviderRepository repository, File workingDirectory, String filename) throws ScmException;
- public ScmResult executeCommand( ScmProviderRepository repository, File workingDirectory,
- CommandParameters parameters )
- throws ScmException
- {
- String file = parameters.getString( CommandParameter.FILE );
+ public ScmResult executeCommand(
+ ScmProviderRepository repository, File workingDirectory, CommandParameters parameters) throws ScmException {
+ String file = parameters.getString(CommandParameter.FILE);
- return executeFileInfoCommand( repository, workingDirectory, file );
+ return executeFileInfoCommand(repository, workingDirectory, file);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoItem.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoItem.java
index 952e93573..83837dc91 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoItem.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoItem.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.info;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.info;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.info;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.info;
/**
* @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
@@ -25,8 +24,7 @@ package org.apache.maven.scm.command.info;
*
* @since 1.5
*/
-public class InfoItem
-{
+public class InfoItem {
private String path;
private String url;
@@ -47,103 +45,83 @@ public class InfoItem
private String lastChangedDate;
- public String getPath()
- {
+ public String getPath() {
return path;
}
- public void setPath( String path )
- {
+ public void setPath(String path) {
this.path = path;
}
- public String getURL()
- {
+ public String getURL() {
return url;
}
- public void setURL( String url )
- {
+ public void setURL(String url) {
this.url = url;
}
- public String getRepositoryRoot()
- {
+ public String getRepositoryRoot() {
return repositoryRoot;
}
- public void setRepositoryRoot( String repositoryRoot )
- {
+ public void setRepositoryRoot(String repositoryRoot) {
this.repositoryRoot = repositoryRoot;
}
- public String getRepositoryUUID()
- {
+ public String getRepositoryUUID() {
return repositoryUUID;
}
- public void setRepositoryUUID( String repositoryUUID )
- {
+ public void setRepositoryUUID(String repositoryUUID) {
this.repositoryUUID = repositoryUUID;
}
- public String getRevision()
- {
+ public String getRevision() {
return revision;
}
- public void setRevision( String revision )
- {
+ public void setRevision(String revision) {
this.revision = revision;
}
- public String getNodeKind()
- {
+ public String getNodeKind() {
return nodeKind;
}
- public void setNodeKind( String nodeKind )
- {
+ public void setNodeKind(String nodeKind) {
this.nodeKind = nodeKind;
}
- public String getSchedule()
- {
+ public String getSchedule() {
return schedule;
}
- public void setSchedule( String schedule )
- {
+ public void setSchedule(String schedule) {
this.schedule = schedule;
}
- public String getLastChangedAuthor()
- {
+ public String getLastChangedAuthor() {
return lastChangedAuthor;
}
- public void setLastChangedAuthor( String lastChangedAuthor )
- {
+ public void setLastChangedAuthor(String lastChangedAuthor) {
this.lastChangedAuthor = lastChangedAuthor;
}
- public String getLastChangedRevision()
- {
+ public String getLastChangedRevision() {
return lastChangedRevision;
}
- public void setLastChangedRevision( String lastChangedRevision )
- {
+ public void setLastChangedRevision(String lastChangedRevision) {
this.lastChangedRevision = lastChangedRevision;
}
- public String getLastChangedDate()
- {
+ public String getLastChangedDate() {
return lastChangedDate;
}
- public void setLastChangedDate( String lastChangedDate )
- {
+ public void setLastChangedDate(String lastChangedDate) {
this.lastChangedDate = lastChangedDate;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoScmResult.java
index cd81c121e..9addc3fd9 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/info/InfoScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.info;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.info;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,52 +16,46 @@ package org.apache.maven.scm.command.info;
* specific language governing permissions and limitations
* under the License.
*/
-
-import org.apache.maven.scm.ScmResult;
+package org.apache.maven.scm.command.info;
import java.util.ArrayList;
import java.util.List;
+import org.apache.maven.scm.ScmResult;
+
/**
* @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
* @author Olivier Lamy
*
*/
-public class InfoScmResult
- extends ScmResult
-{
+public class InfoScmResult extends ScmResult {
private static final long serialVersionUID = 955993340040530451L;
private List<InfoItem> infoItems;
- public InfoScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public InfoScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
- infoItems = new ArrayList<InfoItem>( 0 );
+ infoItems = new ArrayList<InfoItem>(0);
}
- public InfoScmResult( String commandLine, List<InfoItem> files )
- {
- super( commandLine, null, null, true );
+ public InfoScmResult(String commandLine, List<InfoItem> files) {
+ super(commandLine, null, null, true);
this.infoItems = files;
}
- public InfoScmResult( List<InfoItem> infoItems, ScmResult result )
- {
- super( result );
+ public InfoScmResult(List<InfoItem> infoItems, ScmResult result) {
+ super(result);
this.infoItems = infoItems;
}
- public InfoScmResult( ScmResult result )
- {
- super( result );
+ public InfoScmResult(ScmResult result) {
+ super(result);
}
- public List<InfoItem> getInfoItems()
- {
+ public List<InfoItem> getInfoItems() {
return infoItems;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/AbstractListCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/AbstractListCommand.java
index e5089a33d..ed7cb581e 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/AbstractListCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/AbstractListCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.list;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.list;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.list;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.list;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -32,9 +31,7 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
*
*/
-public abstract class AbstractListCommand
- extends AbstractCommand
-{
+public abstract class AbstractListCommand extends AbstractCommand {
/**
* List contents of the remote repository
*
@@ -45,24 +42,21 @@ public abstract class AbstractListCommand
* @return the list of files
* @throws ScmException if any
*/
- protected abstract ListScmResult executeListCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- boolean recursive, ScmVersion scmVersion )
- throws ScmException;
+ protected abstract ListScmResult executeListCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion scmVersion)
+ throws ScmException;
/** {@inheritDoc} */
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- if ( fileSet.getFileList().isEmpty() )
- {
- throw new IllegalArgumentException( "fileSet can not be empty" );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ if (fileSet.getFileList().isEmpty()) {
+ throw new IllegalArgumentException("fileSet can not be empty");
}
- boolean recursive = parameters.getBoolean( CommandParameter.RECURSIVE );
+ boolean recursive = parameters.getBoolean(CommandParameter.RECURSIVE);
- ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
+ ScmVersion scmVersion = parameters.getScmVersion(CommandParameter.SCM_VERSION, null);
- return executeListCommand( repository, fileSet, recursive, scmVersion );
+ return executeListCommand(repository, fileSet, recursive, scmVersion);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/ListScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/ListScmResult.java
index ac7760e93..acf846e3e 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/ListScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/list/ListScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.list;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.list;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.list;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.list;
import java.util.ArrayList;
import java.util.List;
@@ -32,37 +31,30 @@ import org.apache.maven.scm.ScmResult;
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
*
*/
-public class ListScmResult
- extends ScmResult
-{
+public class ListScmResult extends ScmResult {
private static final long serialVersionUID = 5402161066844465281L;
private List<ScmFile> files;
- public ListScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public ListScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
- files = new ArrayList<ScmFile>( 0 );
+ files = new ArrayList<ScmFile>(0);
}
- public ListScmResult( String commandLine, List<ScmFile> files )
- {
- super( commandLine, null, null, true );
+ public ListScmResult(String commandLine, List<ScmFile> files) {
+ super(commandLine, null, null, true);
this.files = files;
}
- public ListScmResult( List<ScmFile> files, ScmResult result )
- {
- super( result );
+ public ListScmResult(List<ScmFile> files, ScmResult result) {
+ super(result);
this.files = files;
}
- public List<ScmFile> getFiles()
- {
+ public List<ScmFile> getFiles() {
return files;
}
-
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/lock/AbstractLockCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/lock/AbstractLockCommand.java
index 46e689ea1..55da4e6a6 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/lock/AbstractLockCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/lock/AbstractLockCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.lock;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.lock;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,9 @@ package org.apache.maven.scm.command.lock;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.lock;
+
+import java.io.File;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -26,26 +27,19 @@ import org.apache.maven.scm.ScmResult;
import org.apache.maven.scm.command.AbstractCommand;
import org.apache.maven.scm.provider.ScmProviderRepository;
-import java.io.File;
-
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public abstract class AbstractLockCommand
- extends AbstractCommand
-{
- protected abstract ScmResult executeLockCommand( ScmProviderRepository repository, File workingDirectory,
- String filename )
- throws ScmException;
+public abstract class AbstractLockCommand extends AbstractCommand {
+ protected abstract ScmResult executeLockCommand(
+ ScmProviderRepository repository, File workingDirectory, String filename) throws ScmException;
- public ScmResult executeCommand( ScmProviderRepository repository, File workingDirectory,
- CommandParameters parameters )
- throws ScmException
- {
- String file = parameters.getString( CommandParameter.FILE );
+ public ScmResult executeCommand(
+ ScmProviderRepository repository, File workingDirectory, CommandParameters parameters) throws ScmException {
+ String file = parameters.getString(CommandParameter.FILE);
- return executeLockCommand( repository, workingDirectory, file );
+ return executeLockCommand(repository, workingDirectory, file);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/login/AbstractLoginCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/login/AbstractLoginCommand.java
index d2146983f..7dac7ee17 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/login/AbstractLoginCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/login/AbstractLoginCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.login;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.login;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.login;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.login;
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmException;
@@ -30,18 +29,13 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public abstract class AbstractLoginCommand
- extends AbstractCommand
-{
- public abstract LoginScmResult executeLoginCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException;
+public abstract class AbstractLoginCommand extends AbstractCommand {
+ public abstract LoginScmResult executeLoginCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException;
/** {@inheritDoc} */
- protected ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- return executeLoginCommand( repository, fileSet, parameters );
+ protected ScmResult executeCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
+ return executeLoginCommand(repository, fileSet, parameters);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/login/LoginScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/login/LoginScmResult.java
index dd478f2cf..f5d9fc7b1 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/login/LoginScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/login/LoginScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.login;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.login;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.login;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.login;
import org.apache.maven.scm.ScmResult;
@@ -25,14 +24,10 @@ import org.apache.maven.scm.ScmResult;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class LoginScmResult
- extends ScmResult
-{
+public class LoginScmResult extends ScmResult {
private static final long serialVersionUID = -179242524702253809L;
- public LoginScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public LoginScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
-
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/mkdir/AbstractMkdirCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/mkdir/AbstractMkdirCommand.java
index daa4ac58e..e2534b113 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/mkdir/AbstractMkdirCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/mkdir/AbstractMkdirCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.mkdir;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.mkdir;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.mkdir;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.mkdir;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -31,12 +30,10 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
*
*/
-public abstract class AbstractMkdirCommand
- extends AbstractCommand
-{
+public abstract class AbstractMkdirCommand extends AbstractCommand {
/**
* Creates directories in the remote repository.
- *
+ *
* @param repository TODO
* @param fileSet TODO
* @param message TODO
@@ -44,22 +41,21 @@ public abstract class AbstractMkdirCommand
* @return TODO
* @throws ScmException if any
*/
- protected abstract MkdirScmResult executeMkdirCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- String message, boolean createInLocal )
- throws ScmException;
+ protected abstract MkdirScmResult executeMkdirCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, String message, boolean createInLocal)
+ throws ScmException;
/** {@inheritDoc} */
- protected ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- if ( fileSet.getFileList().isEmpty() )
- {
- throw new IllegalArgumentException( "fileSet can not be empty" );
+ protected ScmResult executeCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
+ if (fileSet.getFileList().isEmpty()) {
+ throw new IllegalArgumentException("fileSet can not be empty");
}
- return executeMkdirCommand( repository, fileSet, parameters.getString( CommandParameter.MESSAGE ),
- parameters.getBoolean( CommandParameter.SCM_MKDIR_CREATE_IN_LOCAL ) );
+ return executeMkdirCommand(
+ repository,
+ fileSet,
+ parameters.getString(CommandParameter.MESSAGE),
+ parameters.getBoolean(CommandParameter.SCM_MKDIR_CREATE_IN_LOCAL));
}
-
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/mkdir/MkdirScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/mkdir/MkdirScmResult.java
index abee6d6ca..2ea1f26fd 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/mkdir/MkdirScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/mkdir/MkdirScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.mkdir;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.mkdir;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.mkdir;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.mkdir;
import java.util.List;
@@ -30,60 +29,50 @@ import org.apache.maven.scm.ScmResult;
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
*
*/
-public class MkdirScmResult
- extends ScmResult
-{
+public class MkdirScmResult extends ScmResult {
private static final long serialVersionUID = -8717329738246682608L;
private String revision;
private List<ScmFile> createdDirs;
- public MkdirScmResult( ScmResult scmResult )
- {
- super( scmResult );
+ public MkdirScmResult(ScmResult scmResult) {
+ super(scmResult);
}
- public MkdirScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public MkdirScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public MkdirScmResult( String commandLine, String revision )
- {
- this( commandLine, null, null, true );
+ public MkdirScmResult(String commandLine, String revision) {
+ this(commandLine, null, null, true);
this.revision = revision;
}
- public MkdirScmResult( String commandLine, List<ScmFile> createdDirs )
- {
- this( commandLine, null, null, true );
+ public MkdirScmResult(String commandLine, List<ScmFile> createdDirs) {
+ this(commandLine, null, null, true);
this.createdDirs = createdDirs;
}
- public MkdirScmResult( String revision, ScmResult result )
- {
- super( result );
+ public MkdirScmResult(String revision, ScmResult result) {
+ super(result);
this.revision = revision;
}
- public MkdirScmResult( List<ScmFile> createdDirs, ScmResult result )
- {
- super( result );
+ public MkdirScmResult(List<ScmFile> createdDirs, ScmResult result) {
+ super(result);
this.createdDirs = createdDirs;
}
- public String getRevision()
- {
+ public String getRevision() {
return revision;
}
- public List<ScmFile> getCreatedDirs()
- {
+ public List<ScmFile> getCreatedDirs() {
return createdDirs;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/remoteinfo/AbstractRemoteInfoCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/remoteinfo/AbstractRemoteInfoCommand.java
index aa5631964..00aa1b5eb 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/remoteinfo/AbstractRemoteInfoCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/remoteinfo/AbstractRemoteInfoCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.remoteinfo;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.remoteinfo;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.remoteinfo;
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmException;
@@ -30,19 +29,14 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author Olivier Lamy
* @since 1.6
*/
-public abstract class AbstractRemoteInfoCommand
- extends AbstractCommand
-{
+public abstract class AbstractRemoteInfoCommand extends AbstractCommand {
- public abstract RemoteInfoScmResult executeRemoteInfoCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException;
+ public abstract RemoteInfoScmResult executeRemoteInfoCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException;
@Override
- protected ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- return executeRemoteInfoCommand( repository, fileSet, parameters );
+ protected ScmResult executeCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
+ return executeRemoteInfoCommand(repository, fileSet, parameters);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/remoteinfo/RemoteInfoScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/remoteinfo/RemoteInfoScmResult.java
index a1cf883e8..a20a673a5 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/remoteinfo/RemoteInfoScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/remoteinfo/RemoteInfoScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.remoteinfo;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,19 +16,18 @@ package org.apache.maven.scm.command.remoteinfo;
* specific language governing permissions and limitations
* under the License.
*/
-
-import org.apache.maven.scm.ScmResult;
+package org.apache.maven.scm.command.remoteinfo;
import java.util.HashMap;
import java.util.Map;
+import org.apache.maven.scm.ScmResult;
+
/**
* @author Olivier Lamy
* @since 1.6
*/
-public class RemoteInfoScmResult
- extends ScmResult
-{
+public class RemoteInfoScmResult extends ScmResult {
private static final long serialVersionUID = -5571403202068311222L;
/**
@@ -45,46 +42,39 @@ public class RemoteInfoScmResult
*/
private Map<String, String> tags = new HashMap<String, String>();
- public RemoteInfoScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public RemoteInfoScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public RemoteInfoScmResult( String commandLine, Map<String, String> branches, Map<String, String> tags )
- {
- super( commandLine, null, null, true );
+ public RemoteInfoScmResult(String commandLine, Map<String, String> branches, Map<String, String> tags) {
+ super(commandLine, null, null, true);
this.branches = branches;
this.tags = tags;
}
- public Map<String, String> getBranches()
- {
+ public Map<String, String> getBranches() {
return branches;
}
- public void setBranches( Map<String, String> branches )
- {
+ public void setBranches(Map<String, String> branches) {
this.branches = branches;
}
- public Map<String, String> getTags()
- {
+ public Map<String, String> getTags() {
return tags;
}
- public void setTags( Map<String, String> tags )
- {
+ public void setTags(Map<String, String> tags) {
this.tags = tags;
}
@Override
- public String toString()
- {
+ public String toString() {
final StringBuilder sb = new StringBuilder();
- sb.append( "RemoteInfoScmResult" );
- sb.append( "{branches=" ).append( branches );
- sb.append( ", tags=" ).append( tags );
- sb.append( '}' );
+ sb.append("RemoteInfoScmResult");
+ sb.append("{branches=").append(branches);
+ sb.append(", tags=").append(tags);
+ sb.append('}');
return sb.toString();
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/AbstractRemoveCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/AbstractRemoveCommand.java
index 406eb9a52..a89c230b3 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/AbstractRemoveCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/AbstractRemoveCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.remove;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.remove;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.remove;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.remove;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -32,20 +31,15 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public abstract class AbstractRemoveCommand
- extends AbstractCommand
-{
- protected abstract ScmResult executeRemoveCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- String message )
- throws ScmException;
+public abstract class AbstractRemoveCommand extends AbstractCommand {
+ protected abstract ScmResult executeRemoveCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, String message) throws ScmException;
/** {@inheritDoc} */
- protected ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- String message = parameters.getString( CommandParameter.MESSAGE );
+ protected ScmResult executeCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
+ String message = parameters.getString(CommandParameter.MESSAGE);
- return executeRemoveCommand( repository, fileSet, message );
+ return executeRemoveCommand(repository, fileSet, message);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/RemoveScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/RemoveScmResult.java
index 5eb03a857..4685f81e3 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/RemoveScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/remove/RemoveScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.remove;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.remove;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.remove;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.remove;
import java.util.List;
@@ -29,34 +28,28 @@ import org.apache.maven.scm.ScmResult;
* @author Olivier Lamy
*
*/
-public class RemoveScmResult
- extends ScmResult
-{
+public class RemoveScmResult extends ScmResult {
private static final long serialVersionUID = 8852310735079996771L;
private List<ScmFile> removedFiles;
- public RemoveScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public RemoveScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public RemoveScmResult( String commandLine, List<ScmFile> removedFiles )
- {
- super( commandLine, null, null, true );
+ public RemoveScmResult(String commandLine, List<ScmFile> removedFiles) {
+ super(commandLine, null, null, true);
this.removedFiles = removedFiles;
}
- public RemoveScmResult( List<ScmFile> removedFiles, ScmResult result )
- {
- super( result );
+ public RemoveScmResult(List<ScmFile> removedFiles, ScmResult result) {
+ super(result);
this.removedFiles = removedFiles;
}
- public List<ScmFile> getRemovedFiles()
- {
+ public List<ScmFile> getRemovedFiles() {
return removedFiles;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/status/AbstractStatusCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/status/AbstractStatusCommand.java
index 0fe059fed..5b48be64f 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/status/AbstractStatusCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/status/AbstractStatusCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.status;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.status;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.status;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.status;
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmException;
@@ -30,17 +29,13 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*
*/
-public abstract class AbstractStatusCommand
- extends AbstractCommand
-{
- protected abstract StatusScmResult executeStatusCommand( ScmProviderRepository repository, ScmFileSet fileSet )
- throws ScmException;
+public abstract class AbstractStatusCommand extends AbstractCommand {
+ protected abstract StatusScmResult executeStatusCommand(ScmProviderRepository repository, ScmFileSet fileSet)
+ throws ScmException;
/** {@inheritDoc} */
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- return executeStatusCommand( repository, fileSet );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ return executeStatusCommand(repository, fileSet);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/status/StatusScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/status/StatusScmResult.java
index 8a4e8acf2..7985d2294 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/status/StatusScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/status/StatusScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.status;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.status;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,57 +16,50 @@ package org.apache.maven.scm.command.status;
* specific language governing permissions and limitations
* under the License.
*/
-
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmResult;
+package org.apache.maven.scm.command.status;
import java.util.Collections;
import java.util.List;
+import org.apache.maven.scm.ScmFile;
+import org.apache.maven.scm.ScmResult;
+
/**
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*
*/
-public class StatusScmResult
- extends ScmResult
-{
+public class StatusScmResult extends ScmResult {
private static final long serialVersionUID = 7152442589455369403L;
-
+
private List<ScmFile> changedFiles;
- public StatusScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public StatusScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
this.changedFiles = Collections.emptyList();
}
- public StatusScmResult( String commandLine, List<ScmFile> changedFiles )
- {
- super( commandLine, null, null, true );
+ public StatusScmResult(String commandLine, List<ScmFile> changedFiles) {
+ super(commandLine, null, null, true);
- if ( changedFiles == null )
- {
- throw new NullPointerException( "changedFiles can't be null." );
+ if (changedFiles == null) {
+ throw new NullPointerException("changedFiles can't be null.");
}
this.changedFiles = changedFiles;
}
- public StatusScmResult( List<ScmFile> changedFiles, ScmResult result )
- {
- super( result );
+ public StatusScmResult(List<ScmFile> changedFiles, ScmResult result) {
+ super(result);
- if ( changedFiles == null )
- {
- throw new NullPointerException( "changedFiles can't be null." );
+ if (changedFiles == null) {
+ throw new NullPointerException("changedFiles can't be null.");
}
this.changedFiles = changedFiles;
}
- public List<ScmFile> getChangedFiles()
- {
+ public List<ScmFile> getChangedFiles() {
return changedFiles;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/AbstractTagCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/AbstractTagCommand.java
index 17188c91c..0dec628c8 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/AbstractTagCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/AbstractTagCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.tag;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.tag;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.tag;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.tag;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -33,9 +32,7 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public abstract class AbstractTagCommand
- extends AbstractCommand
-{
+public abstract class AbstractTagCommand extends AbstractCommand {
/**
* @deprecated use method {@link #executeTagCommand(ScmProviderRepository, ScmFileSet, String, ScmTagParameters)}
* @param repository TODO
@@ -45,41 +42,34 @@ public abstract class AbstractTagCommand
* @return TODO
* @throws ScmException if any
*/
- protected ScmResult executeTagCommand( ScmProviderRepository repository, ScmFileSet fileSet, String tagName,
- String message )
- throws ScmException
- {
- return executeTagCommand( repository, fileSet, tagName, new ScmTagParameters( message ) );
+ protected ScmResult executeTagCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, String tagName, String message) throws ScmException {
+ return executeTagCommand(repository, fileSet, tagName, new ScmTagParameters(message));
}
- protected abstract ScmResult executeTagCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- String tagName, ScmTagParameters scmTagParameters )
- throws ScmException;
+ protected abstract ScmResult executeTagCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, String tagName, ScmTagParameters scmTagParameters)
+ throws ScmException;
/** {@inheritDoc} */
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- String tagName = parameters.getString( CommandParameter.TAG_NAME );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ String tagName = parameters.getString(CommandParameter.TAG_NAME);
- ScmTagParameters scmTagParameters = parameters.getScmTagParameters( CommandParameter.SCM_TAG_PARAMETERS );
+ ScmTagParameters scmTagParameters = parameters.getScmTagParameters(CommandParameter.SCM_TAG_PARAMETERS);
- String message = parameters.getString( CommandParameter.MESSAGE, null );
+ String message = parameters.getString(CommandParameter.MESSAGE, null);
- if ( message != null )
- {
+ if (message != null) {
// if message was passed by CommandParameter.MESSAGE then use it.
- scmTagParameters.setMessage( message );
+ scmTagParameters.setMessage(message);
}
- if ( scmTagParameters.getMessage() == null )
- {
+ if (scmTagParameters.getMessage() == null) {
// if message hasn't been passed nor by ScmTagParameters nor by CommandParameter.MESSAGE then use default.
- scmTagParameters.setMessage( "[maven-scm] copy for tag " + tagName );
+ scmTagParameters.setMessage("[maven-scm] copy for tag " + tagName);
}
- return executeTagCommand( repository, fileSet, tagName, scmTagParameters );
+ return executeTagCommand(repository, fileSet, tagName, scmTagParameters);
}
-
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/TagScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/TagScmResult.java
index 497b2e086..9939109c7 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/TagScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/tag/TagScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.tag;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.tag;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.tag;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.tag;
import java.util.List;
@@ -29,34 +28,28 @@ import org.apache.maven.scm.ScmResult;
* @author Olivier Lamy
*
*/
-public class TagScmResult
- extends ScmResult
-{
+public class TagScmResult extends ScmResult {
private static final long serialVersionUID = -5068975000282095635L;
-
+
private List<ScmFile> taggedFiles;
- public TagScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public TagScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public TagScmResult( String commandLine, List<ScmFile> taggedFiles )
- {
- super( commandLine, null, null, true );
+ public TagScmResult(String commandLine, List<ScmFile> taggedFiles) {
+ super(commandLine, null, null, true);
this.taggedFiles = taggedFiles;
}
- public TagScmResult( List<ScmFile> taggedFiles, ScmResult result )
- {
- super( result );
+ public TagScmResult(List<ScmFile> taggedFiles, ScmResult result) {
+ super(result);
this.taggedFiles = taggedFiles;
}
- public List<ScmFile> getTaggedFiles()
- {
+ public List<ScmFile> getTaggedFiles() {
return taggedFiles;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/unedit/AbstractUnEditCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/unedit/AbstractUnEditCommand.java
index bc2b4cba7..929d2ca7d 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/unedit/AbstractUnEditCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/unedit/AbstractUnEditCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.unedit;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.unedit;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.unedit;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.unedit;
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmException;
@@ -29,17 +28,13 @@ import org.apache.maven.scm.provider.ScmProviderRepository;
/**
*
*/
-public abstract class AbstractUnEditCommand
- extends AbstractCommand
-{
+public abstract class AbstractUnEditCommand extends AbstractCommand {
/** {@inheritDoc} */
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- return executeUnEditCommand( repository, fileSet );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ return executeUnEditCommand(repository, fileSet);
}
- protected abstract ScmResult executeUnEditCommand( ScmProviderRepository repository, ScmFileSet fileSet )
- throws ScmException;
+ protected abstract ScmResult executeUnEditCommand(ScmProviderRepository repository, ScmFileSet fileSet)
+ throws ScmException;
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/unedit/UnEditScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/unedit/UnEditScmResult.java
index 687079c2e..d029ff777 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/unedit/UnEditScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/unedit/UnEditScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.unedit;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.unedit;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.unedit;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.unedit;
import java.util.List;
@@ -28,35 +27,28 @@ import org.apache.maven.scm.ScmResult;
* @author Olivier Lamy
*
*/
-public class UnEditScmResult
- extends ScmResult
-{
+public class UnEditScmResult extends ScmResult {
private static final long serialVersionUID = 257465331122587798L;
private List<ScmFile> unEditFiles;
- public UnEditScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public UnEditScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public UnEditScmResult( String commandLine, List<ScmFile> unEditFiles )
- {
- super( commandLine, null, null, true );
+ public UnEditScmResult(String commandLine, List<ScmFile> unEditFiles) {
+ super(commandLine, null, null, true);
this.unEditFiles = unEditFiles;
}
- public UnEditScmResult( List<ScmFile> unEditFiles, ScmResult result )
- {
- super( result );
+ public UnEditScmResult(List<ScmFile> unEditFiles, ScmResult result) {
+ super(result);
this.unEditFiles = unEditFiles;
}
- public List<ScmFile> getUnEditFiles()
- {
+ public List<ScmFile> getUnEditFiles() {
return unEditFiles;
}
-
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/unlock/AbstractUnlockCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/unlock/AbstractUnlockCommand.java
index b38e5b8ed..2801f2a64 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/unlock/AbstractUnlockCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/unlock/AbstractUnlockCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.unlock;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.unlock;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,9 @@ package org.apache.maven.scm.command.unlock;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.unlock;
+
+import java.io.File;
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmException;
@@ -25,23 +26,17 @@ import org.apache.maven.scm.ScmResult;
import org.apache.maven.scm.command.AbstractCommand;
import org.apache.maven.scm.provider.ScmProviderRepository;
-import java.io.File;
-
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse </a>
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public abstract class AbstractUnlockCommand
- extends AbstractCommand
-{
- protected abstract ScmResult executeUnlockCommand( ScmProviderRepository repository, File workingDirectory )
- throws ScmException;
+public abstract class AbstractUnlockCommand extends AbstractCommand {
+ protected abstract ScmResult executeUnlockCommand(ScmProviderRepository repository, File workingDirectory)
+ throws ScmException;
- public ScmResult executeCommand( ScmProviderRepository repository, File workingDirectory,
- CommandParameters parameters )
- throws ScmException
- {
- return executeUnlockCommand( repository, workingDirectory );
+ public ScmResult executeCommand(
+ ScmProviderRepository repository, File workingDirectory, CommandParameters parameters) throws ScmException {
+ return executeUnlockCommand(repository, workingDirectory);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/AbstractUntagCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/AbstractUntagCommand.java
index d3a9c16bb..a44eab243 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/AbstractUntagCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/AbstractUntagCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.untag;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.untag;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.untag;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.untag;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -29,9 +28,7 @@ import org.apache.maven.scm.command.AbstractCommand;
import org.apache.maven.scm.provider.ScmProviderRepository;
/** {@inheritDoc} */
-public abstract class AbstractUntagCommand
- extends AbstractCommand
-{
+public abstract class AbstractUntagCommand extends AbstractCommand {
/**
* execute untag command
*
@@ -41,21 +38,18 @@ public abstract class AbstractUntagCommand
* @return result of untag command
* @throws ScmException in case of error
*/
- protected abstract ScmResult executeUntagCommand( ScmProviderRepository repository,
- ScmFileSet fileSet, ScmUntagParameters scmUntagParameters )
- throws ScmException;
+ protected abstract ScmResult executeUntagCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, ScmUntagParameters scmUntagParameters)
+ throws ScmException;
/** {@inheritDoc} */
@Override
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- String tagName = parameters.getString( CommandParameter.TAG_NAME );
- String message = parameters.getString( CommandParameter.MESSAGE, "[maven-scm] remove tag " + tagName );
- ScmUntagParameters scmUntagParameters = new ScmUntagParameters( tagName, message );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ String tagName = parameters.getString(CommandParameter.TAG_NAME);
+ String message = parameters.getString(CommandParameter.MESSAGE, "[maven-scm] remove tag " + tagName);
+ ScmUntagParameters scmUntagParameters = new ScmUntagParameters(tagName, message);
- return executeUntagCommand( repository, fileSet, scmUntagParameters );
+ return executeUntagCommand(repository, fileSet, scmUntagParameters);
}
-
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/UntagScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/UntagScmResult.java
index 47babaf2f..dbbe769c3 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/UntagScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/untag/UntagScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.untag;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.untag;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,27 +16,23 @@ package org.apache.maven.scm.command.untag;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.untag;
import org.apache.maven.scm.ScmResult;
/** {@inheritDoc} */
-public class UntagScmResult
- extends ScmResult
-{
+public class UntagScmResult extends ScmResult {
private static final long serialVersionUID = -5068975000282095635L;
- public UntagScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public UntagScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public UntagScmResult( String commandLine )
- {
- super( commandLine, null, null, true );
+ public UntagScmResult(String commandLine) {
+ super(commandLine, null, null, true);
}
- public UntagScmResult( ScmResult result )
- {
- super( result );
+ public UntagScmResult(ScmResult result) {
+ super(result);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/AbstractUpdateCommand.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/AbstractUpdateCommand.java
index 09f32376b..0d33b87d9 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/AbstractUpdateCommand.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/AbstractUpdateCommand.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.update;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.update;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,11 @@ package org.apache.maven.scm.command.update;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.update;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
import org.apache.maven.scm.ChangeSet;
import org.apache.maven.scm.CommandParameter;
@@ -33,80 +36,60 @@ import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
import org.apache.maven.scm.command.changelog.ChangeLogSet;
import org.apache.maven.scm.provider.ScmProviderRepository;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse </a>
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public abstract class AbstractUpdateCommand
- extends AbstractCommand
-{
- protected abstract UpdateScmResult executeUpdateCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- ScmVersion scmVersion )
- throws ScmException;
+public abstract class AbstractUpdateCommand extends AbstractCommand {
+ protected abstract UpdateScmResult executeUpdateCommand(
+ ScmProviderRepository repository, ScmFileSet fileSet, ScmVersion scmVersion) throws ScmException;
/** {@inheritDoc} */
- public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
+ public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ ScmVersion scmVersion = parameters.getScmVersion(CommandParameter.SCM_VERSION, null);
- boolean runChangelog = Boolean.valueOf(
- parameters.getString( CommandParameter.RUN_CHANGELOG_WITH_UPDATE, "true" ) ).booleanValue();
+ boolean runChangelog = Boolean.valueOf(parameters.getString(CommandParameter.RUN_CHANGELOG_WITH_UPDATE, "true"))
+ .booleanValue();
- UpdateScmResult updateScmResult = executeUpdateCommand( repository, fileSet, scmVersion );
+ UpdateScmResult updateScmResult = executeUpdateCommand(repository, fileSet, scmVersion);
List<ScmFile> filesList = updateScmResult.getUpdatedFiles();
- if ( !runChangelog )
- {
+ if (!runChangelog) {
return updateScmResult;
}
ChangeLogCommand changeLogCmd = getChangeLogCommand();
- if ( filesList != null && filesList.size() > 0 && changeLogCmd != null )
- {
+ if (filesList != null && filesList.size() > 0 && changeLogCmd != null) {
ChangeLogScmResult changeLogScmResult =
- (ChangeLogScmResult) changeLogCmd.executeCommand( repository, fileSet, parameters );
+ (ChangeLogScmResult) changeLogCmd.executeCommand(repository, fileSet, parameters);
List<ChangeSet> changes = new ArrayList<ChangeSet>();
ChangeLogSet changeLogSet = changeLogScmResult.getChangeLog();
- if ( changeLogSet != null )
- {
+ if (changeLogSet != null) {
Date startDate = null;
- try
- {
- startDate = parameters.getDate( CommandParameter.START_DATE );
- }
- catch ( ScmException e )
- {
- //Do nothing, startDate isn't define.
+ try {
+ startDate = parameters.getDate(CommandParameter.START_DATE);
+ } catch (ScmException e) {
+ // Do nothing, startDate isn't define.
}
- for ( ChangeSet change : changeLogSet.getChangeSets() )
- {
- if ( startDate != null && change.getDate() != null )
- {
- if ( startDate.after( change.getDate() ) )
- {
+ for (ChangeSet change : changeLogSet.getChangeSets()) {
+ if (startDate != null && change.getDate() != null) {
+ if (startDate.after(change.getDate())) {
continue;
}
}
- for ( ScmFile currentFile : filesList )
- {
- if ( change.containsFilename( currentFile.getPath() ) )
- {
- changes.add( change );
+ for (ScmFile currentFile : filesList) {
+ if (change.containsFilename(currentFile.getPath())) {
+ changes.add(change);
break;
}
@@ -114,7 +97,7 @@ public abstract class AbstractUpdateCommand
}
}
- updateScmResult.setChanges( changes );
+ updateScmResult.setChanges(changes);
}
return updateScmResult;
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResult.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResult.java
index 7bfabf24f..57296e06f 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResult.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResult.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.update;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.update;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,43 +16,38 @@ package org.apache.maven.scm.command.update;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.update;
+
+import java.util.ArrayList;
+import java.util.List;
import org.apache.maven.scm.ChangeSet;
import org.apache.maven.scm.ScmFile;
import org.apache.maven.scm.ScmResult;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
*
*/
-public class UpdateScmResult
- extends ScmResult
-{
+public class UpdateScmResult extends ScmResult {
private static final long serialVersionUID = -1578149496089492585L;
private List<ScmFile> updatedFiles;
private List<ChangeSet> changes;
- public UpdateScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public UpdateScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
}
- public UpdateScmResult( String commandLine, List<ScmFile> updatedFiles )
- {
- super( commandLine, null, null, true );
+ public UpdateScmResult(String commandLine, List<ScmFile> updatedFiles) {
+ super(commandLine, null, null, true);
this.updatedFiles = updatedFiles;
-
}
- public UpdateScmResult( List<ScmFile> updatedFiles, List<ChangeSet> changes, ScmResult result )
- {
- super( result );
+ public UpdateScmResult(List<ScmFile> updatedFiles, List<ChangeSet> changes, ScmResult result) {
+ super(result);
this.updatedFiles = updatedFiles;
@@ -65,25 +58,21 @@ public class UpdateScmResult
*
* @return List of {@link ScmFile}
*/
- public List<ScmFile> getUpdatedFiles()
- {
+ public List<ScmFile> getUpdatedFiles() {
return updatedFiles;
}
/**
* @return {@link List} of {@link ChangeSet}
*/
- public List<ChangeSet> getChanges()
- {
- if ( changes == null )
- {
+ public List<ChangeSet> getChanges() {
+ if (changes == null) {
return new ArrayList<ChangeSet>();
}
return changes;
}
- public void setChanges( List<ChangeSet> changes )
- {
+ public void setChanges(List<ChangeSet> changes) {
this.changes = changes;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResultWithRevision.java b/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResultWithRevision.java
index d735faccd..91190e85e 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResultWithRevision.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/command/update/UpdateScmResultWithRevision.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.command.update;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.command.update;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.command.update;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.command.update;
import java.util.List;
@@ -31,38 +30,32 @@ import org.apache.maven.scm.ScmResult;
* @author Olivier Lamy
*
*/
-public class UpdateScmResultWithRevision
- extends UpdateScmResult
-{
+public class UpdateScmResultWithRevision extends UpdateScmResult {
private static final long serialVersionUID = 7644079089026359667L;
private String revision;
- public UpdateScmResultWithRevision( String commandLine, String providerMessage, String commandOutput,
- String revision, boolean success )
- {
- super( commandLine, providerMessage, commandOutput, success );
+ public UpdateScmResultWithRevision(
+ String commandLine, String providerMessage, String commandOutput, String revision, boolean success) {
+ super(commandLine, providerMessage, commandOutput, success);
this.revision = revision;
}
- public UpdateScmResultWithRevision( String commandLine, List<ScmFile> updatedFiles, String revision )
- {
- super( commandLine, updatedFiles );
+ public UpdateScmResultWithRevision(String commandLine, List<ScmFile> updatedFiles, String revision) {
+ super(commandLine, updatedFiles);
this.revision = revision;
}
- public UpdateScmResultWithRevision( List<ScmFile> updatedFiles, List<ChangeSet> changes, String revision,
- ScmResult result )
- {
- super( updatedFiles, changes, result );
+ public UpdateScmResultWithRevision(
+ List<ScmFile> updatedFiles, List<ChangeSet> changes, String revision, ScmResult result) {
+ super(updatedFiles, changes, result);
this.revision = revision;
}
- public String getRevision()
- {
+ public String getRevision() {
return revision;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
index 8514a1bb9..5abd458a0 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.manager;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.manager;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.manager;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.manager;
import java.io.File;
import java.util.ArrayList;
@@ -66,21 +65,18 @@ import static java.util.Objects.requireNonNull;
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*/
-public abstract class AbstractScmManager
- implements ScmManager
-{
- protected final Logger logger = LoggerFactory.getLogger( getClass() );
+public abstract class AbstractScmManager implements ScmManager {
+ protected final Logger logger = LoggerFactory.getLogger(getClass());
private final Map<String, ScmProvider> scmProviders = new ConcurrentHashMap<>();
private final Map<String, String> userProviderTypes = new ConcurrentHashMap<>();
- protected void setScmProviders( Map<String, ScmProvider> providers )
- {
- requireNonNull( providers );
+ protected void setScmProviders(Map<String, ScmProvider> providers) {
+ requireNonNull(providers);
this.scmProviders.clear();
// first provider must not be overwritten by subsequent ones if they are registered for the same key
- providers.forEach( this.scmProviders::putIfAbsent );
+ providers.forEach(this.scmProviders::putIfAbsent);
}
/**
@@ -89,9 +85,8 @@ public abstract class AbstractScmManager
* @deprecated use {@link #setScmProvider(String, ScmProvider)} instead
*/
@Deprecated
- protected void addScmProvider( String providerType, ScmProvider provider )
- {
- setScmProvider( providerType, provider );
+ protected void addScmProvider(String providerType, ScmProvider provider) {
+ setScmProvider(providerType, provider);
}
/**
@@ -102,11 +97,10 @@ public abstract class AbstractScmManager
* @param provider the provider that will be used for that SCM type
*/
@Override
- public void setScmProvider( String providerType, ScmProvider provider )
- {
- requireNonNull( providerType );
- requireNonNull( provider );
- scmProviders.put( providerType, provider );
+ public void setScmProvider(String providerType, ScmProvider provider) {
+ requireNonNull(providerType);
+ requireNonNull(provider);
+ scmProviders.put(providerType, provider);
}
// ----------------------------------------------------------------------
@@ -117,46 +111,39 @@ public abstract class AbstractScmManager
* {@inheritDoc}
*/
@Override
- public ScmProvider getProviderByUrl( String scmUrl )
- throws ScmRepositoryException, NoSuchScmProviderException
- {
- requireNonNull( scmUrl, "The scm url cannot be null." );
+ public ScmProvider getProviderByUrl(String scmUrl) throws ScmRepositoryException, NoSuchScmProviderException {
+ requireNonNull(scmUrl, "The scm url cannot be null.");
- String providerType = ScmUrlUtils.getProvider( scmUrl );
+ String providerType = ScmUrlUtils.getProvider(scmUrl);
- return getProviderByType( providerType );
+ return getProviderByType(providerType);
}
/**
* {@inheritDoc}
*/
@Override
- public void setScmProviderImplementation( String providerType, String providerImplementation )
- {
- requireNonNull( providerType );
- requireNonNull( providerImplementation );
- userProviderTypes.put( providerType, providerImplementation );
+ public void setScmProviderImplementation(String providerType, String providerImplementation) {
+ requireNonNull(providerType);
+ requireNonNull(providerImplementation);
+ userProviderTypes.put(providerType, providerImplementation);
}
/**
* {@inheritDoc}
*/
@Override
- public ScmProvider getProviderByType( String providerType )
- throws NoSuchScmProviderException
- {
- String usedProviderType = System.getProperty( "maven.scm.provider." + providerType + ".implementation" );
+ public ScmProvider getProviderByType(String providerType) throws NoSuchScmProviderException {
+ String usedProviderType = System.getProperty("maven.scm.provider." + providerType + ".implementation");
- if ( usedProviderType == null )
- {
- usedProviderType = userProviderTypes.getOrDefault( providerType, providerType );
+ if (usedProviderType == null) {
+ usedProviderType = userProviderTypes.getOrDefault(providerType, providerType);
}
- ScmProvider scmProvider = scmProviders.get( usedProviderType );
+ ScmProvider scmProvider = scmProviders.get(usedProviderType);
- if ( scmProvider == null )
- {
- throw new NoSuchScmProviderException( usedProviderType );
+ if (scmProvider == null) {
+ throw new NoSuchScmProviderException(usedProviderType);
}
return scmProvider;
@@ -166,10 +153,8 @@ public abstract class AbstractScmManager
* {@inheritDoc}
*/
@Override
- public ScmProvider getProviderByRepository( ScmRepository repository )
- throws NoSuchScmProviderException
- {
- return getProviderByType( repository.getProvider() );
+ public ScmProvider getProviderByRepository(ScmRepository repository) throws NoSuchScmProviderException {
+ return getProviderByType(repository.getProvider());
}
// ----------------------------------------------------------------------
@@ -180,22 +165,20 @@ public abstract class AbstractScmManager
* {@inheritDoc}
*/
@Override
- public ScmRepository makeScmRepository( String scmUrl )
- throws ScmRepositoryException, NoSuchScmProviderException
- {
- requireNonNull( scmUrl, "The scm url cannot be null." );
+ public ScmRepository makeScmRepository(String scmUrl) throws ScmRepositoryException, NoSuchScmProviderException {
+ requireNonNull(scmUrl, "The scm url cannot be null.");
- char delimiter = ScmUrlUtils.getDelimiter( scmUrl ).charAt( 0 );
+ char delimiter = ScmUrlUtils.getDelimiter(scmUrl).charAt(0);
- String providerType = ScmUrlUtils.getProvider( scmUrl );
+ String providerType = ScmUrlUtils.getProvider(scmUrl);
- ScmProvider provider = getProviderByType( providerType );
+ ScmProvider provider = getProviderByType(providerType);
- String scmSpecificUrl = cleanScmUrl( scmUrl.substring( providerType.length() + 5 ) );
+ String scmSpecificUrl = cleanScmUrl(scmUrl.substring(providerType.length() + 5));
- ScmProviderRepository providerRepository = provider.makeProviderScmRepository( scmSpecificUrl, delimiter );
+ ScmProviderRepository providerRepository = provider.makeProviderScmRepository(scmSpecificUrl, delimiter);
- return new ScmRepository( providerType, providerRepository );
+ return new ScmRepository(providerType, providerRepository);
}
/**
@@ -204,48 +187,42 @@ public abstract class AbstractScmManager
* @param scmUrl the SCM url
* @return the cleaned SCM url
*/
- protected String cleanScmUrl( String scmUrl )
- {
- requireNonNull( scmUrl, "The scm url cannot be null." );
+ protected String cleanScmUrl(String scmUrl) {
+ requireNonNull(scmUrl, "The scm url cannot be null.");
String pathSeparator = "";
int indexOfDoubleDot = -1;
// Clean Unix path
- if ( scmUrl.indexOf( "../" ) > 1 )
- {
+ if (scmUrl.indexOf("../") > 1) {
pathSeparator = "/";
- indexOfDoubleDot = scmUrl.indexOf( "../" );
+ indexOfDoubleDot = scmUrl.indexOf("../");
}
// Clean windows path
- if ( scmUrl.indexOf( "..\\" ) > 1 )
- {
+ if (scmUrl.indexOf("..\\") > 1) {
pathSeparator = "\\";
- indexOfDoubleDot = scmUrl.indexOf( "..\\" );
+ indexOfDoubleDot = scmUrl.indexOf("..\\");
}
- if ( indexOfDoubleDot > 1 )
- {
- int startOfTextToRemove = scmUrl.substring( 0, indexOfDoubleDot - 1 ).lastIndexOf( pathSeparator );
+ if (indexOfDoubleDot > 1) {
+ int startOfTextToRemove = scmUrl.substring(0, indexOfDoubleDot - 1).lastIndexOf(pathSeparator);
String beginUrl = "";
- if ( startOfTextToRemove >= 0 )
- {
- beginUrl = scmUrl.substring( 0, startOfTextToRemove );
+ if (startOfTextToRemove >= 0) {
+ beginUrl = scmUrl.substring(0, startOfTextToRemove);
}
- String endUrl = scmUrl.substring( indexOfDoubleDot + 3 );
+ String endUrl = scmUrl.substring(indexOfDoubleDot + 3);
scmUrl = beginUrl + pathSeparator + endUrl;
// Check if we have other double dot
- if ( scmUrl.indexOf( "../" ) > 1 || scmUrl.indexOf( "..\\" ) > 1 )
- {
- scmUrl = cleanScmUrl( scmUrl );
+ if (scmUrl.indexOf("../") > 1 || scmUrl.indexOf("..\\") > 1) {
+ scmUrl = cleanScmUrl(scmUrl);
}
}
@@ -256,49 +233,44 @@ public abstract class AbstractScmManager
* {@inheritDoc}
*/
@Override
- public ScmRepository makeProviderScmRepository( String providerType, File path )
- throws ScmRepositoryException, UnknownRepositoryStructure, NoSuchScmProviderException
- {
- requireNonNull( providerType, "The provider type cannot be null." );
+ public ScmRepository makeProviderScmRepository(String providerType, File path)
+ throws ScmRepositoryException, UnknownRepositoryStructure, NoSuchScmProviderException {
+ requireNonNull(providerType, "The provider type cannot be null.");
- ScmProvider provider = getProviderByType( providerType );
+ ScmProvider provider = getProviderByType(providerType);
- ScmProviderRepository providerRepository = provider.makeProviderScmRepository( path );
+ ScmProviderRepository providerRepository = provider.makeProviderScmRepository(path);
- return new ScmRepository( providerType, providerRepository );
+ return new ScmRepository(providerType, providerRepository);
}
/**
* {@inheritDoc}
*/
@Override
- public List<String> validateScmRepository( String scmUrl )
- {
- List<String> messages = new ArrayList<>( ScmUrlUtils.validate( scmUrl ) );
+ public List<String> validateScmRepository(String scmUrl) {
+ List<String> messages = new ArrayList<>(ScmUrlUtils.validate(scmUrl));
- String providerType = ScmUrlUtils.getProvider( scmUrl );
+ String providerType = ScmUrlUtils.getProvider(scmUrl);
ScmProvider provider;
- try
- {
- provider = getProviderByType( providerType );
- }
- catch ( NoSuchScmProviderException e )
- {
- messages.add( "No such provider installed '" + providerType + "'." );
+ try {
+ provider = getProviderByType(providerType);
+ } catch (NoSuchScmProviderException e) {
+ messages.add("No such provider installed '" + providerType + "'.");
return messages;
}
- String scmSpecificUrl = cleanScmUrl( scmUrl.substring( providerType.length() + 5 ) );
+ String scmSpecificUrl = cleanScmUrl(scmUrl.substring(providerType.length() + 5));
- List<String> providerMessages =
- provider.validateScmUrl( scmSpecificUrl, ScmUrlUtils.getDelimiter( scmUrl ).charAt( 0 ) );
+ List<String> providerMessages = provider.validateScmUrl(
+ scmSpecificUrl, ScmUrlUtils.getDelimiter(scmUrl).charAt(0));
- requireNonNull( providerMessages, "The SCM provider cannot return null from validateScmUrl()." );
+ requireNonNull(providerMessages, "The SCM provider cannot return null from validateScmUrl().");
- messages.addAll( providerMessages );
+ messages.addAll(providerMessages);
return messages;
}
@@ -307,417 +279,365 @@ public abstract class AbstractScmManager
* {@inheritDoc}
*/
@Override
- public AddScmResult add( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).add( repository, fileSet );
+ public AddScmResult add(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
+ return this.getProviderByRepository(repository).add(repository, fileSet);
}
/**
* {@inheritDoc}
*/
@Override
- public AddScmResult add( ScmRepository repository, ScmFileSet fileSet, String message )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).add( repository, fileSet, message );
+ public AddScmResult add(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException {
+ return this.getProviderByRepository(repository).add(repository, fileSet, message);
}
/**
* {@inheritDoc}
*/
@Override
- public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName )
- throws ScmException
- {
- ScmBranchParameters scmBranchParameters = new ScmBranchParameters( "" );
- return this.getProviderByRepository( repository ).branch( repository, fileSet, branchName,
- scmBranchParameters );
+ public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName) throws ScmException {
+ ScmBranchParameters scmBranchParameters = new ScmBranchParameters("");
+ return this.getProviderByRepository(repository).branch(repository, fileSet, branchName, scmBranchParameters);
}
/**
* {@inheritDoc}
*/
@Override
- public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message )
- throws ScmException
- {
- ScmBranchParameters scmBranchParameters = new ScmBranchParameters( message );
- return this.getProviderByRepository( repository ).branch( repository, fileSet, branchName,
- scmBranchParameters );
+ public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName, String message)
+ throws ScmException {
+ ScmBranchParameters scmBranchParameters = new ScmBranchParameters(message);
+ return this.getProviderByRepository(repository).branch(repository, fileSet, branchName, scmBranchParameters);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
- int numDays, ScmBranch branch )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).changeLog( repository, fileSet, startDate, endDate, numDays,
- branch );
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch)
+ throws ScmException {
+ return this.getProviderByRepository(repository)
+ .changeLog(repository, fileSet, startDate, endDate, numDays, branch);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
- int numDays, ScmBranch branch, String datePattern )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).changeLog( repository, fileSet, startDate, endDate, numDays,
- branch, datePattern );
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository,
+ ScmFileSet fileSet,
+ Date startDate,
+ Date endDate,
+ int numDays,
+ ScmBranch branch,
+ String datePattern)
+ throws ScmException {
+ return this.getProviderByRepository(repository)
+ .changeLog(repository, fileSet, startDate, endDate, numDays, branch, datePattern);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ChangeLogScmRequest scmRequest )
- throws ScmException
- {
- return this.getProviderByRepository( scmRequest.getScmRepository() ).changeLog( scmRequest );
+ public ChangeLogScmResult changeLog(ChangeLogScmRequest scmRequest) throws ScmException {
+ return this.getProviderByRepository(scmRequest.getScmRepository()).changeLog(scmRequest);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion,
- ScmVersion endVersion )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).changeLog( repository, fileSet, startVersion, endVersion );
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion)
+ throws ScmException {
+ return this.getProviderByRepository(repository).changeLog(repository, fileSet, startVersion, endVersion);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision,
- ScmVersion endRevision, String datePattern )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).changeLog( repository, fileSet, startRevision, endRevision,
- datePattern );
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository,
+ ScmFileSet fileSet,
+ ScmVersion startRevision,
+ ScmVersion endRevision,
+ String datePattern)
+ throws ScmException {
+ return this.getProviderByRepository(repository)
+ .changeLog(repository, fileSet, startRevision, endRevision, datePattern);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).checkIn( repository, fileSet, message );
+ public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException {
+ return this.getProviderByRepository(repository).checkIn(repository, fileSet, message);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).checkIn( repository, fileSet, revision, message );
+ public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message)
+ throws ScmException {
+ return this.getProviderByRepository(repository).checkIn(repository, fileSet, revision, message);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).checkOut( repository, fileSet );
+ public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
+ return this.getProviderByRepository(repository).checkOut(repository, fileSet);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).checkOut( repository, fileSet, version );
+ public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, ScmVersion version)
+ throws ScmException {
+ return this.getProviderByRepository(repository).checkOut(repository, fileSet, version);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, boolean recursive )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).checkOut( repository, fileSet, recursive );
+ public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, boolean recursive)
+ throws ScmException {
+ return this.getProviderByRepository(repository).checkOut(repository, fileSet, recursive);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
- boolean recursive )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).checkOut( repository, fileSet, version, recursive );
+ public CheckOutScmResult checkOut(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean recursive) throws ScmException {
+ return this.getProviderByRepository(repository).checkOut(repository, fileSet, version, recursive);
}
/**
* {@inheritDoc}
*/
@Override
- public DiffScmResult diff( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion,
- ScmVersion endVersion )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).diff( repository, fileSet, startVersion, endVersion );
+ public DiffScmResult diff(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion)
+ throws ScmException {
+ return this.getProviderByRepository(repository).diff(repository, fileSet, startVersion, endVersion);
}
/**
* {@inheritDoc}
*/
@Override
- public EditScmResult edit( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).edit( repository, fileSet );
+ public EditScmResult edit(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
+ return this.getProviderByRepository(repository).edit(repository, fileSet);
}
/**
* {@inheritDoc}
*/
@Override
- public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).export( repository, fileSet );
+ public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
+ return this.getProviderByRepository(repository).export(repository, fileSet);
}
/**
* {@inheritDoc}
*/
@Override
- public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).export( repository, fileSet, version );
+ public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, ScmVersion version)
+ throws ScmException {
+ return this.getProviderByRepository(repository).export(repository, fileSet, version);
}
/**
* {@inheritDoc}
*/
@Override
- public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String outputDirectory )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).export( repository, fileSet, (ScmVersion) null,
- outputDirectory );
+ public ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, String outputDirectory)
+ throws ScmException {
+ return this.getProviderByRepository(repository).export(repository, fileSet, (ScmVersion) null, outputDirectory);
}
/**
* {@inheritDoc}
*/
@Override
- public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
- String outputDirectory )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).export( repository, fileSet, version, outputDirectory );
+ public ExportScmResult export(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory)
+ throws ScmException {
+ return this.getProviderByRepository(repository).export(repository, fileSet, version, outputDirectory);
}
/**
* {@inheritDoc}
*/
@Override
- public ListScmResult list( ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).list( repository, fileSet, recursive, version );
+ public ListScmResult list(ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version)
+ throws ScmException {
+ return this.getProviderByRepository(repository).list(repository, fileSet, recursive, version);
}
/**
* {@inheritDoc}
*/
@Override
- public MkdirScmResult mkdir( ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).mkdir( repository, fileSet, message, createInLocal );
+ public MkdirScmResult mkdir(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal)
+ throws ScmException {
+ return this.getProviderByRepository(repository).mkdir(repository, fileSet, message, createInLocal);
}
/**
* {@inheritDoc}
*/
@Override
- public RemoveScmResult remove( ScmRepository repository, ScmFileSet fileSet, String message )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).remove( repository, fileSet, message );
+ public RemoveScmResult remove(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException {
+ return this.getProviderByRepository(repository).remove(repository, fileSet, message);
}
/**
* {@inheritDoc}
*/
@Override
- public StatusScmResult status( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).status( repository, fileSet );
+ public StatusScmResult status(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
+ return this.getProviderByRepository(repository).status(repository, fileSet);
}
/**
* {@inheritDoc}
*/
@Override
- public TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName )
- throws ScmException
- {
- return this.tag( repository, fileSet, tagName, "" );
+ public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName) throws ScmException {
+ return this.tag(repository, fileSet, tagName, "");
}
/**
* {@inheritDoc}
*/
@Override
- public TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName, String message )
- throws ScmException
- {
- ScmTagParameters scmTagParameters = new ScmTagParameters( message );
- return this.getProviderByRepository( repository ).tag( repository, fileSet, tagName, scmTagParameters );
+ public TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName, String message)
+ throws ScmException {
+ ScmTagParameters scmTagParameters = new ScmTagParameters(message);
+ return this.getProviderByRepository(repository).tag(repository, fileSet, tagName, scmTagParameters);
}
/**
* {@inheritDoc}
*/
@Override
- public UnEditScmResult unedit( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).unedit( repository, fileSet );
+ public UnEditScmResult unedit(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
+ return this.getProviderByRepository(repository).unedit(repository, fileSet);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet );
+ public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
+ return this.getProviderByRepository(repository).update(repository, fileSet);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet, version );
+ public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version)
+ throws ScmException {
+ return this.getProviderByRepository(repository).update(repository, fileSet, version);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, boolean runChangelog )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet, runChangelog );
+ public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, boolean runChangelog)
+ throws ScmException {
+ return this.getProviderByRepository(repository).update(repository, fileSet, runChangelog);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
- boolean runChangelog )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet, version, runChangelog );
+ public UpdateScmResult update(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog)
+ throws ScmException {
+ return this.getProviderByRepository(repository).update(repository, fileSet, version, runChangelog);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String datePattern )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion) null, datePattern );
+ public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String datePattern)
+ throws ScmException {
+ return this.getProviderByRepository(repository).update(repository, fileSet, (ScmVersion) null, datePattern);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
- String datePattern )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet, version, datePattern );
+ public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern)
+ throws ScmException {
+ return this.getProviderByRepository(repository).update(repository, fileSet, version, datePattern);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion) null, lastUpdate );
+ public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, Date lastUpdate) throws ScmException {
+ return this.getProviderByRepository(repository).update(repository, fileSet, (ScmVersion) null, lastUpdate);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet, version, lastUpdate );
+ public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate)
+ throws ScmException {
+ return this.getProviderByRepository(repository).update(repository, fileSet, version, lastUpdate);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate, String datePattern )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion) null, lastUpdate,
- datePattern );
+ public UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, Date lastUpdate, String datePattern)
+ throws ScmException {
+ return this.getProviderByRepository(repository)
+ .update(repository, fileSet, (ScmVersion) null, lastUpdate, datePattern);
}
/**
* {@inheritDoc}
*/
@Override
- public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate,
- String datePattern )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).update( repository, fileSet, version, lastUpdate,
- datePattern );
+ public UpdateScmResult update(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate, String datePattern)
+ throws ScmException {
+ return this.getProviderByRepository(repository).update(repository, fileSet, version, lastUpdate, datePattern);
}
/**
* {@inheritDoc}
*/
@Override
- public BlameScmResult blame( ScmRepository repository, ScmFileSet fileSet, String filename )
- throws ScmException
- {
- return this.getProviderByRepository( repository ).blame( repository, fileSet, filename );
+ public BlameScmResult blame(ScmRepository repository, ScmFileSet fileSet, String filename) throws ScmException {
+ return this.getProviderByRepository(repository).blame(repository, fileSet, filename);
}
@Override
- public BlameScmResult blame( BlameScmRequest blameScmRequest )
- throws ScmException
- {
- return this.getProviderByRepository( blameScmRequest.getScmRepository() ).blame( blameScmRequest );
+ public BlameScmResult blame(BlameScmRequest blameScmRequest) throws ScmException {
+ return this.getProviderByRepository(blameScmRequest.getScmRepository()).blame(blameScmRequest);
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/BasicScmManager.java b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/BasicScmManager.java
index 31eef8ecf..0ab0630e2 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/BasicScmManager.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/BasicScmManager.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.manager;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.manager;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,12 +16,10 @@ package org.apache.maven.scm.manager;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.manager;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class BasicScmManager
- extends AbstractScmManager
-{
-}
+public class BasicScmManager extends AbstractScmManager {}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/NoSuchScmProviderException.java b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/NoSuchScmProviderException.java
index 9b1ad888f..bef6757d9 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/NoSuchScmProviderException.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/NoSuchScmProviderException.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.manager;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.manager;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.scm.manager;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.manager;
import org.apache.maven.scm.ScmException;
@@ -28,21 +27,17 @@ import static java.util.Objects.requireNonNull;
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
-public class NoSuchScmProviderException
- extends ScmException
-{
+public class NoSuchScmProviderException extends ScmException {
static final long serialVersionUID = 4770645185214496323L;
private final String providerName;
- public NoSuchScmProviderException( String providerName )
- {
- super( "No such provider: '" + providerName + "'." );
- this.providerName = requireNonNull( providerName );
+ public NoSuchScmProviderException(String providerName) {
+ super("No such provider: '" + providerName + "'.");
+ this.providerName = requireNonNull(providerName);
}
- public String getProviderName()
- {
+ public String getProviderName() {
return providerName;
}
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
index 7ff10b862..3e893a23a 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.manager;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.manager;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,11 @@ package org.apache.maven.scm.manager;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.manager;
+
+import java.io.File;
+import java.util.Date;
+import java.util.List;
import org.apache.maven.scm.ScmBranch;
import org.apache.maven.scm.ScmException;
@@ -46,10 +49,6 @@ import org.apache.maven.scm.repository.ScmRepository;
import org.apache.maven.scm.repository.ScmRepositoryException;
import org.apache.maven.scm.repository.UnknownRepositoryStructure;
-import java.io.File;
-import java.util.Date;
-import java.util.List;
-
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
@@ -57,8 +56,7 @@ import java.util.List;
* @author Olivier Lamy
*
*/
-public interface ScmManager
-{
+public interface ScmManager {
// ----------------------------------------------------------------------
// Repository
// ----------------------------------------------------------------------
@@ -71,11 +69,10 @@ public interface ScmManager
* @throws ScmRepositoryException if an error occurs in the scm repository construction
* @throws NoSuchScmProviderException if the provider doesn't exist
*/
- ScmRepository makeScmRepository( String scmUrl )
- throws ScmRepositoryException, NoSuchScmProviderException;
+ ScmRepository makeScmRepository(String scmUrl) throws ScmRepositoryException, NoSuchScmProviderException;
- ScmRepository makeProviderScmRepository( String providerType, File path )
- throws ScmRepositoryException, UnknownRepositoryStructure, NoSuchScmProviderException;
+ ScmRepository makeProviderScmRepository(String providerType, File path)
+ throws ScmRepositoryException, UnknownRepositoryStructure, NoSuchScmProviderException;
/**
* Validate a SCM URL.
@@ -83,10 +80,9 @@ public interface ScmManager
* @param scmUrl the SCM URL to validate
* @return <code>List</code> of <code>String</code> objects with the messages returned by the SCM provider
*/
- List<String> validateScmRepository( String scmUrl );
+ List<String> validateScmRepository(String scmUrl);
- ScmProvider getProviderByUrl( String scmUrl )
- throws ScmRepositoryException, NoSuchScmProviderException;
+ ScmProvider getProviderByUrl(String scmUrl) throws ScmRepositoryException, NoSuchScmProviderException;
/**
* Returns the default provider registered for this providerType or a specific implementation if the
@@ -97,11 +93,9 @@ public interface ScmManager
* @return The scm provider
* @throws NoSuchScmProviderException if the provider doesn't exist
*/
- ScmProvider getProviderByType( String providerType )
- throws NoSuchScmProviderException;
+ ScmProvider getProviderByType(String providerType) throws NoSuchScmProviderException;
- ScmProvider getProviderByRepository( ScmRepository repository )
- throws NoSuchScmProviderException;
+ ScmProvider getProviderByRepository(ScmRepository repository) throws NoSuchScmProviderException;
/**
* Set a provider to be used for a type of SCM. If there was already a designed provider for that type it will be
@@ -110,7 +104,7 @@ public interface ScmManager
* @param providerType the type of SCM, eg. <code>svn</code>, <code>git</code>
* @param provider the provider that will be used for that SCM type
*/
- void setScmProvider( String providerType, ScmProvider provider );
+ void setScmProvider(String providerType, ScmProvider provider);
/**
* Set the provider implementation
@@ -119,7 +113,7 @@ public interface ScmManager
* @param providerImplementation The provider implementation (the role-hint of the provider), eg. <code>git</code>,
* <code>svn</code>
*/
- void setScmProviderImplementation( String providerType, String providerImplementation );
+ void setScmProviderImplementation(String providerType, String providerImplementation);
/**
* Adds the given files to the source control system
@@ -131,8 +125,7 @@ public interface ScmManager
* @throws ScmException if any
*
*/
- AddScmResult add( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException;
+ AddScmResult add(ScmRepository repository, ScmFileSet fileSet) throws ScmException;
/**
* Adds the given files to the source control system
@@ -144,8 +137,7 @@ public interface ScmManager
* have been added
* @throws ScmException if any
*/
- AddScmResult add( ScmRepository repository, ScmFileSet fileSet, String message )
- throws ScmException;
+ AddScmResult add(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException;
/**
* Branch (or label in some systems) will create a branch of the source file with a certain branch name
@@ -157,8 +149,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName )
- throws ScmException;
+ BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName) throws ScmException;
/**
* Branch (or label in some systems) will create a branch of the source file with a certain branch name
@@ -171,8 +162,8 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message )
- throws ScmException;
+ BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName, String message)
+ throws ScmException;
/**
* Returns the changes that have happend in the source control system in a certain period of time. This can be
@@ -190,9 +181,9 @@ public interface ScmManager
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
- ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
- int numDays, ScmBranch branch )
- throws ScmException;
+ ChangeLogScmResult changeLog(
+ ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch)
+ throws ScmException;
/**
* Returns the changes that have happend in the source control system in a certain period of time. This can be
@@ -211,9 +202,15 @@ public interface ScmManager
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
- ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
- int numDays, ScmBranch branch, String datePattern )
- throws ScmException;
+ ChangeLogScmResult changeLog(
+ ScmRepository repository,
+ ScmFileSet fileSet,
+ Date startDate,
+ Date endDate,
+ int numDays,
+ ScmBranch branch,
+ String datePattern)
+ throws ScmException;
/**
* Returns the changes that have happend in the source control system in a certain period of time. This can be
@@ -224,8 +221,7 @@ public interface ScmManager
* @throws ScmException if any
* @since 1.8
*/
- ChangeLogScmResult changeLog( ChangeLogScmRequest scmRequest )
- throws ScmException;
+ ChangeLogScmResult changeLog(ChangeLogScmRequest scmRequest) throws ScmException;
/**
* Returns the changes that have happend in the source control system between two tags. This can be adding,
@@ -241,9 +237,9 @@ public interface ScmManager
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
- ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion,
- ScmVersion endVersion )
- throws ScmException;
+ ChangeLogScmResult changeLog(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion)
+ throws ScmException;
/**
* Returns the changes that have happend in the source control system between two tags. This can be adding,
@@ -260,9 +256,13 @@ public interface ScmManager
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
- ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision,
- ScmVersion endRevision, String datePattern )
- throws ScmException;
+ ChangeLogScmResult changeLog(
+ ScmRepository repository,
+ ScmFileSet fileSet,
+ ScmVersion startRevision,
+ ScmVersion endRevision,
+ String datePattern)
+ throws ScmException;
/**
* Save the changes you have done into the repository. This will create a new version of the file or directory in
@@ -278,8 +278,7 @@ public interface ScmManager
* have been checked in.
* @throws ScmException if any
*/
- CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message )
- throws ScmException;
+ CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException;
/**
* Save the changes you have done into the repository. This will create a new version of the file or directory in
@@ -296,8 +295,8 @@ public interface ScmManager
* have been checked in.
* @throws ScmException if any
*/
- CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message )
- throws ScmException;
+ CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message)
+ throws ScmException;
/**
* Create a copy of the repository on your local machine
@@ -307,8 +306,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException;
+ CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet) throws ScmException;
/**
* Create a copy of the repository on your local machine
@@ -319,8 +317,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
- throws ScmException;
+ CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException;
/**
* Create a copy of the repository on your local machine.
@@ -331,8 +328,8 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive )
- throws ScmException;
+ CheckOutScmResult checkOut(ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive)
+ throws ScmException;
/**
* Create a copy of the repository on your local machine.
@@ -344,9 +341,9 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version,
- boolean recursive )
- throws ScmException;
+ CheckOutScmResult checkOut(
+ ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, boolean recursive)
+ throws ScmException;
/**
* Create a diff between two branch/tag/revision.
@@ -358,9 +355,9 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- DiffScmResult diff( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion,
- ScmVersion endVersion )
- throws ScmException;
+ DiffScmResult diff(
+ ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion, ScmVersion endVersion)
+ throws ScmException;
/**
* Make a file editable. This is used in source control systems where you look at read-only files and you need to
@@ -372,8 +369,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- EditScmResult edit( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException;
+ EditScmResult edit(ScmRepository repository, ScmFileSet fileSet) throws ScmException;
/**
* Create an exported copy of the repository on your local machine
@@ -383,8 +379,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- ExportScmResult export( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException;
+ ExportScmResult export(ScmRepository repository, ScmFileSet fileSet) throws ScmException;
/**
* Create an exported copy of the repository on your local machine
@@ -395,8 +390,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
- throws ScmException;
+ ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException;
/**
* Create an exported copy of the repository on your local machine
@@ -407,8 +401,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String outputDirectory )
- throws ScmException;
+ ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, String outputDirectory) throws ScmException;
/**
* Create an exported copy of the repository on your local machine
@@ -420,8 +413,8 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory )
- throws ScmException;
+ ExportScmResult export(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory)
+ throws ScmException;
/**
* List each element (files and directories) of <B>fileSet</B> as they exist in the repository.
@@ -433,8 +426,8 @@ public interface ScmManager
* @return the list of files in the repository
* @throws ScmException if any
*/
- ListScmResult list( ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version )
- throws ScmException;
+ ListScmResult list(ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version)
+ throws ScmException;
/**
* Create new directory/directories in the repository.
@@ -446,8 +439,8 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- MkdirScmResult mkdir( ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal )
- throws ScmException;
+ MkdirScmResult mkdir(ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal)
+ throws ScmException;
/**
* Removes the given files from the source control system
@@ -459,8 +452,7 @@ public interface ScmManager
* have been removed
* @throws ScmException if any
*/
- RemoveScmResult remove( ScmRepository repository, ScmFileSet fileSet, String message )
- throws ScmException;
+ RemoveScmResult remove(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException;
/**
* Returns the status of the files in the source control system. The state of each file can be one of the
@@ -472,8 +464,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- StatusScmResult status( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException;
+ StatusScmResult status(ScmRepository repository, ScmFileSet fileSet) throws ScmException;
/**
* Tag (or label in some systems) will tag the source file with a certain tag
@@ -485,8 +476,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName )
- throws ScmException;
+ TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName) throws ScmException;
/**
* Tag (or label in some systems) will tag the source file with a certain tag
@@ -499,8 +489,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName, String message )
- throws ScmException;
+ TagScmResult tag(ScmRepository repository, ScmFileSet fileSet, String tagName, String message) throws ScmException;
/**
* Make a file no longer editable. This is the conterpart of
@@ -512,8 +501,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UnEditScmResult unedit( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException;
+ UnEditScmResult unedit(ScmRepository repository, ScmFileSet fileSet) throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -523,8 +511,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException;
+ UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet) throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -535,8 +522,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
- throws ScmException;
+ UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version) throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -547,8 +533,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, boolean runChangelog )
- throws ScmException;
+ UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, boolean runChangelog) throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -560,8 +545,8 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog )
- throws ScmException;
+ UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog)
+ throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -572,8 +557,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String datePattern )
- throws ScmException;
+ UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, String datePattern) throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -585,8 +569,8 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern )
- throws ScmException;
+ UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern)
+ throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -597,8 +581,7 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate )
- throws ScmException;
+ UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, Date lastUpdate) throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -610,8 +593,8 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate )
- throws ScmException;
+ UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate)
+ throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -623,8 +606,8 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate, String datePattern )
- throws ScmException;
+ UpdateScmResult update(ScmRepository repository, ScmFileSet fileSet, Date lastUpdate, String datePattern)
+ throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
@@ -637,9 +620,9 @@ public interface ScmManager
* @return TODO
* @throws ScmException if any
*/
- UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate,
- String datePattern )
- throws ScmException;
+ UpdateScmResult update(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate, String datePattern)
+ throws ScmException;
/**
* Returns the blame of specified file
@@ -651,8 +634,7 @@ public interface ScmManager
* @throws ScmException if any
* @since 1.4
*/
- BlameScmResult blame( ScmRepository repository, ScmFileSet fileSet, String filename )
- throws ScmException;
+ BlameScmResult blame(ScmRepository repository, ScmFileSet fileSet, String filename) throws ScmException;
/**
* @param blameScmRequest TODO
@@ -660,6 +642,5 @@ public interface ScmManager
* @throws ScmException if any
* @since 1.4
*/
- BlameScmResult blame( BlameScmRequest blameScmRequest )
- throws ScmException;
+ BlameScmResult blame(BlameScmRequest blameScmRequest) throws ScmException;
}
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
index 102f9f998..210de4214 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
@@ -1,5 +1,3 @@
-package org.apache.maven.scm.provider;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.scm.provider;
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -18,6 +16,12 @@ package org.apache.maven.scm.provider;
* specific language governing permissions and limitations
* under the License.
*/
+package org.apache.maven.scm.provider;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
import org.apache.maven.scm.CommandParameter;
import org.apache.maven.scm.CommandParameters;
@@ -58,21 +62,14 @@ import org.codehaus.plexus.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
* @author Olivier Lamy
*
*/
-public abstract class AbstractScmProvider
- implements ScmProvider
-{
- protected final Logger logger = LoggerFactory.getLogger( getClass() );
+public abstract class AbstractScmProvider implements ScmProvider {
+ protected final Logger logger = LoggerFactory.getLogger(getClass());
// ----------------------------------------------------------------------
//
@@ -82,8 +79,7 @@ public abstract class AbstractScmProvider
* {@inheritDoc}
*/
@Override
- public String getScmSpecificFilename()
- {
+ public String getScmSpecificFilename() {
return null;
}
@@ -91,8 +87,7 @@ public abstract class AbstractScmProvider
* {@inheritDoc}
*/
@Override
- public String sanitizeTagName( String tag )
- {
+ public String sanitizeTagName(String tag) {
/* by default, we assume all tags are valid. */
return tag;
}
@@ -101,8 +96,7 @@ public abstract class AbstractScmProvider
* {@inheritDoc}
*/
@Override
- public boolean validateTagName( String tag )
- {
+ public boolean validateTagName(String tag) {
/* by default, we assume all tags are valid. */
return true;
}
@@ -111,17 +105,13 @@ public abstract class AbstractScmProvider
* {@inheritDoc}
*/
@Override
- public List<String> validateScmUrl( String scmSpecificUrl, char delimiter )
- {
+ public List<String> validateScmUrl(String scmSpecificUrl, char delimiter) {
List<String> messages = new ArrayList<String>();
- try
- {
- makeProviderScmRepository( scmSpecificUrl, delimiter );
- }
- catch ( ScmRepositoryException e )
- {
- messages.add( e.getMessage() );
+ try {
+ makeProviderScmRepository(scmSpecificUrl, delimiter);
+ } catch (ScmRepositoryException e) {
+ messages.add(e.getMessage());
}
return messages;
@@ -131,8 +121,7 @@ public abstract class AbstractScmProvider
* {@inheritDoc}
*/
@Override
- public boolean requiresEditMode()
- {
+ public boolean requiresEditMode() {
return false;
}
@@ -144,105 +133,91 @@ public abstract class AbstractScmProvider
* {@inheritDoc}
*/
@Override
- public AddScmResult add( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException
- {
- return add( repository, fileSet, (String) null );
+ public AddScmResult add(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
+ return add(repository, fileSet, (String) null);
}
/**
* {@inheritDoc}
*/
@Override
- public AddScmResult add( ScmRepository repository, ScmFileSet fileSet, String message )
- throws ScmException
- {
- login( repository, fileSet );
+ public AddScmResult add(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException {
+ login(repository, fileSet);
CommandParameters parameters = new CommandParameters();
- parameters.setString( CommandParameter.MESSAGE, message == null ? "" : message );
+ parameters.setString(CommandParameter.MESSAGE, message == null ? "" : message);
// TODO: binary may be dependant on particular files though
// TODO: set boolean?
- parameters.setString( CommandParameter.BINARY, "false" );
+ parameters.setString(CommandParameter.BINARY, "false");
- return add( repository.getProviderRepository(), fileSet, parameters );
+ return add(repository.getProviderRepository(), fileSet, parameters);
}
@Override
- public AddScmResult add( ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- login( repository, fileSet );
+ public AddScmResult add(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ login(repository, fileSet);
- if ( parameters.getString( CommandParameter.BINARY , null ) == null )
- {
+ if (parameters.getString(CommandParameter.BINARY, null) == null) {
// TODO: binary may be dependant on particular files though
// TODO: set boolean?
- parameters.setString( CommandParameter.BINARY, "false" );
+ parameters.setString(CommandParameter.BINARY, "false");
}
- return add( repository.getProviderRepository(), fileSet, parameters );
+ return add(repository.getProviderRepository(), fileSet, parameters);
}
/**
* TODO: why public? This should be protected, no?
*/
- public AddScmResult add( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
- throws ScmException
- {
- throw new NoSuchCommandScmException( "add" );
+ public AddScmResult add(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ throw new NoSuchCommandScmException("add");
}
/**
* {@inheritDoc}
*/
@Override
- public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName )
- throws ScmException
- {
- return branch( repository, fileSet, branchName, new ScmBranchParameters() );
+ public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName) throws ScmException {
+ return branch(repository, fileSet, branchName, new ScmBranchParameters());
}
/**
* {@inheritDoc}
*/
@Override
- public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message )
- throws ScmException
- {
+ public BranchScmResult branch(ScmRepository repository, ScmFileSet fileSet, String branchName, String message)
+ throws ScmException {
ScmBranchParameters scmBranchParameters = new ScmBranchParameters();
- if ( StringUtils.isNotEmpty( message ) )
- {
- scmBranchParameters.setMessage( message );
+ if (StringUtils.isNotEmpty(message)) {
+ scmBranchParameters.setMessage(message);
}
- return branch( repository, fileSet, branchName, scmBranchParameters );
+ return branch(repository, fileSet, branchName, scmBranchParameters);
}
@Override
- public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName,
- ScmBranchParameters scmBranchParameters )
- throws ScmException
- {
- login( repository, fileSet );
+ public BranchScmResult branch(
+ ScmRepository repository, ScmFileSet fileSet, String branchName, ScmBranchParameters scmBranchParameters)
+ throws ScmException {
+ login(repository, fileSet);
CommandParameters parameters = new CommandParameters();
- parameters.setString( CommandParameter.BRANCH_NAME, branchName );
+ parameters.setString(CommandParameter.BRANCH_NAME, branchName);
- parameters.setScmBranchParameters( CommandParameter.SCM_BRANCH_PARAMETERS, scmBranchParameters );
+ parameters.setScmBranchParameters(CommandParameter.SCM_BRANCH_PARAMETERS, scmBranchParameters);
- return branch( repository.getProviderRepository(), fileSet, parameters );
+ return branch(repository.getProviderRepository(), fileSet, parameters);
}
- protected BranchScmResult branch( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- throw new NoSuchCommandScmException( "branch" );
+ protected BranchScmResult branch(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
+ throws ScmException {
+ throw new NoSuchCommandScmException("branch");
}
/**
@@ -252,11 +227,10 @@ public abstract class AbstractScmProvider
*/
@Deprecated
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
- int numDays, String branch )
- throws ScmException
- {
- return changeLog( repository, fileSet, startDate, endDate, numDays, branch, null );
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch)
+ throws ScmException {
+ return changeLog(repository, fileSet, startDate, endDate, numDays, branch, null);
}
/**
@@ -266,61 +240,65 @@ public abstract class AbstractScmProvider
*/
@Deprecated
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
- int numDays, String branch, String datePattern )
- throws ScmException
- {
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository,
+ ScmFileSet fileSet,
+ Date startDate,
+ Date endDate,
+ int numDays,
+ String branch,
+ String datePattern)
+ throws ScmException {
ScmBranch scmBranch = null;
- if ( StringUtils.isNotEmpty( branch ) )
- {
- scmBranch = new ScmBranch( branch );
+ if (StringUtils.isNotEmpty(branch)) {
+ scmBranch = new ScmBranch(branch);
}
- return changeLog( repository, fileSet, startDate, endDate, numDays, scmBranch, null );
-
+ return changeLog(repository, fileSet, startDate, endDate, numDays, scmBranch, null);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
- int numDays, ScmBranch branch )
- throws ScmException
- {
- return changeLog( repository, fileSet, startDate, endDate, numDays, branch, null );
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, ScmBranch branch)
+ throws ScmException {
+ return changeLog(repository, fileSet, startDate, endDate, numDays, branch, null);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
- int numDays, ScmBranch branch, String datePattern )
- throws ScmException
- {
- final ChangeLogScmRequest request = new ChangeLogScmRequest( repository, fileSet );
- request.setDateRange( startDate, endDate );
- request.setNumDays( numDays );
- request.setScmBranch( branch );
- request.setDatePattern( datePattern );
- return changeLog( request );
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository,
+ ScmFileSet fileSet,
+ Date startDate,
+ Date endDate,
+ int numDays,
+ ScmBranch branch,
+ String datePattern)
+ throws ScmException {
+ final ChangeLogScmRequest request = new ChangeLogScmRequest(repository, fileSet);
+ request.setDateRange(startDate, endDate);
+ request.setNumDays(numDays);
+ request.setScmBranch(branch);
+ request.setDatePattern(datePattern);
+ return changeLog(request);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ChangeLogScmRequest request )
- throws ScmException
- {
+ public ChangeLogScmResult changeLog(ChangeLogScmRequest request) throws ScmException {
final ScmRepository scmRepository = request.getScmRepository();
final ScmFileSet scmFileSet = request.getScmFileSet();
- login( scmRepository, scmFileSet );
- return changelog( scmRepository.getProviderRepository(), scmFileSet, request.getCommandParameters() );
+ login(scmRepository, scmFileSet);
+ return changelog(scmRepository.getProviderRepository(), scmFileSet, request.getCommandParameters());
}
-
/**
* {@inheritDoc}
*
@@ -328,10 +306,9 @@ public abstract class AbstractScmProvider
*/
@Deprecated
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag )
- throws ScmException
- {
- return changeLog( repository, fileSet, startTag, endTag, null );
+ public ChangeLogScmResult changeLog(ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag)
+ throws ScmException {
+ return changeLog(repository, fileSet, startTag, endTag, null);
}
/**
@@ -341,66 +318,62 @@ public abstract class AbstractScmProvider
*/
@Deprecated
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag,
- String datePattern )
- throws ScmException
- {
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag, String datePattern)
+ throws ScmException {
ScmVersion startRevision = null;
ScmVersion endRevision = null;
- if ( StringUtils.isNotEmpty( startTag ) )
- {
- startRevision = new ScmRevision( startTag );
+ if (StringUtils.isNotEmpty(startTag)) {
+ startRevision = new ScmRevision(startTag);
}
- if ( StringUtils.isNotEmpty( endTag ) )
- {
- endRevision = new ScmRevision( endTag );
+ if (StringUtils.isNotEmpty(endTag)) {
+ endRevision = new ScmRevision(endTag);
}
- return changeLog( repository, fileSet, startRevision, endRevision, null );
+ return changeLog(repository, fileSet, startRevision, endRevision, null);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion,
- ScmVersion endVersion )
- throws ScmException
- {
- return changeLog( repository, fileSet, startVersion, endVersion, null );
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion)
+ throws ScmException {
+ return changeLog(repository, fileSet, startVersion, endVersion, null);
}
/**
* {@inheritDoc}
*/
@Override
- public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion,
- ScmVersion endVersion, String datePattern )
- throws ScmException
- {
- login( repository, fileSet );
+ public ChangeLogScmResult changeLog(
+ ScmRepository repository,
+ ScmFileSet fileSet,
+ ScmVersion startVersion,
+ ScmVersion endVersion,
+ String datePattern)
+ throws ScmException {
+ login(repository, fileSet);
CommandParameters parameters = new CommandParameters();
- parameters.setScmVersion( CommandParameter.START_SCM_VERSION, startVersion );
+ parameters.setScmVersion(CommandParameter.START_SCM_VERSION, startVersion);
- parameters.setScmVersion( CommandParameter.END_SCM_VERSION, endVersion );
+ parameters.setScmVersion(CommandParameter.END_SCM_VERSION, endVersion);
- parameters.setString( CommandParameter.CHANGELOG_DATE_PATTERN, datePattern );
+ parameters.setString(CommandParameter.CHANGELOG_DATE_PATTERN, datePattern);
- return changelog( repository.getProviderRepository(), fileSet, parameters );
+ return changelog(repository.getProviderRepository(), fileSet, parameters);
}
- protected ChangeLogScmResult changelog( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- throw new NoSuchCommandScmException( "changelog" );
+ protected ChangeLogScmResult changelog(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
+ throw new NoSuchCommandScmException("changelog");
}
-
/**
* {@inheritDoc}
*
@@ -408,56 +381,47 @@ public abstract class AbstractScmProvider
*/
@Deprecated
@Override
- public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String tag, String message )
- throws ScmException
- {
+ public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String tag, String message)
+ throws ScmException {
ScmVersion scmVersion = null;
- if ( StringUtils.isNotEmpty( tag ) )
- {
- scmVersion = new ScmBranch( tag );
+ if (StringUtils.isNotEmpty(tag)) {
+ scmVersion = new ScmBranch(tag);
}
- return checkIn( repository, fileSet, scmVersion, message );
+ return checkIn(repository, fileSet, scmVersion, message);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message )
- throws ScmException
- {
- return checkIn( repository, fileSet, (ScmVersion) null, message );
+ public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, String message) throws ScmException {
+ return checkIn(repository, fileSet, (ScmVersion) null, message);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion,
- String message )
- throws ScmException
- {
- login( repository, fileSet );
+ public CheckInScmResult checkIn(ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, String message)
+ throws ScmException {
+ login(repository, fileSet);
CommandParameters parameters = new CommandParameters();
- parameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion );
+ parameters.setScmVersion(CommandParameter.SCM_VERSION, scmVersion);
- parameters.setString( CommandParameter.MESSAGE, message );
+ parameters.setString(CommandParameter.MESSAGE, message);
- return checkin( repository.getProviderRepository(), fileSet, parameters );
+ return checkin(repository.getProviderRepository(), fileSet, parameters);
}
- protected CheckInScmResult checkin( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- throw new NoSuchCommandScmException( "checkin" );
+ protected CheckInScmResult checkin(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
+ throw new NoSuchCommandScmException("checkin");
}
-
/**
* {@inheritDoc}
*
@@ -465,10 +429,8 @@ public abstract class AbstractScmProvider
*/
@Deprecated
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, String tag )
- throws ScmException
- {
- return checkOut( repository, fileSet, tag, true );
+ public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, String tag) throws ScmException {
+ return checkOut(repository, fileSet, tag, true);
}
/**
@@ -478,87 +440,76 @@ public abstract class AbstractScmProvider
*/
@Deprecated
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, String tag, boolean recursive )
- throws ScmException
- {
+ public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, String tag, boolean recursive)
+ throws ScmException {
ScmVersion scmVersion = null;
- if ( StringUtils.isNotEmpty( tag ) )
- {
- scmVersion = new ScmBranch( tag );
+ if (StringUtils.isNotEmpty(tag)) {
+ scmVersion = new ScmBranch(tag);
}
- return checkOut( repository, fileSet, scmVersion, recursive );
+ return checkOut(repository, fileSet, scmVersion, recursive);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet )
- throws ScmException
- {
- return checkOut( repository, fileSet, (ScmVersion) null, true );
+ public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet) throws ScmException {
+ return checkOut(repository, fileSet, (ScmVersion) null, true);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion )
- throws ScmException
- {
- return checkOut( repository, fileSet, scmVersion, true );
+ public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion)
+ throws ScmException {
+ return checkOut(repository, fileSet, scmVersion, true);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, boolean recursive )
- throws ScmException
- {
- return checkOut( repository, fileSet, (ScmVersion) null, recursive );
+ public CheckOutScmResult checkOut(ScmRepository repository, ScmFileSet fileSet, boolean recursive)
+ throws ScmException {
+ return checkOut(repository, fileSet, (ScmVersion) null, recursive);
}
/**
* {@inheritDoc}
*/
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion,
- boolean recursive )
- throws ScmException
- {
- login( repository, fileSet );
+ public CheckOutScmResult checkOut(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, boolean recursive)
+ throws ScmException {
+ login(repository, fileSet);
CommandParameters parameters = new CommandParameters();
- parameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion );
+ parameters.setScmVersion(CommandParameter.SCM_VERSION, scmVersion);
- parameters.setString( CommandParameter.RECURSIVE, Boolean.toString( recursive ) );
+ parameters.setString(CommandParameter.RECURSIVE, Boolean.toString(recursive));
- return checkout( repository.getProviderRepository(), fileSet, parameters );
+ return checkout(repository.getProviderRepository(), fileSet, parameters);
}
@Override
- public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion,
- CommandParameters commandParameters )
- throws ScmException
- {
- login( repository, fileSet );
- if ( scmVersion != null && commandParameters.getScmVersion( CommandParameter.SCM_VERSION, null ) == null )
- {
- commandParameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion );
+ public CheckOutScmResult checkOut(
+ ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, CommandParameters commandParameters)
+ throws ScmException {
+ login(repository, fileSet);
+ if (scmVersion != null && commandParameters.getScmVersion(CommandParameter.SCM_VERSION, null) == null) {
+ commandParameters.setScmVersion(CommandParameter.SCM_VERSION, scmVersion);
}
- return checkout( repository.getProviderRepository(), fileSet, commandParameters );
+ return checkout(repository.getProviderRepository(), fileSet, commandParameters);
}
- protected CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
- CommandParameters parameters )
- throws ScmException
- {
- throw new NoSuchCommandScmException( "checkout" );
+ protected CheckOutScmResult checkout(
+ ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters) throws ScmException {
+ throw new NoSuchCommandScmException("checkout");
}
/**
@@ -568,73 +519,64 @@ public abstract class AbstractScmProvider
*/
@Deprecated
@Override
- public DiffScmResult diff( ScmRepository repository, ScmFileSet fileSet, String startRevision, String endRevision )
- throws ScmException
... 56524 lines suppressed ...