blob: 1874100c9fb6d991391950acddc22a5764c5f020 [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>
59 <antcall target="installFeature">
60 <param name="feature" value="org.eclipse.objectteams.otdt.feature.group"/>
61 <param name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
62 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
63 </antcall>
64 <echo message="Generating accumulating metadata in ${otdtUpdatesDir}" />
65 <!-- existing meta data are pre-loaded from build.xml -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000066 </target>
67
68 <target name="installTests">
Stephan Herrmann20ff77c2010-06-03 09:31:09 +000069 <echo message="Installing the Tests from ${testsUpdatesDirBase} into ${test.eclipseDir}"/>
70 <!-- eclipse tests have been expanded into "eclipse", don't have meta data -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000071 <antcall target="installFeature">
72 <param name="feature" value="org.eclipse.test.feature.group"/>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +000073 <param name="sourceUpdatesDir" value="${testsUpdatesDirBase}/eclipse"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000074 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
75 </antcall>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +000076 <!-- otdt tests have been gathered into "otdt", have and need meta data -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000077 <antcall target="installFeature">
78 <param name="feature" value="org.eclipse.objectteams.otdt-tests.feature.group"/>
Stephan Herrmann20ff77c2010-06-03 09:31:09 +000079 <param name="sourceUpdatesDir" value="${testsUpdatesDirBase}/otdt"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000080 <param name="targetEclipseDir" value="${test.eclipseDir}"/>
81 </antcall>
82 </target>
83
84</project>