blob: 80bad520c6009a0b9b654c712ef61c239601dafc [file] [log] [blame]
Stephan Herrmann7b7062f2010-04-01 19:56:59 +00001<?xml version="1.0" encoding="UTF-8"?>
Stephan Herrmann8f4b3212010-05-22 16:38:56 +00002
Stephan Herrmann44109d32011-08-02 14:34:26 +00003<!--
4 Copyright (c) 2007, 2011 IBM Corporation and others.
Stephan Herrmann7b7062f2010-04-01 19:56:59 +00005 All rights reserved. This program and the accompanying materials
6 are made available under the terms of the Eclipse Public License v1.0
7 which accompanies this distribution, and is available at
8 http://www.eclipse.org/legal/epl-v10.html
9
10 Contributors:
11 IBM Corporation - initial API and implementation
12 -->
13
14<!-- build script to create a plugin from ${plugin} -->
Stephan Herrmann44109d32011-08-02 14:34:26 +000015<project name="${plugin}" default="export plug-in [_3.7.1]" basedir="..">
16<target name="export plug-in [_3.7.1]">
Stephan Herrmann7b7062f2010-04-01 19:56:59 +000017 <tstamp/>
18 <property name="qualifier" value="z${DSTAMP}-${TSTAMP}" />
19 <antcall target="zz_internal_export">
Stephan Herrmann44109d32011-08-02 14:34:26 +000020 <param name="jdt_core_version" value="3.7.1"/>
Stephan Herrmann7b7062f2010-04-01 19:56:59 +000021 </antcall>
22</target>
Stephan Herrmann44109d32011-08-02 14:34:26 +000023<target name="export plug-in [_3.7.1.qualifier] (binary only)">
Stephan Herrmann7b7062f2010-04-01 19:56:59 +000024 <tstamp/>
25 <property name="qualifier" value="z${DSTAMP}-${TSTAMP}" />
26 <antcall target="zz_internal_export_binary_only">
Stephan Herrmann44109d32011-08-02 14:34:26 +000027 <param name="jdt_core_version" value="3.7.1.${qualifier}"/>
Stephan Herrmann7b7062f2010-04-01 19:56:59 +000028 </antcall>
29</target>
Stephan Herrmann44109d32011-08-02 14:34:26 +000030<target name="export plug-in [_3.7.1.qualifier] (with sources)">
Stephan Herrmann7b7062f2010-04-01 19:56:59 +000031 <tstamp/>
32 <property name="qualifier" value="z${DSTAMP}-${TSTAMP}" />
33 <antcall target="zz_internal_export">
Stephan Herrmann44109d32011-08-02 14:34:26 +000034 <param name="jdt_core_version" value="3.7.1.${qualifier}"/>
Stephan Herrmann7b7062f2010-04-01 19:56:59 +000035 </antcall>
36</target>
37
38<target name="zz_internal_export">
39
40 <tstamp/>
41 <property name="export-dir" value="../../plugin-export" />
42 <property name="plugin" value="org.eclipse.jdt.core" />
43 <property name="plugin-dir" value="${export-dir}/${plugin}_${jdt_core_version}"/>
44
45 <echo message="TARGET: ${export-dir}" />
46 <mkdir dir="${export-dir}" />
47 <delete dir="${plugin-dir}" />
48 <mkdir dir="${plugin-dir}" />
49
50 <echo message="UPDATE jdtCompilerAdapter.jar" />
51 <jar
52 jarfile="${plugin-dir}/jdtCompilerAdapter.jar"
53 basedir="antbin"/>
54
55 <echo message="UPDATE ${plugin}_${jdt_core_version}.jar" />
56 <copy todir="${plugin-dir}/META-INF">
57 <fileset dir="META-INF" />
58 </copy>
59 <replaceregexp file="${plugin-dir}/META-INF/MANIFEST.MF" match="Bundle-Version: ((\d)+\.(\d)+\.(\d)+\.)qualifier" replace="Bundle-Version: \1${qualifier}" byline="true" />
60 <zip zipfile="${plugin-dir}/${plugin}_${jdt_core_version}.jar">
61 <fileset dir=".">
62 <include name="plugin.xml" />
63 <include name="plugin.properties" />
64 <include name=".options"/>
65 <include name="about.html"/>
66 </fileset>
67 <fileset dir="${plugin-dir}">
68 <include name="META-INF/**" />
69 </fileset>
70 <fileset dir="bin" />
71 <fileset file="${plugin-dir}/jdtCompilerAdapter.jar"/>
72 <zipfileset dir="batch" prefix="src"/>
73 <zipfileset dir="codeassist" prefix="src"/>
74 <zipfileset dir="compiler" prefix="src"/>
75 <zipfileset dir="dom" prefix="src"/>
76 <zipfileset dir="eval" prefix="src"/>
77 <zipfileset dir="formatter" prefix="src"/>
78 <zipfileset dir="model" prefix="src"/>
79 <zipfileset dir="search" prefix="src"/>
80 </zip>
81 <delete dir="${plugin-dir}/META-INF" />
82
83 <delete file="${plugin-dir}/jdtCompilerAdapter.jar"/>
84
85 <echo message="UPDATE ${export-dir}/../${plugin}_${jdt_core_version}.zip" />
86 <zip zipfile="${export-dir}/../${plugin}_${jdt_core_version}.zip"
87 basedir="${export-dir}"
88 includes="${plugin}_${jdt_core_version}/**" />
89 <!--
90 <delete dir="${plugin-dir}" />
91 -->
92</target>
93
94<target name="zz_internal_export_binary_only">
95
96 <tstamp/>
97 <property name="export-dir" value="../../plugin-export" />
98 <property name="plugin" value="org.eclipse.jdt.core" />
99 <property name="plugin-dir" value="${export-dir}/${plugin}_${jdt_core_version}"/>
100
101 <echo message="TARGET: ${export-dir}" />
102 <mkdir dir="${export-dir}" />
103 <delete dir="${plugin-dir}" />
104 <mkdir dir="${plugin-dir}" />
105
106 <echo message="UPDATE jdtCompilerAdapter.jar" />
107 <jar
108 jarfile="${plugin-dir}/jdtCompilerAdapter.jar"
109 basedir="antbin"/>
110
111 <echo message="UPDATE ${plugin}_${jdt_core_version}.jar" />
112 <copy todir="${plugin-dir}/META-INF">
113 <fileset dir="META-INF" />
114 </copy>
115 <replaceregexp file="${plugin-dir}/META-INF/MANIFEST.MF" match="Bundle-Version: ((\d)+\.(\d)+\.(\d)+\.)qualifier" replace="Bundle-Version: \1${qualifier}" byline="true" />
116 <zip zipfile="${plugin-dir}/${plugin}_${jdt_core_version}.jar">
117 <fileset dir=".">
118 <include name="plugin.xml" />
119 <include name="plugin.properties" />
120 <include name=".options"/>
121 <include name="about.html"/>
122 </fileset>
123 <fileset dir="${plugin-dir}">
124 <include name="META-INF/**" />
125 </fileset>
126 <fileset dir="bin" />
127 <fileset file="${plugin-dir}/jdtCompilerAdapter.jar"/>
128 </zip>
129 <delete dir="${plugin-dir}/META-INF" />
130
131 <delete file="${plugin-dir}/jdtCompilerAdapter.jar"/>
132
133 <echo message="UPDATE ${export-dir}/../${plugin}_${jdt_core_version}.zip" />
134 <zip zipfile="${export-dir}/../${plugin}_${jdt_core_version}.zip"
135 basedir="${export-dir}"
136 includes="${plugin}_${jdt_core_version}/**" />
137 <!--
138 <delete dir="${plugin-dir}" />
139 -->
140</target>
141
142</project>