blob: 31cda67ba85ba3a233d39ab4da254b515e925b43 [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"
38 classpath="${targetEclipseDir}/plugins/${org.eclipse.equinox.launcher_jar}">
39 <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
52 <target name="installOTDT">
53 <echo message="Installing the OTDT from ${otdtUpdatesDir} into ${test.eclipseDir}"/>
54 <antcall target="installFeature">
55 <param name="feature" value="org.eclipse.objectteams.otequinox.feature.group"/>
56 <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
57 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
58 </antcall>
Stephan Herrmannc1c92fd2017-03-05 20:01:24 +010059 <!-- don't install incompatible org.eclipse.objectteams.otequinox.otre.feature.group -->
Stephan Herrmannd3660732014-08-30 18:56:35 +020060 <!-- optional: -->
61 <antcall target="installFeature">
62 <param name="feature" value="org.eclipse.objectteams.otequinox.turbo.feature.group"/>
63 <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
64 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
65 </antcall>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000066 <antcall target="installFeature">
67 <param name="feature" value="org.eclipse.objectteams.otdt.feature.group"/>
68 <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
69 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
70 </antcall>
Stephan Herrmann6b24f782015-12-13 20:14:05 +010071 <antcall target="installFeature">
72 <param name="feature" value="org.eclipse.objectteams.otdt.source.feature.feature.group"/>
73 <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
74 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
75 </antcall>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000076 <echo message="Generating accumulating metadata in ${otdtUpdatesDir}" />
77 <!-- existing meta data are pre-loaded from build.xml -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000078 </target>
79
80 <target name="installTests">
Stephan Herrmann20ff77c2010-06-03 09:31:09 +000081 <echo message="Installing the Tests from ${testsUpdatesDirBase} into ${test.eclipseDir}"/>
82 <!-- eclipse tests have been expanded into "eclipse", don't have meta data -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000083 <antcall target="installFeature">
84 <param name="feature" value="org.eclipse.test.feature.group"/>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +000085 <param name="sourceUpdatesDir" value="${testsUpdatesDirBase}/eclipse"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000086 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
87 </antcall>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +000088 <!-- otdt tests have been gathered into "otdt", have and need meta data -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000089 <antcall target="installFeature">
90 <param name="feature" value="org.eclipse.objectteams.otdt-tests.feature.group"/>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +000091 <param name="sourceUpdatesDir" value="${testsUpdatesDirBase}/otdt"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000092 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
93 </antcall>
94 </target>
95
96</project>