本文整理了Java中org.apache.maven.continuum.model.project.Project.getId()
方法的一些代码示例,展示了Project.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getId()
方法的具体详情如下:
包路径:org.apache.maven.continuum.model.project.Project
类名称:Project
方法名:getId
[英]Get null
[中]获取空值
代码示例来源:origin: org.apache.continuum/continuum-core
private boolean isRootDirectory( String workingDir, Project rootProject )
{
return workingDir.endsWith( Integer.toString( rootProject.getId() ) + System.getProperty(
"line.separator" ) ) || workingDir.endsWith( Integer.toString( rootProject.getId() ) );
}
}
代码示例来源:origin: org.apache.maven.continuum/continuum-model
/**
* Method toString
*/
public java.lang.String toString()
{
StringBuffer buf = new StringBuffer();
buf.append( "id = '" );
buf.append( getId() + "'" );
return buf.toString();
} //-- java.lang.String toString()
代码示例来源:origin: org.apache.continuum/continuum-model
/**
* Method toString.
*
* @return String
*/
public java.lang.String toString()
{
StringBuilder buf = new StringBuilder( 128 );
buf.append( "id = '" );
buf.append( getId() );
buf.append( "'" );
return buf.toString();
} //-- java.lang.String toString()
代码示例来源:origin: org.apache.continuum/continuum-store
public BuildDefinition getDefaultBuildDefinitionForProject( Project project )
throws ContinuumStoreException
{
return getDefaultBuildDefinitionForProject( project.getId() );
}
代码示例来源:origin: org.apache.continuum/continuum-store
public ProjectGroup getProjectGroupByProject( Project project )
throws ContinuumObjectNotFoundException
{
return getProjectGroupByProjectId( project.getId() );
}
代码示例来源:origin: org.apache.maven.continuum/continuum-core
public void killProcess( Project project )
{
shellCommandHelper.killProcess( project.getId() );
}
代码示例来源:origin: org.apache.continuum/continuum-buildagent-core
public void execute( Map context )
throws Exception
{
Project project = ContinuumBuildAgentUtil.getProject( context );
File workingDirectory = buildAgentConfigurationService.getWorkingDirectory( project.getId() );
if ( !workingDirectory.exists() )
{
context.put( ContinuumBuildAgentUtil.KEY_WORKING_DIRECTORY_EXISTS, Boolean.FALSE );
return;
}
File[] files = workingDirectory.listFiles();
context.put( ContinuumBuildAgentUtil.KEY_WORKING_DIRECTORY_EXISTS, files.length > 0 );
}
代码示例来源:origin: org.apache.maven.continuum/continuum-core
private Date getLatestUpdateDate( Project project )
{
try
{
BuildResult result = store.getLatestBuildResultForProject( project.getId() );
return new Date( result.getStartTime() );
}
catch ( Exception e )
{
}
return null;
}
代码示例来源:origin: org.apache.continuum/continuum-buildagent-core
protected Properties getContinuumSystemProperties( Project project )
{
Properties properties = new Properties();
properties.setProperty( "continuum.project.group.name", project.getProjectGroup().getName() );
properties.setProperty( "continuum.project.lastBuild.state", String.valueOf( project.getOldState() ) );
properties.setProperty( "continuum.project.lastBuild.number", String.valueOf( project.getBuildNumber() ) );
properties.setProperty( "continuum.project.nextBuild.number", String.valueOf( project.getBuildNumber() + 1 ) );
properties.setProperty( "continuum.project.id", String.valueOf( project.getId() ) );
properties.setProperty( "continuum.project.name", project.getName() );
properties.setProperty( "continuum.project.version", project.getVersion() );
return properties;
}
代码示例来源:origin: org.apache.continuum/continuum-core
protected Properties getContinuumSystemProperties( Project project )
{
Properties properties = new Properties();
properties.setProperty( "continuum.project.group.name", project.getProjectGroup().getName() );
properties.setProperty( "continuum.project.lastBuild.state", String.valueOf( project.getOldState() ) );
properties.setProperty( "continuum.project.lastBuild.number", String.valueOf( project.getBuildNumber() ) );
properties.setProperty( "continuum.project.nextBuild.number", String.valueOf( project.getBuildNumber() + 1 ) );
properties.setProperty( "continuum.project.id", String.valueOf( project.getId() ) );
properties.setProperty( "continuum.project.name", project.getName() );
properties.setProperty( "continuum.project.version", project.getVersion() );
return properties;
}
代码示例来源: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
public void killProcess( Project project )
{
getShellCommandHelper().killProcess( project.getId() );
}
代码示例来源:origin: org.apache.continuum/continuum-buildagent-core
public void killProcess( Project project )
{
getShellCommandHelper().killProcess( project.getId() );
}
代码示例来源:origin: org.apache.continuum/continuum-commons
public File getWorkingDirectory( Project project, boolean shouldSet )
{
ProjectGroup projectGroup = project.getProjectGroup();
File f = new File( getChrootJailDirectory(), projectGroup.getGroupId() );
f = new File( f, getConfigurationService().getWorkingDirectory().getPath() );
return new File( f, Integer.toString( project.getId() ) );
}
代码示例来源: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.continuum/continuum-core
private Map createProjectMap( Project project )
{
Map<String, Object> map = new HashMap<String, Object>();
map.put( DistributedReleaseUtil.KEY_PROJECT_ID, project.getId() );
map.put( DistributedReleaseUtil.KEY_GROUP_ID, project.getGroupId() );
map.put( DistributedReleaseUtil.KEY_ARTIFACT_ID, project.getArtifactId() );
map.put( DistributedReleaseUtil.KEY_SCM_URL, project.getScmUrl() );
if ( project.getProjectGroup().getLocalRepository() != null )
{
map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_NAME,
project.getProjectGroup().getLocalRepository().getName() );
}
return map;
}
代码示例来源:origin: org.apache.continuum/continuum-core
private boolean isAnyProjectInGroupInReleaseStage( int projectGroupId )
throws ContinuumException
{
Collection<Project> projects = getProjectsInGroup( projectGroupId );
for ( Project project : projects )
{
if ( isProjectInReleaseStage( project ) )
{
throw new ContinuumException( "Cannot build project group. Project (id=" + project.getId() +
") in group is currently in release stage." );
}
}
return false;
}
代码示例来源:origin: org.apache.continuum/continuum-buildagent-core
public void execute( Map context )
throws Exception
{
Project project = ContinuumBuildAgentUtil.getProject( context );
logger.info( "Updating project '" + project.getName() + "' from checkout." );
BuildDefinition buildDefinition = ContinuumBuildAgentUtil.getBuildDefinition( context );
File workingDirectory = buildAgentConfigurationService.getWorkingDirectory( project.getId() );
ContinuumAgentBuildExecutor buildExecutor = buildAgentBuildExecutorManager.getBuildExecutor(
project.getExecutorId() );
buildExecutor.updateProjectFromWorkingDirectory( workingDirectory, project, buildDefinition );
}
代码示例来源:origin: org.apache.maven.continuum/continuum-core
public void execute( Map context )
throws Exception
{
Project project = store.getProject( getProjectId( context ) );
CheckOutTask checkOutTask =
new CheckOutTask( project.getId(), workingDirectoryService.getWorkingDirectory( project ), project.getName() );
checkOutQueue.put( checkOutTask );
}
}
内容来源于网络,如有侵权,请联系作者删除!