org.apache.maven.continuum.model.project.Project.getScmUsername()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.apache.maven.continuum.model.project.Project.getScmUsername()方法的一些代码示例,展示了Project.getScmUsername()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getScmUsername()方法的具体详情如下:
包路径:org.apache.maven.continuum.model.project.Project
类名称:Project
方法名:getScmUsername

Project.getScmUsername介绍

[英]Get null
[中]获取空值

代码示例

代码示例来源:origin: org.apache.maven.continuum/continuum-core

private ScmRepository getScmRepository( Project project, boolean useCredentialsCache )
  throws ScmRepositoryException, NoSuchScmProviderException
{
  ScmRepository repository = scmManager.makeScmRepository( project.getScmUrl().trim() );
  repository.getProviderRepository().setPersistCheckout( true );
  if ( !( useCredentialsCache && repository.getProvider().equals( "svn" ) ) )
  {
    if ( !StringUtils.isEmpty( project.getScmUsername() ) )
    {
      repository.getProviderRepository().setUser( project.getScmUsername() );
      if ( !StringUtils.isEmpty( project.getScmPassword() ) )
      {
        repository.getProviderRepository().setPassword( project.getScmPassword() );
      }
      else
      {
        repository.getProviderRepository().setPassword( "" );
      }
    }
  }
  if ( repository.getProvider().equals( "perforce" ) )
  {
    //Remove the clientspec name, so it will be recalcuated between each command for each project
    //instead of use the same for all projects
    System.setProperty( "maven.scm.perforce.clientspec.name", "" );
  }
  return repository;
}

代码示例来源:origin: org.apache.maven.continuum/continuum-model

serializer.writeEndElement();
if ( project.getScmUsername() != null )
  serializer.writeCharacters( project.getScmUsername() );
  serializer.writeEndElement();

代码示例来源:origin: org.apache.continuum/continuum-model

serializer.writeEndElement();
if ( project.getScmUsername() != null )
  serializer.writeCharacters( project.getScmUsername() );
  serializer.writeEndElement();

代码示例来源:origin: org.apache.continuum/continuum-builder

if ( project.getScmUsername() == null )
  context.put( ContinuumBuildConstant.KEY_SCM_USERNAME, project.getScmUsername() );

代码示例来源:origin: org.apache.continuum/continuum-xmlrpc-server

String scmTagBase = new SvnScmProviderRepository( project.getScmUrl(), project.getScmUsername(),
                         project.getScmPassword() ).getTagBase();

代码示例来源:origin: org.apache.continuum/continuum-core

String scmUsername = project.getScmUsername();
String scmPassword = project.getScmPassword();

代码示例来源:origin: org.apache.continuum/continuum-buildagent-core

private ContinuumScmConfiguration createScmConfiguration( Project project, File workingDirectory )
{
  ContinuumScmConfiguration config = new ContinuumScmConfiguration();
  config.setUrl( project.getScmUrl() );
  // CONTINUUM-2628
  config = ContinuumScmUtils.setSCMCredentialsforSSH( config, project.getScmUrl(), project.getScmUsername(),
                            project.getScmPassword() );
  config.setUseCredentialsCache( project.isScmUseCache() );
  config.setWorkingDirectory( workingDirectory );
  config.setTag( project.getScmTag() );
  return config;
}

代码示例来源:origin: org.apache.continuum/continuum-buildagent-core

private ContinuumScmConfiguration createScmConfiguration( Project project, File workingDirectory )
{
  ContinuumScmConfiguration config = new ContinuumScmConfiguration();
  config.setUrl( project.getScmUrl() );
  config.setUsername( project.getScmUsername() );
  config.setPassword( project.getScmPassword() );
  config.setUseCredentialsCache( project.isScmUseCache() );
  config.setWorkingDirectory( workingDirectory );
  config.setTag( project.getScmTag() );
  return config;
}

代码示例来源:origin: org.apache.continuum/continuum-core

private ContinuumScmConfiguration createScmConfiguration( Project project, File workingDirectory,
                             String scmRootUrl )
{
  ContinuumScmConfiguration config = new ContinuumScmConfiguration();
  if ( project.isCheckedOutInSingleDirectory() && scmRootUrl != null && !"".equals( scmRootUrl ) )
  {
    config.setUrl( scmRootUrl );
  }
  else
  {
    config.setUrl( project.getScmUrl() );
  }
  // CONTINUUM-2628
  config = ContinuumScmUtils.setSCMCredentialsforSSH( config, config.getUrl(), project.getScmUsername(),
                            project.getScmPassword() );
  config.setUseCredentialsCache( project.isScmUseCache() );
  config.setWorkingDirectory( workingDirectory );
  config.setTag( project.getScmTag() );
  return config;
}

代码示例来源:origin: org.apache.continuum/continuum-core

scmUserName = project.getScmUsername();
scmPassword = project.getScmPassword();

代码示例来源:origin: org.apache.continuum/continuum-core

String scmUsername = project.getScmUsername();
String scmPassword = project.getScmPassword();

代码示例来源:origin: org.apache.continuum/continuum-buildagent-core

project.getScmUsername() );
String scmPassword = ContinuumBuildAgentUtil.getString( context, ContinuumBuildAgentUtil.KEY_SCM_PASSWORD,
                            project.getScmPassword() );

代码示例来源:origin: org.apache.continuum/continuum-core

String scmUserName = getScmUsername( context, project.getScmUsername() );
String scmPassword = getScmPassword( context, project.getScmPassword() );
String scmRootUrl = getProjectScmRootUrl( context, project.getScmUrl() );

相关文章

Project类方法