blob: 1e8896d7d0db1344f14986f46c2987d82816fc38 [file] [log] [blame]
<project>
<target name="createChecksums">
<mkdir dir="${postingDirectory}/${buildLabel}/checksum" />
<checksum file="${postingDirectory}/${buildLabel}/${archiveName}"
property="md5" />
<echo message="${md5} *${archiveName}"
file="${postingDirectory}/${buildLabel}/checksum/${archiveName}.md5" />
<echo message="${md5}"
file="${postingDirectory}/${buildLabel}/checksum/${archiveName}.md5antformat" />
</target>
<target name="unpackUpdateJarsAndCreateZippedPackages">
<!--Note: we use this odd "tmpsite+archiveName" to make unique directories, since
can not be deleted from ant.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=142926
-->
<property name="tmpsite"
value="${buildDirectory}/tmpsite-${archiveName}-temp" />
<!-- temporary. Copy to be able to do side-by-side comparisons -->
<mkdir dir="${buildDirectory}/${buildLabel}/backuporiginalzips" />
<copy file="${buildDirectory}/${buildLabel}/${archiveName}"
todir="${buildDirectory}/${buildLabel}/backuporiginalzips" />
<!-- 1. normalize jars here, from zip of update jars -->
<java jar="${pde.builder.path}/startup.jar"
fork="true"
jvm="${java15-home}/bin/java"
failonerror="true"
maxmemory="256m"
dir="${buildDirectory}">
<arg line="-debug -consolelog -data " />
<arg line="-application org.eclipse.update.core.siteOptimizer" />
<arg line="-jarProcessor -processAll -outputDir ${tmpsite} -repack ${buildDirectory}/${buildLabel}/${archiveName}" />
</java>
<!-- 2. unzip our "normalizeded" jars in the zip file produced in 1., to the directory {tmpsite}/eclipse -->
<unzip dest="${tmpsite}"
src="${tmpsite}/${archiveName}" />
<!-- 3. copy all update jars (and gz files, and digest.zip files) to a common update site directory -->
<mkdir dir="${postingDirectory}/${buildLabel}/updateSite" />
<copy todir="${postingDirectory}/${buildLabel}/updateSite">
<fileset dir="${tmpsite}/eclipse">
</fileset>
</copy>
<!-- 4. for modularity, pack200 done here. gz files produced (though, could result in duplicate processing) -->
<java jar="${pde.builder.path}/startup.jar"
fork="true"
jvm="${java15-home}/bin/java"
failonerror="true"
maxmemory="256m"
dir="${buildDirectory}">
<arg line="-application org.eclipse.update.core.siteOptimizer" />
<arg line="-jarProcessor -verbose -outputDir ${postingDirectory}/${buildLabel}/updateSite -pack ${postingDirectory}/${buildLabel}/updateSite" />
</java>
<!-- 5. now create traditional zip file of unpacked jars (but jars that have not been
unpacked, should be in "normalized" state -->
<!-- unpacks those jars that are supposed to be unpacked based on feature defintion -->
<unpackUpdateJars site="${tmpsite}/eclipse"
output="${tmpsite}/unpacked/eclipse" />
<!-- add copy of legal doc's here, product.ini, etc., before re-zipping -->
<copy todir="${tmpsite}/unpacked/eclipse">
<fileset dir="${wtp.builder.home}/rootfiles">
</fileset>
</copy>
<!-- delete first version, which we are about to re-create -->
<delete file="${buildDirectory}/${buildLabel}/${archiveName}" />
<!-- recreate zip file now, same name, traditional content, which is mix of folders and jars -->
<zip destfile="${buildDirectory}/${buildLabel}/${archiveName}"
basedir="${tmpsite}/unpacked"
update="false"
duplicate="preserve" />
<!-- 6. can now remove tmpsite no longer needed -->
<!-- <delete dir="${tmpsite}" /> -->
</target>
</project>