Skip to content

Commit

Permalink
Applied minor refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkoseifert committed Oct 27, 2015
1 parent 38e6b32 commit d058dd3
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@

public class BuildProductStep extends AbstractAntTargetGenerator {

private EclipseProduct productSpec;
private File targetDir;
private final EclipseProduct productSpec;
private final File targetDir;

public BuildProductStep(EclipseProduct productSpec, File targetDir) {
super();
this.productSpec = productSpec;
this.targetDir = targetDir;
}
Expand All @@ -57,13 +56,13 @@ protected AntTarget generateUpdateSiteAntTarget() throws BuildException {

new TimestampUtil().addGetBuildTimestampFromEnvironment(content);

//TODO this is not good, because the tstamp should not be stage dependent
// TODO this is not good, because the tstamp should not be stage dependent
content.append("<!-- fallback if env.BUILD_ID is not set -->");
content.append("<tstamp/>");
content.append("<property name=\"buildid\" value=\"${DSTAMP}${TSTAMP}\" />");
content.appendLineBreak();

//set version in product file
// Set version in product file
content.append("<replace file=\"" + productSpecPath + "\" token=\"0.0.0\" value=\"" + siteVersion + ".v${buildid}\"/>");

String updateSiteID = deploymentSpec.getUpdateSite().getIdentifier();
Expand All @@ -77,7 +76,7 @@ protected AntTarget generateUpdateSiteAntTarget() throws BuildException {
String p2ProductRepo = new File(new File(repoBaseFolder.getParentFile(), "products-p2"), updateSiteID).getAbsolutePath();
String productsDir = new File(repoBaseFolder.getParentFile(), "products-zip").getAbsolutePath();

//call PDE product build
// Call PDE product build
content.append("<exec executable=\"eclipse\" failonerror=\"true\">"); //TODO this is a platform dependent executable in the PATH
content.append("<arg value=\"--launcher.suppressErrors\"/>");
content.append("<arg value=\"-noSplash\"/>");
Expand Down Expand Up @@ -161,7 +160,4 @@ protected AntTarget generateUpdateSiteAntTarget() throws BuildException {
AntTarget target = new AntTarget("build-eclipse-product-" + updateSiteID, content);
return target;
}



}

0 comments on commit d058dd3

Please sign in to comment.