private void mergeMetadata( Versions versions, Metadata source, ArtifactRepository repository ) { Versioning versioning = source.getVersioning(); if ( versioning != null ) { String timestamp = StringUtils.clean( versioning.getLastUpdated() ); if ( StringUtils.isNotEmpty( versioning.getRelease() ) && timestamp.compareTo( versions.releaseTimestamp ) > 0 ) { versions.releaseVersion = versioning.getRelease(); versions.releaseTimestamp = timestamp; versions.releaseRepository = repository; } if ( StringUtils.isNotEmpty( versioning.getLatest() ) && timestamp.compareTo( versions.latestTimestamp ) > 0 ) { versions.latestVersion = versioning.getLatest(); versions.latestTimestamp = timestamp; versions.latestRepository = repository; } for ( String version : versioning.getVersions() ) { if ( !versions.versions.containsKey( version ) ) { versions.versions.put( version, repository ); } } } }
private static File getPomFile( String projectBuildFile, File workingDirectory ) { File f = null; String buildFile = StringUtils.clean( projectBuildFile ); if ( !StringUtils.isEmpty( buildFile ) ) { f = new File( workingDirectory, buildFile ); } if ( f == null ) { f = new File( workingDirectory, "pom.xml" ); } return f; }
private static File getPomFile( String projectBuildFile, File workingDirectory ) { File f = null; String buildFile = StringUtils.clean( projectBuildFile ); if ( !StringUtils.isEmpty( buildFile ) ) { f = new File( workingDirectory, buildFile ); } if ( f == null ) { f = new File( workingDirectory, "pom.xml" ); } return f; }
private static File getPomFile( String projectBuildFile, File workingDirectory ) { File f = null; String buildFile = StringUtils.clean( projectBuildFile ); if ( !StringUtils.isEmpty( buildFile ) ) { f = new File( workingDirectory, buildFile ); } if ( f == null ) { f = new File( workingDirectory, "pom.xml" ); } return f; }
protected String getBuildFileForProject( Project project, BuildDefinition buildDefinition ) { String buildFile = StringUtils.clean( buildDefinition.getBuildFile() ); String relPath = StringUtils.clean( project.getRelativePath() ); if ( StringUtils.isEmpty( relPath ) ) { return buildFile; } return relPath + File.separator + buildFile; }
protected String getBuildFileForProject( Project project, BuildDefinition buildDefinition ) { String buildFile = StringUtils.clean( buildDefinition.getBuildFile() ); String relPath = StringUtils.clean( project.getRelativePath() ); if ( StringUtils.isEmpty( relPath ) ) { return buildFile; } return relPath + File.separator + buildFile; }
protected String getBuildFileForProject( BuildDefinition buildDefinition ) { return StringUtils.clean( buildDefinition.getBuildFile() ); }
public String toString() { return new StringBuffer(). append( "Section: " ).append( section ).append( EOL ). append( "Priority: " ).append( priority ).append( EOL ). append( "Maintainer: " ).append( maintainer ).append( EOL ). append( "Package: " ).append( packageName ).append( EOL ). append( "Version: " ).append( version ).append( EOL ). append( "Architecture: " ).append( architecture ).append( EOL ). append( "Description: " ).append( StringUtils.clean( description ) ).append( EOL ). toString(); } }
public ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition, File buildOutput ) throws ContinuumBuildExecutorException { String executable = getInstallationService().getExecutorConfigurator( InstallationService.MAVEN2_TYPE ) .getExecutable(); StringBuffer arguments = new StringBuffer(); String buildFile = getBuildFileForProject( project, buildDefinition ); if ( !StringUtils.isEmpty( buildFile ) && !"pom.xml".equals( buildFile ) ) { arguments.append( "-f " ).append( buildFile ).append( " " ); } arguments.append( StringUtils.clean( buildDefinition.getArguments() ) ).append( " " ); Properties props = getContinuumSystemProperties( project ); for ( Enumeration itr = props.propertyNames(); itr.hasMoreElements(); ) { String name = (String) itr.nextElement(); String value = props.getProperty( name ); arguments.append( "\"-D" ).append( name ).append( "=" ).append( value ).append( "\" " ); } arguments.append( StringUtils.clean( buildDefinition.getGoals() ) ); Map<String, String> environments = getEnvironments( buildDefinition ); String m2Home = environments.get( getInstallationService().getEnvVar( InstallationService.MAVEN2_TYPE ) ); if ( StringUtils.isNotEmpty( m2Home ) ) { executable = m2Home + File.separator + "bin" + File.separator + executable; setResolveExecutable( false ); } return executeShellCommand( project, executable, arguments.toString(), buildOutput, environments ); }
public ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition, File buildOutput ) throws ContinuumBuildExecutorException { String executable = getInstallationService().getExecutorConfigurator( InstallationService.ANT_TYPE ) .getExecutable(); StringBuffer arguments = new StringBuffer(); String buildFile = getBuildFileForProject( project, buildDefinition ); if ( !StringUtils.isEmpty( buildFile ) ) { arguments.append( "-f " ).append( buildFile ).append( " " ); } arguments.append( StringUtils.clean( buildDefinition.getArguments() ) ).append( " " ); Properties props = getContinuumSystemProperties( project ); for ( Enumeration itr = props.propertyNames(); itr.hasMoreElements(); ) { String name = (String) itr.nextElement(); String value = props.getProperty( name ); arguments.append( "\"-D" ).append( name ).append( "=" ).append( value ).append( "\" " ); } arguments.append( StringUtils.clean( buildDefinition.getGoals() ) ); Map<String, String> environments = getEnvironments( buildDefinition ); String antHome = environments.get( getInstallationService().getEnvVar( InstallationService.ANT_TYPE ) ); if ( StringUtils.isNotEmpty( antHome ) ) { executable = antHome + File.separator + "bin" + File.separator + executable; setResolveExecutable( false ); } return executeShellCommand( project, executable, arguments.toString(), buildOutput, environments ); }
public ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition, File buildOutput, List<Project> projectsWithCommonScmRoot, String projectScmRootUrl ) throws ContinuumBuildExecutorException { String executable = getInstallationService().getExecutorConfigurator( InstallationService.ANT_TYPE ).getExecutable(); StringBuffer arguments = new StringBuffer(); String buildFile = getBuildFileForProject( project, buildDefinition ); if ( !StringUtils.isEmpty( buildFile ) ) { arguments.append( "-f " ).append( buildFile ).append( " " ); } arguments.append( StringUtils.clean( buildDefinition.getArguments() ) ).append( " " ); Properties props = getContinuumSystemProperties( project ); for ( Enumeration itr = props.propertyNames(); itr.hasMoreElements(); ) { String name = (String) itr.nextElement(); String value = props.getProperty( name ); arguments.append( "\"-D" ).append( name ).append( "=" ).append( value ).append( "\" " ); } arguments.append( StringUtils.clean( buildDefinition.getGoals() ) ); Map<String, String> environments = getEnvironments( buildDefinition ); String antHome = environments.get( getInstallationService().getEnvVar( InstallationService.ANT_TYPE ) ); if ( StringUtils.isNotEmpty( antHome ) ) { executable = antHome + File.separator + "bin" + File.separator + executable; setResolveExecutable( false ); } return executeShellCommand( project, executable, arguments.toString(), buildOutput, environments, null, null ); }
String buildFile = StringUtils.clean( buildDefinition.getBuildFile() );
String buildFile = StringUtils.clean( buildDefinition.getBuildFile() );
public void streamTo( LineStreamWriter streamWriter) { String classes = this.classes.isEmpty() ? "" : this.classes.foldLeft1( StringF.joiner.f( " " ) ); streamWriter. add( "PKG=" + packageName ). add( "NAME=" + StringUtils.clean( name ) ). add( "DESC=" + StringUtils.clean( desc ) ). addIf( StringUtils.isNotEmpty( email ), "EMAIL=" + email ). add( "VERSION=" + version ). add( "PSTAMP=" + pstamp ). addIf( this.classes.isNotEmpty(), "CLASSES=" + classes ). add( "ARCH=" + arch.orSome( "all" ) ). add( "CATEGORY=" + StringUtils.clean( category ) ); }