]> gerrit.simantics Code Review - simantics/platform.git/blob - features/org.simantics.migration.feature/build.xml
f100404a57e06c535a7fb38d1c42ea2fe4ec7c56
[simantics/platform.git] / features / org.simantics.migration.feature / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="org.simantics.migration" default="build.update.jar" basedir=".">
3
4         <target name="init">
5                 <property name="feature.temp.folder" value="${basedir}/feature.temp.folder"/>
6                 <property name="feature.destination" value="${basedir}"/>
7                 <property name="p2.build.repo" value="file:${buildDirectory}/buildRepo"/>
8                 <condition property="p2.publish.parts" value="true"             >
9                         <istrue value="${p2.gathering}"/>
10                 </condition>
11         </target>
12
13         <target name="all.plugins" depends="init">
14                 <ant antfile="build.xml" dir="../../bundles/org.simantics.migration.ui" target="${target}">
15                         <property name="os" value="win32"/>
16                         <property name="ws" value="win32"/>
17                         <property name="arch" value="x86_64"/>
18                 </ant>
19         </target>
20         <target name="all.features" depends="init">
21         </target>
22         <target name="update.feature" depends="init">
23         </target>
24
25         <target name="all.children" depends="init,all.features,all.plugins,update.feature">
26         </target>
27
28         <target name="children" if="include.children">
29                 <antcall target="all.children"/>
30         </target>
31
32         <target name="build.jars" depends="init" description="Build all the jars for the feature: org.simantics.migration.">
33                 <antcall target="all.children">
34                         <param name="target" value="build.jars"/>
35                 </antcall>
36         </target>
37
38         <target name="build.sources" depends="init">
39                 <antcall target="all.children">
40                         <param name="target" value="build.sources"/>
41                 </antcall>
42         </target>
43
44         <target name="build.zips" depends="init">
45                 <antcall target="all.children">
46                         <param name="target" value="build.zips"/>
47                 </antcall>
48         </target>
49
50         <target name="build.update.jar" depends="init" description="Build the feature jar of: org.simantics.migration for an update site.">
51                 <antcall target="all.children">
52                         <param name="target" value="build.update.jar"/>
53                 </antcall>
54                 <property name="feature.base" value="${feature.temp.folder}"/>
55                 <delete dir="${feature.temp.folder}"/>
56                 <mkdir dir="${feature.temp.folder}"/>
57                 <mkdir dir="${feature.temp.folder}/features/org.simantics.migration_1.0.0.201810081537"/>
58                 <antcall target="gather.bin.parts" inheritAll="false">
59                         <param name="feature.base" value="${feature.temp.folder}"/>
60                         <param name="updateJar.omitRootfiles" value="true"/>
61                         <param name="arch" value="*"/>
62                         <param name="os" value="*"/>
63                         <param name="ws" value="*"/>
64                         <param name="nl" value="*"/>
65                 </antcall>
66                 <jar destfile="${feature.destination}/org.simantics.migration_1.0.0.201810081537.jar" basedir="${feature.temp.folder}/features/org.simantics.migration_1.0.0.201810081537"/>
67                 <delete dir="${feature.temp.folder}"/>
68         </target>
69
70         <target name="publish.bin.parts" depends="init" if="p2.publish.parts">
71                 <mkdir dir="${feature.temp.folder}/features/org.simantics.migration_1.0.0.201810081537"/>
72                 <copy todir="${feature.temp.folder}/features/org.simantics.migration_1.0.0.201810081537" failonerror="true" overwrite="true">
73                         <fileset dir="${basedir}">
74                                 <include name="feature.xml"/>
75                         </fileset>
76                 </copy>
77                 <eclipse.idReplacer featureFilePath="${feature.temp.folder}/features/org.simantics.migration_1.0.0.201810081537/feature.xml"  selfVersion="1.0.0.201810081537" featureIds="" pluginIds="org.simantics.migration.ui:0.0.0,1.0.0.201810081537,"/>
78                 <eclipse.gatherFeature 
79                    metadataRepository="${p2.build.repo}"
80                    artifactRepository="${p2.build.repo}"
81                    buildResultFolder="${feature.temp.folder}/features/org.simantics.migration_1.0.0.201810081537"
82                    baseDirectory="${basedir}"
83                 />
84         </target>
85
86         <target name="gather.bin.parts" depends="init" if="feature.base">
87                 <mkdir dir="${feature.base}/features/org.simantics.migration_1.0.0.201810081537"/>
88                 <antcall target="children">
89                         <param name="target" value="gather.bin.parts"/>
90                         <param name="destination.temp.folder" value="${feature.base}/plugins"/>
91                 </antcall>
92                 <copy todir="${feature.base}/features/org.simantics.migration_1.0.0.201810081537" failonerror="true" overwrite="false">
93                         <fileset dir="${basedir}">
94                                 <include name="feature.xml"/>
95                         </fileset>
96                 </copy>
97                 <eclipse.idReplacer featureFilePath="${feature.base}/features/org.simantics.migration_1.0.0.201810081537/feature.xml"  selfVersion="1.0.0.201810081537" featureIds="" pluginIds="org.simantics.migration.ui:0.0.0,1.0.0.201810081537,"/>
98                 <antcall target="rootFiles">
99                         <param name="rootTarget" value="rootFiles${os}_${ws}_${arch}"/>
100                 </antcall>
101         </target>
102         <target name="rootFiles" unless="updateJar.omitRootfiles">
103                 <antcall target="${rootTarget}"/>
104         </target>
105
106         <target name="rootFileswin32_win32_x86_64">
107         </target>
108         <target name="rootFilesgroup_group_group">
109                 <antcall target="rootFileswin32_win32_x86_64"/>
110         </target>
111
112         <target name="zip.distribution" depends="init" description="Create a zip containing all the plug-ins and features for the feature: org.simantics.migration.">
113                 <delete dir="${feature.temp.folder}"/>
114                 <mkdir dir="${feature.temp.folder}"/>
115                 <antcall target="gather.bin.parts">
116                         <param name="include.children" value="true"/>
117                         <param name="feature.base" value="${feature.temp.folder}"/>
118                         <param name="arch" value="*"/>
119                         <param name="os" value="*"/>
120                         <param name="ws" value="*"/>
121                         <param name="nl" value="*"/>
122                 </antcall>
123                 <zip destfile="${feature.destination}/org.simantics.migration_1.0.0.201810081537.bin.dist.zip" basedir="${feature.temp.folder}" filesonly="false" whenempty="skip" update="false"/>
124                 <delete dir="${feature.temp.folder}"/>
125         </target>
126
127         <target name="zip.sources" depends="init">
128                 <delete dir="${feature.temp.folder}"/>
129                 <mkdir dir="${feature.temp.folder}"/>
130                 <antcall target="all.children">
131                         <param name="include.children" value="true"/>
132                         <param name="target" value="gather.sources"/>
133                         <param name="destination.temp.folder" value="${feature.temp.folder}/plugins/org.simantics.migration.source_1.0.0.201810081537/src"/>
134                 </antcall>
135                 <zip destfile="${feature.destination}/org.simantics.migration_1.0.0.201810081537.src.zip" basedir="${feature.temp.folder}" filesonly="true" whenempty="skip" update="false"/>
136                 <delete dir="${feature.temp.folder}"/>
137         </target>
138
139         <target name="zip.logs" depends="init">
140                 <delete dir="${feature.temp.folder}"/>
141                 <mkdir dir="${feature.temp.folder}"/>
142                 <condition property="logExtension.param" value="logExtension" else="logExtension.param"         >
143                         <isset property="logExtension"/>
144                 </condition>
145                 <antcall target="all.children" inheritAll="false">
146                         <param name="include.children" value="true"/>
147                         <param name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
148                         <param name="${logExtension.param}" value="${logExtension}"/>
149                         <param name="target" value="gather.logs"/>
150                 </antcall>
151                 <zip destfile="${feature.destination}/org.simantics.migration_1.0.0.201810081537.log.zip" basedir="${feature.temp.folder}" filesonly="true" whenempty="skip" update="false"/>
152                 <delete dir="${feature.temp.folder}"/>
153         </target>
154
155         <target name="clean" depends="init" description="Clean the feature: org.simantics.migration of all the zips, jars and logs created.">
156                 <delete file="${feature.destination}/org.simantics.migration_1.0.0.201810081537.jar"/>
157                 <delete file="${feature.destination}/org.simantics.migration_1.0.0.201810081537.bin.dist.zip"/>
158                 <delete file="${feature.destination}/org.simantics.migration_1.0.0.201810081537.log.zip"/>
159                 <delete file="${feature.destination}/org.simantics.migration_1.0.0.201810081537.src.zip"/>
160                 <delete dir="${feature.temp.folder}"/>
161                 <antcall target="all.children">
162                         <param name="target" value="clean"/>
163                 </antcall>
164         </target>
165
166         <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
167                 <eclipse.convertPath fileSystemPath="C:/Work/workspace/psaas/git/features/org.simantics.migration.feature/" property="resourcePath"/>
168                 <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
169                 <antcall target="all.children">
170                         <param name="target" value="refresh"/>
171                 </antcall>
172         </target>
173         <target name="gather.sources">
174                 <antcall target="children">
175                         <param name="destination.temp.folder" value="${feature.temp.folder}/plugins/org.simantics.migration.source_1.0.0.201810081537/src"/>
176                         <param name="target" value="gather.sources"/>
177                 </antcall>
178         </target>
179
180         <target name="gather.logs" depends="init">
181                 <mkdir dir="${feature.temp.folder}/plugins"/>
182                 <property name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
183                 <condition property="logExtension.param" value="logExtension" else="logExtension.param"         >
184                         <isset property="logExtension"/>
185                 </condition>
186                 <antcall target="all.children" inheritAll="false">
187                         <param name="${logExtension.param}" value="${logExtension}"/>
188                         <param name="target" value="gather.logs"/>
189                         <param name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
190                 </antcall>
191         </target>
192
193 </project>