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; }
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 ); } }
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; } } }
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(); }
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 );
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(); }
if ( StringUtils.isNotEmpty( project.getGroupId() ) ) projectMap.put( ContinuumBuildAgentUtil.KEY_GROUP_ID, project.getGroupId() );
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; }
serializer.writeEndElement(); if ( project.getGroupId() != null ) serializer.writeCharacters( project.getGroupId() ); serializer.writeEndElement();
serializer.writeEndElement(); if ( project.getGroupId() != null ) serializer.writeCharacters( project.getGroupId() ); serializer.writeEndElement();
if ( StringUtils.isEmpty( project.getGroupId() ) ) projectGroup.setGroupId( project.getGroupId() ); name = project.getGroupId();
if ( StringUtils.isEmpty( project.getGroupId() ) ) projectGroup.setGroupId( project.getGroupId() ); name = project.getGroupId();
releaseVersion, developmentVersion, environments, username ); String key = ArtifactUtils.versionlessKey( project.getGroupId(), project.getArtifactId() ); addReleasePrepare( releaseId, buildAgentUrl, releaseVersion.get( key ), "prepare", releaseProperties.getProperty( "preparation-goals" ), username );
groupId = getValue( mavenProject, "groupId", project.getGroupId() );
groupId = getValue( mavenProject, "groupId", project.getGroupId() );
groupId = getValue( mavenProject, "groupId", project.getGroupId() );