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

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

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

Project.getState介绍

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

代码示例

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

public boolean isBuilding( Project project )
{
  return project.getState() == ContinuumProjectState.BUILDING || shellCommandHelper.isRunning( project.getId() );
}

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

private String getState( Project project, BuildResult build )
{
  int state = project.getState();
  if ( build != null )
  {
    state = build.getState();
  }
  if ( state == ContinuumProjectState.OK )
  {
    return "SUCCESSFUL";
  }
  else if ( state == ContinuumProjectState.FAILED )
  {
    return "FAILURE";
  }
  else if ( state == ContinuumProjectState.ERROR )
  {
    return "ERROR";
  }
  else
  {
    log.warn( "Unknown build state " + state + " for project " + project.getId() );
    return "ERROR: Unknown build state " + state;
  }
}

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

public boolean isBuilding( Project project )
{
  return project.getState() == ContinuumProjectState.BUILDING || getShellCommandHelper().isRunning(
    project.getId() );
}

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

public boolean isBuilding( Project project )
{
  return project.getState() == ContinuumProjectState.BUILDING || getShellCommandHelper().isRunning(
    project.getId() );
}

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

if ( project.getState() != ContinuumProjectState.NEW &&
  project.getState() != ContinuumProjectState.CHECKEDOUT &&
  project.getState() != ContinuumProjectState.OK && project.getState() != ContinuumProjectState.FAILED &&
  project.getState() != ContinuumProjectState.ERROR )

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

public void startProjectBuild( int projectId )
  throws ContinuumException
{
  try
  {
    Project project = projectDao.getProject( projectId );
    project.setOldState( project.getState() );
    project.setState( ContinuumProjectState.BUILDING );
    projectDao.updateProject( project );
  }
  catch ( ContinuumStoreException e )
  {
    log.error( "Error while updating project's state (projectId=" + projectId + ")", e );
    throw new ContinuumException( "Error while updating project's state (projectId=" + projectId + ")", e );
  }
}

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

if ( project.getState() != ContinuumProjectState.NEW &&
  project.getState() != ContinuumProjectState.CHECKEDOUT &&
  project.getState() != ContinuumProjectState.OK && project.getState() != ContinuumProjectState.FAILED &&
  project.getState() != ContinuumProjectState.ERROR && !context.isCancelled() )

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

if ( project.getState() == ContinuumProjectState.OK )

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

private String getState( Project project, BuildResult build )
{
  int state = project.getState();
  if ( build != null )
  {
    state = build.getState();
  }
  if ( state == ContinuumProjectState.OK )
  {
    return "SUCCESSFUL";
  }
  else if ( state == ContinuumProjectState.FAILED )
  {
    return "FAILURE";
  }
  else if ( state == ContinuumProjectState.ERROR )
  {
    return "ERROR";
  }
  else
  {
    getLogger().warn( "Unknown build state " + state + " for project " + project.getId() );
    return "ERROR: Unknown build state " + state;
  }
}

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

log.error( "project state=" + project.getState() );

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

if ( project.getState() != ContinuumProjectState.NEW &&
  project.getState() != ContinuumProjectState.CHECKEDOUT &&
  project.getState() != ContinuumProjectState.OK &&
  project.getState() != ContinuumProjectState.FAILED &&
  project.getState() != ContinuumProjectState.ERROR )
  if ( executor.isBuilding( project ) || project.getState() == ContinuumProjectState.UPDATING )
project.setOldState( project.getState() );

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

private void startBuild( BuildContext context )
  throws TaskExecutionException
{
  Project project = context.getProject();
  project.setOldState( project.getState() );
  project.setState( ContinuumProjectState.BUILDING );
  try
  {
    store.updateProject( project );
  }
  catch ( ContinuumStoreException e )
  {
    throw new TaskExecutionException( "Error persisting project", e );
  }
  notifierDispatcher.buildStarted( project, context.getBuildDefinition() );
}

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

private void startBuild( BuildContext context )
  throws TaskExecutionException
{
  Project project = context.getProject();
  project.setOldState( project.getState() );
  project.setState( ContinuumProjectState.BUILDING );
  try
  {
    projectDao.updateProject( project );
  }
  catch ( ContinuumStoreException e )
  {
    throw new TaskExecutionException( "Error persisting project", e );
  }
  notifierDispatcher.buildStarted( project, context.getBuildDefinition() );
}

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

if ( project.getState() != ContinuumProjectState.NEW &&
  project.getState() != ContinuumProjectState.CHECKEDOUT &&
  project.getState() != ContinuumProjectState.OK && project.getState() != ContinuumProjectState.FAILED &&
  project.getState() != ContinuumProjectState.ERROR )
  if ( executor.isBuilding( project ) || project.getState() == ContinuumProjectState.UPDATING )
    project.setOldState( project.getState() );
  project.setOldState( project.getState() );

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

protected String generateMessage( Project project, BuildResult build, ConfigurationService configurationService )
  throws NotificationException
  int state = project.getState();

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

if ( project.getState() == ContinuumProjectState.OK )

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

int state = project.getState();

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

private String generateMessage( Project project, BuildResult build )
  throws ContinuumException
{
  int state = project.getState();
  if ( build != null )
  {
    state = build.getState();
  }
  String message;
  if ( state == ContinuumProjectState.OK )
  {
    message = "BUILD SUCCESSFUL: " + project.getName();
  }
  else if ( state == ContinuumProjectState.FAILED )
  {
    message = "BUILD FAILURE: " + project.getName();
  }
  else if ( state == ContinuumProjectState.ERROR )
  {
    message = "BUILD ERROR: " + project.getName();
  }
  else
  {
    getLogger().warn( "Unknown build state " + state + " for project " + project.getId() );
    message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project";
  }
  return message + " " + getReportUrl( project, build, configurationService );
}

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

private String generateMessage( Project project, BuildResult build )
  throws ContinuumException
{
  int state = project.getState();
  if ( build != null )
  {
    state = build.getState();
  }
  String message;
  if ( state == ContinuumProjectState.OK )
  {
    message = "BUILD SUCCESSFUL: " + project.getName();
  }
  else if ( state == ContinuumProjectState.FAILED )
  {
    message = "BUILD FAILURE: " + project.getName();
  }
  else if ( state == ContinuumProjectState.ERROR )
  {
    message = "BUILD ERROR: " + project.getName();
  }
  else
  {
    getLogger().warn( "Unknown build state " + state + " for project " + project.getId() );
    message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project";
  }
  return message + " " + getReportUrl( project, build, configurationService );
}

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

private String generateMessage( Project project, BuildResult build )
  throws ContinuumException
{
  int state = project.getState();
  if ( build != null )
  {
    state = build.getState();
  }
  String message;
  if ( state == ContinuumProjectState.OK )
  {
    message = "BUILD SUCCESSFUL: " + project.getName();
  }
  else if ( state == ContinuumProjectState.FAILED )
  {
    message = "BUILD FAILURE: " + project.getName();
  }
  else if ( state == ContinuumProjectState.ERROR )
  {
    message = "BUILD ERROR: " + project.getName();
  }
  else
  {
    getLogger().warn( "Unknown build state " + state + " for project " + project.getId() );
    message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project";
  }
  return message + " " + getReportUrl( project, build, configurationService );
}

相关文章

Project类方法