]> git.argeo.org Git - gpl/argeo-slc.git/blob - plugins/maven-argeo-pde-plugin/src/main/scripts/download.build.xml
Introduce custom lifecycle for type eclipseFeature
[gpl/argeo-slc.git] / plugins / maven-argeo-pde-plugin / src / main / scripts / download.build.xml
1 <project default="eclipseBuildDir">
2
3 <target name="eclipseBuildDir">
4 <fail message="Property eclipseBuildDir has to be set"
5 unless="eclipseBuildDir" />
6
7 <property name="downloadsDir" location="${eclipseBuildDir}/download" />
8 <mkdir dir="${downloadsDir}" />
9
10 <!-- Base -->
11 <doTar target="eclipse"
12 file="eclipse-SDK-3.3.2-linux-gtk.tar.gz"
13 url="http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/eclipse/downloads/drops/R-3.3.2-200802211800/eclipse-SDK-3.3.2-linux-gtk.tar.gz" />
14 <doZip target="eclipse"
15 file="eclipse-RCP-3.3.2-delta-pack.zip"
16 url="http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/eclipse/downloads/drops/R-3.3.2-200802211800/eclipse-RCP-3.3.2-delta-pack.zip" />
17
18 <!--
19 <doZip target="eclipse" file="" url="" />
20 -->
21 <!-- WTP -->
22 <doZip target="pluginPath/eclipse-WTP-2.0.2"
23 file="wtp-R-2.0.2-20080223205547.zip"
24 url="http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/webtools/downloads/drops/R2.0/R-2.0.2-20080223205547/wtp-R-2.0.2-20080223205547.zip" />
25 <doZip target="pluginPath/eclipse-WTP-2.0.2"
26 file="emf-sdo-xsd-SDK-2.3.2.zip"
27 url="http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/modeling/emf/emf/downloads/drops/2.3.2/R200802051830/emf-sdo-xsd-SDK-2.3.2.zip" />
28 <doZip target="pluginPath/eclipse-WTP-2.0.2"
29 file="GEF-SDK-3.3.2.zip"
30 url="http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/tools/gef/downloads/drops/3.3.2/R200802211602/GEF-SDK-3.3.2.zip" />
31
32 <doZip target="pluginPath/Spring-IDE-2.0.5"
33 file="spring-ide_2.0.5_v200805211800.zip"
34 url="http://s3browse.com/getObject/dist.springframework.org/release/IDE/spring-ide_2.0.5_v200805211800.zip" />
35
36 </target>
37
38 <macrodef name="doZip">
39 <attribute name="url" />
40 <attribute name="target" />
41 <attribute name="file" default="download.zip" />
42 <attribute name="downloadLocation"
43 default="${downloadsDir}/@{target}" />
44 <attribute name="downloadFile" default="@{downloadLocation}/@{file}" />
45 <sequential>
46 <mkdir dir="@{downloadLocation}" />
47 <retrieve url="@{url}" downloadfile="@{downloadFile}" />
48 <mkdir dir="${eclipseBuildDir}/@{target}" />
49 <unzip dest="${eclipseBuildDir}/@{target}" src="@{downloadFile}" />
50 <removeEclipseDir dir="${eclipseBuildDir}/@{target}" />
51 </sequential>
52 </macrodef>
53
54 <macrodef name="doTar">
55 <attribute name="url" />
56 <attribute name="target" />
57 <attribute name="file" default="download.zip" />
58 <attribute name="downloadLocation"
59 default="${downloadsDir}/@{target}" />
60 <attribute name="downloadFile" default="@{downloadLocation}/@{file}" />
61 <sequential>
62 <mkdir dir="@{downloadLocation}" />
63 <retrieve url="@{url}" downloadfile="@{downloadFile}" />
64 <mkdir dir="${eclipseBuildDir}/@{target}" />
65 <untar dest="${eclipseBuildDir}/@{target}"
66 src="@{downloadFile}"
67 compression="gzip" />
68 <removeEclipseDir dir="${eclipseBuildDir}/@{target}" />
69 </sequential>
70 </macrodef>
71
72 <macrodef name="retrieve">
73 <attribute name="url" />
74 <attribute name="downloadFile" />
75 <sequential>
76 <echo message="Download from URL @{url} to @{downloadFile}" />
77 <get src="@{url}"
78 dest="@{downloadFile}"
79 verbose="true"
80 usetimestamp="true" />
81 </sequential>
82 </macrodef>
83
84 <macrodef name="removeEclipseDir">
85 <attribute name="dir" />
86 <sequential>
87 <echo message="Remove eclipse dir from @{dir} if present" />
88 <move todir="@{dir}">
89 <fileset dir="@{dir}">
90 <include name="eclipse/plugins/**" />
91 <include name="eclipse/features/**" />
92 </fileset>
93 <globmapper from="eclipse/*" to="*" />
94 </move>
95 <delete dir="@{dir}/eclipse" />
96 </sequential>
97 </macrodef>
98 </project>