Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 1 | <!-- |
| 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 Herrmann | 99e184d | 2010-06-11 17:27:25 +0000 | [diff] [blame] | 13 | <target name="patchMetadata"> |
| 14 | <echo message="Patching metadata in ${otdtUpdatesDir} to relax version requirement of our patch feature"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 15 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 16 | <!-- 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 Herrmann | de63783 | 2010-07-18 19:46:08 +0000 | [diff] [blame] | 24 | <param name="version" expression="${jdt.feature.version}"/> |
| 25 | <param name="versionnext" expression="${jdt.feature.version.next}"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 26 | <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 Herrmann | 3110174 | 2019-05-23 19:11:12 +0200 | [diff] [blame] | 38 | classpath="${targetEclipseDir}/plugins/${org.eclipse.equinox.launcher_jar}"> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 39 | <jvmarg value="-Declipse.p2.MD5Check=false" /> |
| 40 | <arg value="-consoleLog"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 41 | <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 Herrmann | f500dd1 | 2018-06-07 15:10:22 +0200 | [diff] [blame] | 52 | <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 Herrmann | 3110174 | 2019-05-23 19:11:12 +0200 | [diff] [blame] | 59 | classpath="${targetEclipseDir}/plugins/${org.eclipse.equinox.launcher_jar}"> |
Stephan Herrmann | f500dd1 | 2018-06-07 15:10:22 +0200 | [diff] [blame] | 60 | <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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 73 | <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 Herrmann | c1c92fd | 2017-03-05 20:01:24 +0100 | [diff] [blame] | 80 | <!-- don't install incompatible org.eclipse.objectteams.otequinox.otre.feature.group --> |
Stephan Herrmann | d366073 | 2014-08-30 18:56:35 +0200 | [diff] [blame] | 81 | <!-- 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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 87 | <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 Herrmann | 6b24f78 | 2015-12-13 20:14:05 +0100 | [diff] [blame] | 92 | <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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 97 | <echo message="Generating accumulating metadata in ${otdtUpdatesDir}" /> |
| 98 | <!-- existing meta data are pre-loaded from build.xml --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 99 | </target> |
| 100 | |
| 101 | <target name="installTests"> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 102 | <echo message="Installing the Tests from ${testsUpdatesDirBase} into ${test.eclipseDir}"/> |
| 103 | <!-- eclipse tests have been expanded into "eclipse", don't have meta data --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 104 | <antcall target="installFeature"> |
| 105 | <param name="feature" value="org.eclipse.test.feature.group"/> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 106 | <param name="sourceUpdatesDir" value="${testsUpdatesDirBase}/eclipse"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 107 | <param name="targetEclipseDir" value="${test.eclipseDir}"/> |
| 108 | </antcall> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 109 | <!-- otdt tests have been gathered into "otdt", have and need meta data --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 110 | <antcall target="installFeature"> |
| 111 | <param name="feature" value="org.eclipse.objectteams.otdt-tests.feature.group"/> |
Stephan Herrmann | 20ff77c | 2010-06-03 09:31:09 +0000 | [diff] [blame] | 112 | <param name="sourceUpdatesDir" value="${testsUpdatesDirBase}/otdt"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 113 | <param name="targetEclipseDir" value="${test.eclipseDir}"/> |
| 114 | </antcall> |
| 115 | </target> |
| 116 | |
| 117 | </project> |