public class ScmSpy extends Object
| Modifier and Type | Field and Description |
|---|---|
private org.apache.maven.scm.manager.ScmManager |
scmManager |
| Constructor and Description |
|---|
ScmSpy(org.apache.maven.scm.manager.ScmManager scmManager) |
| Modifier and Type | Method and Description |
|---|---|
Map<ExtraManifestKeys,String> |
getChangeLog(String scmUrl,
File workingDir)
This method extracts the simple metadata such as revision, lastCommitTimestamp of the commit/hash, author of the commit
from the Changelog available in the SCM repository
|
String |
getScmType(String scmUrl)
The method that is used to determine the SCM type based on the SCM url pattern
|
private final org.apache.maven.scm.manager.ScmManager scmManager
public ScmSpy(org.apache.maven.scm.manager.ScmManager scmManager)
public String getScmType(String scmUrl) throws org.apache.maven.scm.repository.ScmRepositoryException, org.apache.maven.scm.manager.NoSuchScmProviderException
scmUrl - - the SCM url that needs to be parsed to determine the SCM type, the value of url is typically the
"connection" or "developerConnection" element value of the maven org.apache.maven.scm.repository.ScmRepositoryException - - any SCM related exceptions that might happen when checking the SCM typeorg.apache.maven.scm.manager.NoSuchScmProviderException - - if an invalid url is given as part of maven public Map<ExtraManifestKeys,String> getChangeLog(String scmUrl, File workingDir) throws IOException, org.apache.maven.scm.ScmException
scmUrl - - the SCM url to get the SCM connectionworkingDir - - the Working Copy or Directory of the SCM repoMap of values extracted form the changelog, with Keys from ExtraManifestKeysIOException - - any error that might occur while manipulating the SCM Changelogorg.apache.maven.scm.ScmException - - other SCM related exceptionsCopyright © 2018. All rights reserved.