1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="org.simantics.migration" default="build.update.jar" basedir=".">
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}"/>
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"/>
20 <target name="all.features" depends="init">
22 <target name="update.feature" depends="init">
25 <target name="all.children" depends="init,all.features,all.plugins,update.feature">
28 <target name="children" if="include.children">
29 <antcall target="all.children"/>
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"/>
38 <target name="build.sources" depends="init">
39 <antcall target="all.children">
40 <param name="target" value="build.sources"/>
44 <target name="build.zips" depends="init">
45 <antcall target="all.children">
46 <param name="target" value="build.zips"/>
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"/>
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="*"/>
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}"/>
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"/>
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}"
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"/>
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"/>
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}"/>
102 <target name="rootFiles" unless="updateJar.omitRootfiles">
103 <antcall target="${rootTarget}"/>
106 <target name="rootFileswin32_win32_x86_64">
108 <target name="rootFilesgroup_group_group">
109 <antcall target="rootFileswin32_win32_x86_64"/>
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="*"/>
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}"/>
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"/>
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}"/>
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"/>
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"/>
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}"/>
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"/>
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"/>
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"/>
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"/>
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"/>