File: exportplugin.xml

package info (click to toggle)
eclipse-platform-ui 4.30-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 93,944 kB
  • sloc: java: 830,957; xml: 25,107; makefile: 7
file content (66 lines) | stat: -rw-r--r-- 2,679 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!-- build script to create a plugin from org.eclipse.ui -->
<project name="Export Eclipse UI" default="exportAll" basedir="..">
	<target name="init">
		<tstamp/>
		<property name="destdir" value="../../plugin-export" />
		<property name="plugin"  value="org.eclipse.ui" />
		<property name="qualifier" value="zzz${DSTAMP}-${TSTAMP}" />
		
		<!-- define property ${plugin_version} by reading version from MANIFEST.MF: -->
		<tempfile property="plugin_version_file" suffix=".plugin_version.tmp" destdir="${destdir}"/>
		<copy file="META-INF/MANIFEST.MF" tofile="${plugin_version_file}"/>
		<replaceregexp file="${plugin_version_file}" match=".*Bundle-Version: ((\d)+\.(\d)+\.(\d)+\.)qualifier.*" replace="plugin_version=_\1${qualifier}" flags="s" />
		<property file="${plugin_version_file}"/>
		<delete file="${plugin_version_file}" />
		
		<property name="dest"  value="${destdir}/${plugin}${plugin_version}" />
		<property name="destjar"  value="${destdir}/${plugin}${plugin_version}.jar" />
	</target>

	<target name="build" depends="init">
    	<eclipse.incrementalBuild project="${plugin}" kind="incr"/>
	</target>

	<target name="export" depends="build">
		<mkdir dir="${destdir}" />
		<delete file="${destjar}" />
		<delete dir="${dest}" />
		<mkdir dir="${dest}" />
		
		<copy todir="${dest}/META-INF">
			<fileset dir="META-INF" />
		</copy>		
		
		<replaceregexp file="${dest}/META-INF/MANIFEST.MF" match="Bundle-Version: ((\d)+\.(\d)+\.(\d)+\.)qualifier" replace="Bundle-Version: \1${qualifier}" byline="true" />
		
		<zip zipfile="${destjar}">
			<fileset dir=".">
			  <include name="plugin.xml" />
			  <include name="plugin.properties" />
			  <include name="icons/**" />
			  <include name=".options" />
			  <include name="schema/**" />
			  <include name="src/**" />
			</fileset>
			<fileset dir="bin" />
			<fileset dir="${dest}">
			  <include name="META-INF/**" />
			</fileset>
		</zip>
		
		<delete dir="${dest}" />
		
	</target>

	<target name="exportAll">
		<antcall target="export"/>
		<ant antfile="scripts/exportplugin.xml" dir="../org.eclipse.text" target="export"/>
		<ant antfile="scripts/exportplugin.xml" dir="../org.eclipse.jface" target="export"/>
		<ant antfile="scripts/exportplugin.xml" dir="../org.eclipse.jface.text" target="export"/>
		<ant antfile="scripts/exportplugin.xml" dir="../org.eclipse.ui.views" target="export"/>
		<ant antfile="scripts/exportplugin.xml" dir="../org.eclipse.ui.editors" target="export"/>
		<ant antfile="scripts/exportplugin.xml" dir="../org.eclipse.ui.workbench" target="export"/>
		<ant antfile="scripts/exportplugin.xml" dir="../org.eclipse.ui.workbench.texteditor" target="export"/>
	</target>

</project>