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