blob: eb87f7ba87398e8f0f7ec36bdc7ec78a4c1b6d96 [file] [log] [blame]
david_williams7ce1f7b2008-05-23 04:32:11 +00001<?xml version="1.0" encoding="UTF-8"?>
2<project
3 basedir="."
4 default="createP2Repo">
david_williamsf6f05a32008-05-28 04:58:45 +00005 <property environment="env"/>
david_williams7ce1f7b2008-05-23 04:32:11 +00006
7 <target
8 name="createP2Repo"
9 depends="checkArgs">
10
david_williamsf6f05a32008-05-28 04:58:45 +000011 <fail unless="env.JAVA_5_HOME" message="Must provide env.JAVA_5_HOME" />
david_williams7bb3b412008-05-28 04:48:07 +000012
david_williams7ce1f7b2008-05-23 04:32:11 +000013 <property
14 name="buildDirectory"
15 value="${basedir}" />
16
17 <echo message=" site (repository) location: ${update.site}" />
18
19 <!--
20 we could probably use -append (in some cases),
21 but to make sure we get completely fresh metadata,
22 we'll re-generate from scratch.
23 -->
24 <delete failonerror="false" verbose="true" file="${jarlocation}/content.jar" />
25 <delete failonerror="false" verbose="true" file="${jarlocation}/artifacts.jar" />
26
27
28 <java
29 taskname="createP2RepoJob"
30 fork="true"
31 resultProperty="createP2RepoResult"
32 failonerror="true"
david_williamsf6f05a32008-05-28 04:58:45 +000033 jvm="${env.JAVA_5_HOME}/bin/java"
david_williams7ce1f7b2008-05-23 04:32:11 +000034 classname="org.eclipse.equinox.launcher.Main"
35 maxmemory="512m"
36 dir="${buildDirectory}">
37 <classpath>
38 <fileset dir="${eclipse.home}/plugins">
39 <include name="org.eclipse.equinox.launcher_*.jar" />
40 </fileset>
41 </classpath>
42
43
44 <arg line="-debug -consolelog" />
45 <arg
46 line="-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" />
47 <arg
48 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" />
49 </java>
50
51 <!--
52 touch the site.xml file, so it appears "last modified" (or, just modified) as this helps
53 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).
54 -->
55 <touch file="${update.site}/site.xml" />
56 <!-- touch siteProxyFile.txt -->
57
58 </target>
59
60 <target name="checkArgs">
61 <fail message="eclipse.home and update.site must be set.">
62 <condition>
63 <and>
64 <not>
65 <isset property="eclipse.home" />
66 </not>
67 <not>
68 <isset property="update.site" />
69 </not>
70 </and>
71 </condition>
72 </fail>
73 </target>
74
75
76</project>