| <?xml version="1.0" encoding="UTF-8"?> |
| <project |
| basedir="." |
| default="createP2Repo"> |
| <property environment="env"/> |
| |
| <target |
| name="createP2Repo" |
| depends="checkArgs"> |
| |
| <fail unless="env.JAVA_5_HOME" message="Must provide env.JAVA_5_HOME" /> |
| |
| <property |
| name="buildDirectory" |
| value="${basedir}" /> |
| |
| <echo message=" site (repository) location: ${update.site}" /> |
| |
| <!-- |
| we could probably use -append (in some cases), |
| but to make sure we get completely fresh metadata, |
| we'll re-generate from scratch. |
| --> |
| <delete failonerror="false" verbose="true" file="${update.site}/content.jar" /> |
| <delete failonerror="false" verbose="true" file="${update.site}/artifacts.jar" /> |
| |
| |
| <java |
| taskname="createP2RepoJob" |
| fork="true" |
| resultProperty="createP2RepoResult" |
| failonerror="true" |
| jvm="${env.JAVA_5_HOME}/bin/java" |
| classname="org.eclipse.equinox.launcher.Main" |
| maxmemory="512m" |
| dir="${buildDirectory}"> |
| <classpath> |
| <fileset dir="${eclipse.home}/plugins"> |
| <include name="org.eclipse.equinox.launcher_*.jar" /> |
| </fileset> |
| </classpath> |
| |
| |
| <arg line="-consolelog" /> |
| <arg |
| line="-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" /> |
| <arg |
| line="-updateSite ${update.site} -site file:${update.site}/site.xml -metadataRepository file:${update.site} -metadataRepositoryName 'Web Tools (WTP) Update Site' -artifactRepository 'file:${update.site}' -artifactRepositoryName 'Web Tools (WTP) Artifacts' -compress -reusePack200Files -noDefaultIUs" /> |
| </java> |
| |
| <!-- |
| touch the site.xml file, so it appears "last modified" (or, just modified) as this helps |
| some mirror strategies to know the site has changed (they use the site.xml file to test if mirror site is available and up-to-date). |
| --> |
| <touch file="${update.site}/site.xml" /> |
| <!-- touch siteProxyFile.txt --> |
| |
| </target> |
| |
| <target name="checkArgs"> |
| <fail message="eclipse.home and update.site must be set."> |
| <condition> |
| <and> |
| <not> |
| <isset property="eclipse.home" /> |
| </not> |
| <not> |
| <isset property="update.site" /> |
| </not> |
| </and> |
| </condition> |
| </fail> |
| </target> |
| |
| |
| </project> |