Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 5afa81b409f6221aeb411ab36b032648ffa12e66 (plain) (tree)

















































































































































































































                                                                                   
<?xml version="1.0" encoding="UTF-8"?>
<project
  name="delta pack build"
  default="assembler"
  basedir=".">
  <!--
    This script is a starting point for creating a traditional
    "delta pack" for anyone who does not what to use p2 directly.
  -->


  <target
    name="init"
    unless="buildInitialized">
    <property
      name="projectDir"
      value="${basedir}" />
    <property
      name="buildId"
      value="I201503032000" />
    <property
      name="resultsDir"
      value="${projectDir}/results" />
    <property
      name="buildlogs"
      value="${resultsDir}/buildlogs" />
    <property
      name="checksum"
      value="${resultsDir}/checksum" />
    <delete
      verbose="true"
      dir="${buildlogs}" />
    <mkdir dir="${buildlogs}" />

    <record
      name="${buildlogs}/deltaPack-${buildId}-log.txt"
      action="start" />

    <property
      name="buildRepo"
      value="http://download.eclipse.org/eclipse/updates/4.5/" />
    <property
      name="projectDir"
      value="${basedir}" />
    <property
      name="buildId"
      value="I201503032000" />
    <property
      name="archivePrefix"
      value="eclipse" />

    <property
      name="archiveRoot"
      value="${archivePrefix}-${buildId}" />
    <property
      name="archiveName"
      value="${archiveRoot}-delta-pack.zip" />

    <property
      name="featureTempRoot"
      value="${projectDir}/rcp.deltapack" />
    <property
      name="featureTempDir"
      value="featureTemp" />
    <property
      name="featureTemp"
      value="${featureTempRoot}/${featureTempDir}" />
    <property
      name="featureTemp2"
      value="${featureTempRoot}/featureTemp2" />
    <delete
      verbose="true"
      dir="${featureTemp}" />
    <mkdir dir="${featureTemp}" />
    <delete
      verbose="true"
      dir="${featureTemp2}" />
    <mkdir dir="${featureTemp2}" />

    <property
      name="archivePathAndName"
      value="${resultsDir}/${archiveName}" />

    <property
      name="buildInitialized"
      value="true" />

  </target>

  <target
    name="build"
    depends="init">
    <echo message="DEBUG: echoproperties at beginning of deltapack (after init)" />
    <echoproperties />

    <!--need to change slicing options to only include platform specific bits -->
    <p2.mirror
      source="${buildRepo}"
      log="${buildlogs}/deltapackmirrorlog.txt"
      verbose="true"
      ignoreerrors="true">
      <destination
        kind="metadata"
        location="file://${featureTemp}"
        name="RCP Delta Pack Repo"
        format="${buildRepo}" />
      <destination
        kind="artifact"
        location="file://${featureTemp}"
        name="RCP Delta Pack Repo"
        format="${buildRepo}" />
      <iu
        id="org.eclipse.equinox.executable.feature.group"
        version="" />
      <iu
        id="org.eclipse.rcp.configuration.feature.group"
        version="" />
      <iu
        id="org.eclipse.platform.feature.group"
        version="" />
      <iu
        id="org.eclipse.platform.source.feature.group"
        version="" />
      <iu
        id="org.eclipse.rcp.feature.group"
        version="" />
      <iu
        id="org.eclipse.rcp.source.feature.group"
        version="" />
      <iu
        id="org.eclipse.jdt.feature.group"
        version="" />
      <iu
        id="org.eclipse.jdt.source.feature.group"
        version="" />
      <iu
        id="org.eclipse.e4.rcp.feature.group"
        version="" />
      <iu
        id="org.eclipse.e4.rcp.source.feature.group"
        version="" />
      <slicingOptions
        includeOptional="false"
        includeNonGreedy="false"
        followStrict="true"
        followOnlyFilteredRequirements="true" />
    </p2.mirror>
    <p2.remove.iu>
      <repository location="file://${featureTemp}" />
      <iu id="org.eclipse.jdt.feature.jar" />
      <iu id="org.eclipse.jdt.source.feature.jar" />
      <iu id="org.eclipse.platform.feature.jar" />
      <iu id="org.eclipse.platform.source.feature.jar" />
      <iu id="org.eclipse.rcp.feature.jar" />
      <iu id="org.eclipse.rcp.source.feature.jar" />
      <iu id="org.eclipse.e4.rcp.feature.jar" />
      <iu id="org.eclipse.e4.rcp.source.feature.jar" />
    </p2.remove.iu>
    <p2.repo2runnable
      destination="${featureTemp2}/eclipse"
      failonerror="true">
      <source
        dir="${featureTempRoot}"
        includes="${featureTempDir}" />
    </p2.repo2runnable>
    <delete verbose="true">
      <fileset
        dir="${featureTemp2}/eclipse"
        includes="*.jar" />
      <fileset
        dir="${featureTemp2}/eclipse"
        includes="*.xml" />
    </delete>

  </target>

  <target
    name="assembler"
    depends="init, build">
    <delete
      verbose="true"
      file="${archivePathAndName}"
      failonerror="false" />
    <exec
      executable="zip"
      dir="${featureTemp2}">
      <arg line="${archivePathAndName} -r ." />
    </exec>

    <delete
      verbose="true"
      dir="${checksum}" />
    <mkdir dir="${checksum}" />
    <checksum
      file="${archivePathAndName}"
      algorithm="sha256"
      todir="${checksum}"
      pattern="{0} *{1}" />

    <!--
      If desired, this would be a good place to remove ${featureTempRoot}
      since no longer needed ... but, but might assist with debugging?
    -->

    <record
      name="${buildlogs}/deltaPack-${buildId}-log.txt"
      action="stop" />

  </target>
</project>

Back to the top