本文整理了Java中org.apache.maven.continuum.model.project.Project.getGroupId()
方法的一些代码示例,展示了Project.getGroupId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getGroupId()
方法的具体详情如下:
包路径:org.apache.maven.continuum.model.project.Project
类名称:Project
方法名:getGroupId
[英]Get null
[中]获取空值
代码示例来源: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 isProjectInReleaseStage( Project project )
throws ContinuumException
{
String releaseId = project.getGroupId() + ":" + project.getArtifactId();
try
{
return taskQueueManager.isProjectInReleaseStage( releaseId );
}
catch ( TaskQueueManagerException e )
{
throw new ContinuumException( "Error occurred while checking if project is currently being released.", e );
}
}
代码示例来源:origin: org.apache.continuum/continuum-core
private void checkForDuplicateProjectInGroup( ProjectGroup projectGroup, Project projectToCheck,
ContinuumProjectBuildingResult result )
{
List<Project> projectsInGroup = projectGroup.getProjects();
if ( projectsInGroup == null )
{
return;
}
for ( Project project : projectGroup.getProjects() )
{
// projectToCheck is first in the equals check, as projectToCheck must be a Maven project and will have
// non-null values for each. project may be an Ant or Shell project and have null values.
if ( projectToCheck.getGroupId().equals( project.getGroupId() ) && projectToCheck.getArtifactId().equals(
project.getArtifactId() ) && projectToCheck.getVersion().equals( project.getVersion() ) )
{
result.addError( ContinuumProjectBuildingResult.ERROR_DUPLICATE_PROJECTS );
return;
}
}
}
代码示例来源:origin: org.apache.maven.continuum/continuum-core
private static String getProjectId( Project project )
{
String groupId;
String artifactId;
if ( project.getGroupId() == null )
{
groupId = project.getName();
}
else
{
groupId = project.getGroupId();
}
if ( project.getArtifactId() == null )
{
artifactId = project.getName();
}
else
{
artifactId = project.getArtifactId();
}
return groupId + ":" + artifactId + ":" + project.getVersion();
}
代码示例来源:origin: org.apache.continuum/continuum-core
sb.append( CHROOT_EXECUTABLE );
sb.append( " " );
sb.append( new File( chrootJailDirectory, project.getGroupId() ) );
sb.append( " " );
sb.append( " /bin/sh -c 'cd " );
sb.append( getRelativePath( chrootJailDirectory, workingDirectory, project.getGroupId() ) );
sb.append( " && " );
sb.append( actualExecutable );
代码示例来源:origin: org.apache.continuum/continuum-api
private static String getProjectId( Project project )
{
String groupId;
String artifactId;
if ( project.getGroupId() == null )
{
groupId = project.getName();
}
else
{
groupId = project.getGroupId();
}
if ( project.getArtifactId() == null )
{
artifactId = project.getName();
}
else
{
artifactId = project.getArtifactId();
}
String projectGroupId = "[" + project.getProjectGroup().getId() + "]";
return projectGroupId + ":" + groupId + ":" + artifactId + ":" + project.getVersion();
}
代码示例来源:origin: org.apache.continuum/continuum-buildagent-core
if ( StringUtils.isNotEmpty( project.getGroupId() ) )
projectMap.put( ContinuumBuildAgentUtil.KEY_GROUP_ID, project.getGroupId() );
代码示例来源:origin: org.apache.continuum/continuum-release
public String prepare( Project project, Properties releaseProperties, Map<String, String> relVersions,
Map<String, String> devVersions, ContinuumReleaseManagerListener listener,
String workingDirectory, Map<String, String> environments, String executable )
throws ContinuumReleaseException
{
String releaseId = project.getGroupId() + ":" + project.getArtifactId();
ReleaseDescriptor descriptor = getReleaseDescriptor( project, releaseProperties, relVersions, devVersions,
environments, workingDirectory, executable );
if ( listener == null )
{
listener = new DefaultReleaseManagerListener();
listener.setUsername( releaseProperties.getProperty( "release-by" ) );
}
// check if releaseId exists
while ( getPreparedReleases().get( releaseId ) != null )
{
releaseId = releaseId + ":" + String.valueOf( System.currentTimeMillis() );
}
getListeners().put( releaseId, listener );
try
{
prepareReleaseQueue.put( new PrepareReleaseProjectTask( releaseId, descriptor,
(ReleaseManagerListener) listener ) );
}
catch ( TaskQueueException e )
{
throw new ContinuumReleaseException( "Failed to add prepare release task in queue.", e );
}
return releaseId;
}
代码示例来源:origin: org.apache.continuum/continuum-model
serializer.writeEndElement();
if ( project.getGroupId() != null )
serializer.writeCharacters( project.getGroupId() );
serializer.writeEndElement();
代码示例来源:origin: org.apache.maven.continuum/continuum-model
serializer.writeEndElement();
if ( project.getGroupId() != null )
serializer.writeCharacters( project.getGroupId() );
serializer.writeEndElement();
代码示例来源:origin: org.apache.maven.continuum/continuum-core
if ( StringUtils.isEmpty( project.getGroupId() ) )
projectGroup.setGroupId( project.getGroupId() );
name = project.getGroupId();
代码示例来源:origin: org.apache.continuum/continuum-core
if ( StringUtils.isEmpty( project.getGroupId() ) )
projectGroup.setGroupId( project.getGroupId() );
name = project.getGroupId();
代码示例来源:origin: org.apache.continuum/continuum-core
releaseVersion, developmentVersion, environments, username );
String key = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() );
addReleasePrepare( releaseId, buildAgentUrl, releaseVersion.get( key ), "prepare",
releaseProperties.getProperty( "preparation-goals" ), username );
代码示例来源:origin: org.apache.continuum/continuum-buildagent-core
groupId = getValue( mavenProject, "groupId", project.getGroupId() );
代码示例来源:origin: org.apache.continuum/continuum-core
groupId = getValue( mavenProject, "groupId", project.getGroupId() );
代码示例来源:origin: org.apache.maven.continuum/continuum-core
groupId = getValue( mavenProject, "groupId", project.getGroupId() );
内容来源于网络,如有侵权,请联系作者删除!