blob: 28ebef520d75677b9378c4f4b6378f861c9d289f [file] [log] [blame]
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00001<!--
2 Copyright (c) 2010 Stephan Herrmann and others.
3 All rights reserved. This program and the accompanying materials
4 are made available under the terms of the Eclipse Public License v1.0
5 which accompanies this distribution, and is available at
6 http://www.eclipse.org/legal/epl-v10.html
7
8 Contributors:
9 Stephan Herrmann - initial API and implementation
10-->
11<project name="p2.helper">
12
Stephan Herrmann99e184d2010-06-11 17:27:25 +000013 <target name="patchMetadata">
14 <echo message="Patching metadata in ${otdtUpdatesDir} to relax version requirement of our patch feature"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000015
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000016 <!-- patch feature version in content.xml -->
17 <property name="patch-content.xsltFile" value="${OTScriptDir}/patch-content-xml.xsl" />
18 <property name="content.origFile" value="content.xml" />
19 <property name="content.transFile" value="content-patched.xml" />
20 <xslt basedir="${otdtUpdatesDir}" destdir="${otdtUpdatesDir}" includes="${content.origFile}" style="${patch-content.xsltFile}" force="true">
21 <outputproperty name="method" value="xml"/>
22 <outputproperty name="encoding" value="UTF-8"/>
23 <outputproperty name="indent" value="yes"/>
Stephan Herrmannde637832010-07-18 19:46:08 +000024 <param name="version" expression="${jdt.feature.version}"/>
25 <param name="versionnext" expression="${jdt.feature.version.next}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000026 <mapper type="glob" from="${content.origFile}" to="${content.transFile}"/>
27 </xslt>
28 <move file="${otdtUpdatesDir}/${content.transFile}" tofile="${otdtUpdatesDir}/${content.origFile}" overwrite="yes"/>
29 </target>
30
31 <target name="installFeature">
32 <echo message="Installing ${feature} from ${sourceUpdatesDir} to ${targetEclipseDir}"/>
33 <java
34 inputstring=""
35 dir="${targetEclipseDir}"
36 fork="true"
37 classname="org.eclipse.equinox.launcher.Main"
Stephan Herrmann31101742019-05-23 19:11:12 +020038 classpath="${targetEclipseDir}/plugins/${org.eclipse.equinox.launcher_jar}">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000039 <jvmarg value="-Declipse.p2.MD5Check=false" />
40 <arg value="-consoleLog"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000041 <arg value="-application"/>
42 <arg value="org.eclipse.equinox.p2.director"/>
43 <arg value="-metadataRepository" />
44 <arg value="file:${sourceUpdatesDir}" />
45 <arg value="-artifactRepository" />
46 <arg value="file:${sourceUpdatesDir}" />
47 <arg value="-installIU" />
48 <arg value="${feature}" />
49 </java>
50 </target>
51
Stephan Herrmannf500dd12018-06-07 15:10:22 +020052 <target name="installFeatureFromUrl">
53 <echo message="Installing ${feature} from ${sourceUpdatesUrl} to ${targetEclipseDir}"/>
54 <java
55 inputstring=""
56 dir="${targetEclipseDir}"
57 fork="true"
58 classname="org.eclipse.equinox.launcher.Main"
Stephan Herrmann31101742019-05-23 19:11:12 +020059 classpath="${targetEclipseDir}/plugins/${org.eclipse.equinox.launcher_jar}">
Stephan Herrmannf500dd12018-06-07 15:10:22 +020060 <jvmarg value="-Declipse.p2.MD5Check=false" />
61 <arg value="-consoleLog"/>
62 <arg value="-application"/>
63 <arg value="org.eclipse.equinox.p2.director"/>
64 <arg value="-metadataRepository" />
65 <arg value="${sourceUpdatesUrl}" />
66 <arg value="-artifactRepository" />
67 <arg value="${sourceUpdatesUrl}" />
68 <arg value="-installIU" />
69 <arg value="${feature}" />
70 </java>
71 </target>
72
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000073 <target name="installOTDT">
74 <echo message="Installing the OTDT from ${otdtUpdatesDir} into ${test.eclipseDir}"/>
75 <antcall target="installFeature">
76 <param name="feature" value="org.eclipse.objectteams.otequinox.feature.group"/>
77 <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
78 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
79 </antcall>
Stephan Herrmannc1c92fd2017-03-05 20:01:24 +010080 <!-- don't install incompatible org.eclipse.objectteams.otequinox.otre.feature.group -->
Stephan Herrmannd3660732014-08-30 18:56:35 +020081 <!-- optional: -->
82 <antcall target="installFeature">
83 <param name="feature" value="org.eclipse.objectteams.otequinox.turbo.feature.group"/>
84 <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
85 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
86 </antcall>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000087 <antcall target="installFeature">
88 <param name="feature" value="org.eclipse.objectteams.otdt.feature.group"/>
89 <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
90 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
91 </antcall>
Stephan Herrmann6b24f782015-12-13 20:14:05 +010092 <antcall target="installFeature">
93 <param name="feature" value="org.eclipse.objectteams.otdt.source.feature.feature.group"/>
94 <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
95 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
96 </antcall>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000097 <echo message="Generating accumulating metadata in ${otdtUpdatesDir}" />
98 <!-- existing meta data are pre-loaded from build.xml -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000099 </target>
100
101 <target name="installTests">
Stephan Herrmann20ff77c2010-06-03 09:31:09 +0000102 <echo message="Installing the Tests from ${testsUpdatesDirBase} into ${test.eclipseDir}"/>
103 <!-- eclipse tests have been expanded into "eclipse", don't have meta data -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000104 <antcall target="installFeature">
105 <param name="feature" value="org.eclipse.test.feature.group"/>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +0000106 <param name="sourceUpdatesDir" value="${testsUpdatesDirBase}/eclipse"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000107 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
108 </antcall>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +0000109 <!-- otdt tests have been gathered into "otdt", have and need meta data -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000110 <antcall target="installFeature">
111 <param name="feature" value="org.eclipse.objectteams.otdt-tests.feature.group"/>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +0000112 <param name="sourceUpdatesDir" value="${testsUpdatesDirBase}/otdt"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000113 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
114 </antcall>
115 </target>
116
117</project>