Java Code Examples for org.apache.maven.scm.repository.ScmRepositoryException

The following examples show how to use org.apache.maven.scm.repository.ScmRepositoryException. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: vertx-maven-plugin   Source File: ScmSpy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * The method that is used to determine the SCM type based on the SCM url pattern
 * @see <a href="https://maven.apache.org/components/scm/scm-url-format.html">Maven SCM URL Format</a>
 * @param 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 <scm/>
 * @return String - the SCM type, e.g. for git it will be "git" , for subversion it will be "svn"
 * @throws ScmRepositoryException - any SCM related exceptions that might happen when checking the SCM type
 * @throws NoSuchScmProviderException - if an invalid url is given as part of maven <scm> "connection" or "developerConnection"
 */
public String getScmType(String scmUrl) throws ScmRepositoryException, NoSuchScmProviderException {
    return ScmUrlUtils.getProvider(scmUrl);
}
 
Example 2
Source Project: vertx-maven-plugin   Source File: ScmSpy.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * The method that is used to determine the SCM type based on the SCM url pattern
 * @see <a href="https://maven.apache.org/components/scm/scm-url-format.html">Maven SCM URL Format</a>
 * @param 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 <scm/>
 * @return String - the SCM type, e.g. for git it will be "git" , for subversion it will be "svn"
 * @throws ScmRepositoryException - any SCM related exceptions that might happen when checking the SCM type
 * @throws NoSuchScmProviderException - if an invalid url is given as part of maven <scm> "connection" or "developerConnection"
 */
public String getScmType(String scmUrl) throws ScmRepositoryException, NoSuchScmProviderException {
    return ScmUrlUtils.getProvider(scmUrl);
}