@Override protected ScmProviderRepository getScmProviderRepository() throws Exception { return new GitScmProviderRepository( getScmUrl().substring( "scm:git:".length() ) ); }
@Override protected ScmProviderRepository getScmProviderRepository() throws Exception { return new GitScmProviderRepository( getScmUrl().substring( "scm:git:".length() ) ); }
/** * The git-submodule(1) command is available since Git 1.5.3, so modules will * be activated in a later stage */ private ScmUrlParserResult parseScmUrl( String scmSpecificUrl, char delimiter ) throws ScmException { ScmUrlParserResult result = new ScmUrlParserResult(); result.repository = new GitScmProviderRepository( scmSpecificUrl ); return result; }
/** * The git-submodule(1) command is available since Git 1.5.3, so modules will * be activated in a later stage */ private ScmUrlParserResult parseScmUrl( String scmSpecificUrl, char delimiter ) throws ScmException { ScmUrlParserResult result = new ScmUrlParserResult(); result.repository = new GitScmProviderRepository( scmSpecificUrl ); return result; }
/** {@inheritDoc} */ protected String getRepositoryURL( File path ) throws ScmException { // Note: I need to supply just 1 absolute path, but ScmFileSet won't let me without // a basedir (which isn't used here anyway), so use a dummy file. // and a dummy ScmProviderRepository InfoScmResult result = info( new GitScmProviderRepository( path.toPath().toUri().toASCIIString() ), new ScmFileSet( path ), null ); if ( result.getInfoItems().size() != 1 ) { throw new ScmRepositoryException( "Cannot find URL: " + ( result.getInfoItems().size() == 0 ? "no" : "multiple" ) + " items returned by the info command" ); } return result.getInfoItems().get( 0 ).getURL(); } }
/** {@inheritDoc} */ protected String getRepositoryURL( File path ) throws ScmException { // Note: I need to supply just 1 absolute path, but ScmFileSet won't let me without // a basedir (which isn't used here anyway), so use a dummy file. // and a dummy ScmProviderRepository InfoScmResult result = info( new GitScmProviderRepository( path.toPath().toUri().toASCIIString() ), new ScmFileSet( path ), null ); if ( result.getInfoItems().size() != 1 ) { throw new ScmRepositoryException( "Cannot find URL: " + ( result.getInfoItems().size() == 0 ? "no" : "multiple" ) + " items returned by the info command" ); } return result.getInfoItems().get( 0 ).getURL(); } }
command.setLogger(logger); try { ScmProviderRepository repository = new GitScmProviderRepository(basedir.getAbsolutePath()); ScmFileSet fileSet = new ScmFileSet(basedir); CommandParameters parameters = new CommandParameters();