Class JGitCheckInCommand
- java.lang.Object
-
- org.apache.maven.scm.command.AbstractCommand
-
- org.apache.maven.scm.command.checkin.AbstractCheckInCommand
-
- org.apache.maven.scm.provider.git.jgit.command.checkin.JGitCheckInCommand
-
- All Implemented Interfaces:
Command,GitCommand
public class JGitCheckInCommand extends AbstractCheckInCommand implements GitCommand
This provider uses the following strategy to discover the committer and author name/mail for a commit:- "user" section in .gitconfig
- "username" passed to maven execution
- default git config (system user and hostname for email)
the default email domain to be used (will be used to create an email from the username passed to maven):
git config --global maven-scm.maildomain mycomp.com
you can also enforce the usage of the username for the author and committer:
git config --global maven-scm.forceUsername true- Since:
- 1.9
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classJGitCheckInCommand.UserInfo
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringGIT_FORCEprotected static java.lang.StringGIT_MAILDOMAINprotected static java.lang.StringGIT_MAVEN_SECTION-
Fields inherited from class org.apache.maven.scm.command.checkin.AbstractCheckInCommand
NAME
-
-
Constructor Summary
Constructors Constructor Description JGitCheckInCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CheckInScmResultexecuteCheckInCommand(ScmProviderRepository repo, ScmFileSet fileSet, java.lang.String message, ScmVersion version)private JGitCheckInCommand.UserInfogetAuthor(ScmProviderRepository repo, org.eclipse.jgit.api.Git git)private JGitCheckInCommand.UserInfogetCommitter(ScmProviderRepository repo, org.eclipse.jgit.api.Git git)private java.lang.StringgetHostname()-
Methods inherited from class org.apache.maven.scm.command.checkin.AbstractCheckInCommand
executeCommand
-
Methods inherited from class org.apache.maven.scm.command.AbstractCommand
execute, getLogger, setLogger
-
-
-
-
Field Detail
-
GIT_MAVEN_SECTION
protected static final java.lang.String GIT_MAVEN_SECTION
- See Also:
- Constant Field Values
-
GIT_MAILDOMAIN
protected static final java.lang.String GIT_MAILDOMAIN
- See Also:
- Constant Field Values
-
GIT_FORCE
protected static final java.lang.String GIT_FORCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
executeCheckInCommand
protected CheckInScmResult executeCheckInCommand(ScmProviderRepository repo, ScmFileSet fileSet, java.lang.String message, ScmVersion version) throws ScmException
- Specified by:
executeCheckInCommandin classAbstractCheckInCommand- Throws:
ScmException
-
getCommitter
private JGitCheckInCommand.UserInfo getCommitter(ScmProviderRepository repo, org.eclipse.jgit.api.Git git)
-
getAuthor
private JGitCheckInCommand.UserInfo getAuthor(ScmProviderRepository repo, org.eclipse.jgit.api.Git git)
-
getHostname
private java.lang.String getHostname()
-
-