Introduce download script
authorMathieu Baudier <mbaudier@argeo.org>
Wed, 9 Jul 2008 18:21:12 +0000 (18:21 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Wed, 9 Jul 2008 18:21:12 +0000 (18:21 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk/maven@1401 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

plugins/maven-argeo-pde-plugin/src/main/scripts/download.build.xml

index cc093f67476008112770ce386206e49fd35270f4..9cc23eca1095f962d9c70973f870938ba6d9b372 100644 (file)
                <doZip target="eclipse"
                       file="eclipse-RCP-3.3.2-delta-pack.zip"
                       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" />
-               <doZip target="eclipse" file="" url="" />
 
+               <!--
+               <doZip target="eclipse" file="" url="" />
+-->
                <!-- WTP -->
                <doZip target="pluginPath/eclipse-WTP-2.0.2"
                       file="wtp-R-2.0.2-20080223205547.zip"
@@ -45,6 +47,7 @@
                        <retrieve url="@{url}" downloadfile="@{downloadFile}" />
                        <mkdir dir="${eclipseBuildDir}/@{target}" />
                        <unzip dest="${eclipseBuildDir}/@{target}" src="@{downloadFile}" />
+                       <removeEclipseDir dir="${eclipseBuildDir}/@{target}" />
                </sequential>
        </macrodef>
 
@@ -62,6 +65,7 @@
                        <untar dest="${eclipseBuildDir}/@{target}"
                               src="@{downloadFile}"
                               compression="gzip" />
+                       <removeEclipseDir dir="${eclipseBuildDir}/@{target}" />
                </sequential>
        </macrodef>
 
                             dest="@{downloadFile}"
                             verbose="true"
                             usetimestamp="true" />
+               </sequential>
+       </macrodef>
 
+       <macrodef name="removeEclipseDir">
+               <attribute name="dir" />
+               <sequential>
+                       <echo message="Remove eclipse dir from @{dir} if present" />
+                       <move todir="@{dir}">
+                               <fileset dir="@{dir}">
+                                       <include name="eclipse/plugins/**" />
+                                       <include name="eclipse/features/**" />
+                               </fileset>
+                               <globmapper from="eclipse/*" to="*" />
+                       </move>
+                       <delete dir="@{dir}/eclipse" />
                </sequential>
        </macrodef>
 </project>
\ No newline at end of file