ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r987452 - in /ant/ivy/updatesite/trunk: build.properties build.xml dist/site.xml site-footer.xml site-header.xml
Date Fri, 20 Aug 2010 10:33:18 GMT
Author: hibou
Date: Fri Aug 20 10:33:17 2010
New Revision: 987452

URL: http://svn.apache.org/viewvc?rev=987452&view=rev
Log:
IVYDE-251 : simplify the generation of the site.xml and make it more human readable

Modified:
    ant/ivy/updatesite/trunk/build.properties
    ant/ivy/updatesite/trunk/build.xml
    ant/ivy/updatesite/trunk/dist/site.xml
    ant/ivy/updatesite/trunk/site-footer.xml
    ant/ivy/updatesite/trunk/site-header.xml

Modified: ant/ivy/updatesite/trunk/build.properties
URL: http://svn.apache.org/viewvc/ant/ivy/updatesite/trunk/build.properties?rev=987452&r1=987451&r2=987452&view=diff
==============================================================================
--- ant/ivy/updatesite/trunk/build.properties (original)
+++ ant/ivy/updatesite/trunk/build.properties Fri Aug 20 10:33:17 2010
@@ -3,7 +3,7 @@ mirrors.url=http://ant.apache.org/ivy/iv
 updatesite.url=http://www.apache.org/dist/ant/ivyde/updatesite
 
 # properties for hudson build environment
-hudson.baseUrl=http://hudson.zones.apache.org/hudson
+hudson.baseUrl=http://hudson.apache.org/hudson
 hudson.eclipse.name=eclipse-SDK-3.5.2-solaris-gtk
 hudson.eclipse.dropFile=R-3.5.2-201002111343/${hudson.eclipse.name}.zip
 hudson.eclipse.download.url=http://www.eclipse.org/downloads/download.php

Modified: ant/ivy/updatesite/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/ivy/updatesite/trunk/build.xml?rev=987452&r1=987451&r2=987452&view=diff
==============================================================================
--- ant/ivy/updatesite/trunk/build.xml (original)
+++ ant/ivy/updatesite/trunk/build.xml Fri Aug 20 10:33:17 2010
@@ -244,80 +244,14 @@
         ===================================================================================================================
   
       -->
 
-    <!-- Note on the implementation:
-            To found out with version of the Eclipse feature is the latest, the correct sort
algorithm would be to take into
-            account the OSGi version and order them properly. The current implementation
is based on dates assuming that the
-            latest version is installed the latest. It should be the case on normal release
process.
-    -->
-
-    <macrodef name="generate-site-latest">
-        <attribute name="pathid" />
-        <sequential>
-            <!-- Get the latest bundle -->
-            <path id="last.feature.jar.path.id">
-                <first count="1">
-                    <sort>
-                        <path refid="@{pathid}" />
-                        <reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
-                            <date />
-                        </reverse>
-                    </sort>
-                </first>
-            </path>
-            <property name="last.feature.jar.path.@{pathid}" refid="last.feature.jar.path.id"
/>
-            <basename property="last.feature.jar.@{pathid}" file="${last.feature.jar.path.@{pathid}}"
/>
-            <!-- extract the name and the version from the file name -->
-            <echo file="${work.dir}/feature.jar.properties">${last.feature.jar.@{pathid}}</echo>
-            <!-- get the id -->
-            <loadproperties srcFile="${work.dir}/feature.jar.properties">
-                <filterchain>
-                    <tokenfilter>
-                        <replaceregex pattern="([^_]*)_(.*).jar" replace="last.feature.jar.id.@{pathid}=\1"
flags="gi" />
-                    </tokenfilter>
-                </filterchain>
-            </loadproperties>
-            <!-- get the version -->
-            <loadproperties srcFile="${work.dir}/feature.jar.properties">
-                <filterchain>
-                    <tokenfilter>
-                        <replaceregex pattern="([^_]*)_(.*).jar" replace="last.feature.jar.version.@{pathid}=\2"
flags="gi" />
-                    </tokenfilter>
-                </filterchain>
-            </loadproperties>
-            <!-- finally print the result -->
-            <echoxml file="${updatesite.dir}/site.xml" append="true">
-                <feature url="features/${last.feature.jar.@{pathid}}" id="${last.feature.jar.id.@{pathid}}"
version="${last.feature.jar.version.@{pathid}}">
-                    <category name="latest"/>
-                </feature>
-            </echoxml>
-        </sequential>
-    </macrodef>
-
-    <macrodef name="generate-site-old">
-        <attribute name="pathid" />
+    <macrodef name="generate-site-entries">
+        <attribute name="filesetid" />
+        <attribute name="category" />
         <sequential>
-            <resourcecount property="count.@{pathid}">
-                <path refid="@{pathid}" />
-            </resourcecount>
-            <!-- we need count-1, do the computation via property files -->
-            <echo file="${work.dir}/count.properties">count.lessone.@{pathid}=${count.@{pathid}}</echo>
-            <propertyfile file="${work.dir}/count.properties">
-                <entry  key="count.lessone.@{pathid}" type="int" operation="-" value="1"
/>
-            </propertyfile>
-            <property file="${work.dir}/count.properties" />
-            <!-- get the old files -->
-            <path id="old.feature.jar.path.id">
-                <last count="${count.lessone.@{pathid}}">
-                    <sort>
-                        <path refid="@{pathid}" />
-                        <reverse xmlns="antlib:org.apache.tools.ant.types.resources.comparators">
-                            <date />
-                        </reverse>
-                    </sort>
-                </last>
-            </path>
             <concat destfile="${updatesite.dir}/site.xml" append="true">
-                ${toString:old.feature.jar.path.id}
+                <string>${toString:@{filesetid}}
+
+</string>
                 <filterchain>
                     <!-- split file names into lines -->
                     <tokenfilter>
@@ -325,7 +259,7 @@
                     </tokenfilter>
                     <!-- match the feature jar file name and generate the "feature" entry
-->
                     <tokenfilter>
-                        <replaceregex pattern="(.*)org\.apache\.(ivy|ivyde)\.feature_(.*)\.jar"
replace="&lt;feature url=&quot;features/org.apache.\2.feature_\3.jar&quot; id=&quot;org.apache.\2.feature&quot;
version=&quot;\3&quot;&gt; &lt;category name=&quot;old&quot;/&gt;
&lt;/feature&gt;" flags="gi" />
+                        <replaceregex pattern="^([^_]*)_(.*)\.jar$$" replace="    &lt;feature
url=&quot;features/\1_\2.jar&quot; id=&quot;\1&quot; version=&quot;\2&quot;&gt;
${line.separator}        &lt;category name=&quot;@{category}&quot;/&gt;${line.separator}
   &lt;/feature&gt;" flags="gi" />
                     </tokenfilter>
                 </filterchain>
             </concat>
@@ -348,26 +282,18 @@
         </copy>
 
         <!-- get the list of exiting Ivy Eclipse features -->
-        <path id="ivy.feature.jars">
-            <fileset dir="${updatesite.dir}/features">
-                <include name="org.apache.ivy.feature_*.jar" />
-            </fileset>
-        </path>
-        <!-- generate the entry for the latest -->
-        <generate-site-latest pathid="ivy.feature.jars" />
+        <fileset id="ivy.feature.jars" dir="${updatesite.dir}/features">
+            <include name="org.apache.ivy.feature_*.jar" />
+        </fileset>
+        <!-- generate the entry for Ivy -->
+        <generate-site-entries filesetid="ivy.feature.jars" category="ivy" />
 
         <!-- get the list of exiting IvyDE Eclipse features -->
-        <path id="ivyde.feature.jars">
-            <fileset dir="${updatesite.dir}/features">
-                <include name="org.apache.ivyde.feature_*.jar" />
-            </fileset>
-        </path>
-        <!-- generate the entry for the latest -->
-        <generate-site-latest pathid="ivyde.feature.jars" />
-
-        <!-- generate the entry for the old entries -->
-        <generate-site-old pathid="ivy.feature.jars" />
-        <generate-site-old pathid="ivyde.feature.jars" />
+        <fileset id="ivyde.feature.jars" dir="${updatesite.dir}/features">
+            <include name="org.apache.ivyde.feature_*.jar" />
+        </fileset>
+        <!-- generate the entry for IvyDE -->
+        <generate-site-entries filesetid="ivyde.feature.jars" category="ivyde" />
 
         <!-- and finally the footer -->
         <concat destfile="${updatesite.dir}/site.xml" append="true">
@@ -553,7 +479,7 @@
         <echo file="local.build.properties">
 updatesite.dir=${basedir}/build
 mirrors.url=
-updatesite.url=http://hudson.zones.apache.org/hudson/view/Ant/job/IvyDE-updatesite/lastSuccessfulBuild/artifact/trunk/build
+updatesite.url=http://hudson.apache.org/hudson/view/Ant/job/IvyDE-updatesite/lastSuccessfulBuild/artifact/trunk/build
 baseLocation=${basedir}/${hudson.eclipse.name}
 </echo>
         <delete dir="${basedir}/build" />
@@ -588,7 +514,7 @@ baseLocation=${basedir}/${hudson.eclipse
     </target>
 
     <target name="hudson-find-ivyde-zip">
-        <!-- get the last sucessful version -->
+        <!-- get the last successful version -->
         <get src="${hudson.baseUrl}/view/Ant/job/IvyDE/lastSuccessfulBuild/artifact/trunk/dist/version.properties"
dest="${basedir}/ivyde-hudson-version.properties" verbose="yes" />
         <property file="${basedir}/ivyde-hudson-version.properties" />
         <!-- get the actual zip -->
@@ -596,6 +522,6 @@ baseLocation=${basedir}/${hudson.eclipse
         <property name="ivyde.zip" value="${basedir}/apache-ivyde-hudson.zip" />
     </target>
 
-    <target name="hudson-build" depends="clean,hudson-find-ivy-jar,hudson-find-ivyde-zip,install-ivy-and-ivyde,optimize,checksum"
/>
+    <target name="hudson-build" depends="clean,hudson-find-ivy-jar,hudson-find-ivyde-zip,install-ivy-and-ivyde,optimize"
/>
 
 </project>

Modified: ant/ivy/updatesite/trunk/dist/site.xml
URL: http://svn.apache.org/viewvc/ant/ivy/updatesite/trunk/dist/site.xml?rev=987452&r1=987451&r2=987452&view=diff
==============================================================================
--- ant/ivy/updatesite/trunk/dist/site.xml (original)
+++ ant/ivy/updatesite/trunk/dist/site.xml Fri Aug 20 10:33:17 2010
@@ -20,25 +20,29 @@
 <site pack200="true"
       mirrorsURL="http://ant.apache.org/ivy/ivyde/updatesite/eclipse-update--xml.cgi"
       digestURL="./">
-   <description url="http://www.apache.org/dist/ant/ivyde/updatesite">
-      Eclipse update site for Apache Ivy and Apache IvyDE.
-   </description>
+    <description url="http://www.apache.org/dist/ant/ivyde/updatesite">
+        Eclipse update site for Apache Ivy and Apache IvyDE.
+    </description>
 
-<feature id="org.apache.ivy.feature" url="features/org.apache.ivy.feature_2.2.0.cr1_20100629224905.jar"
version="2.2.0.cr1_20100629224905">
-  <category name="latest" />
-</feature>
-<feature id="org.apache.ivyde.feature" url="features/org.apache.ivyde.feature_2.1.0.201008101807-RELEASE.jar"
version="2.1.0.201008101807-RELEASE">
-  <category name="latest" />
-</feature>
+    <category-def name="ivy" label="Apache Ivy library" />
 
-<feature url="features/org.apache.ivy.feature_2.0.0.final_20090108225011.jar" id="org.apache.ivy.feature"
version="2.0.0.final_20090108225011"> <category name="old"/> </feature>
-<feature url="features/org.apache.ivy.feature_2.1.0.final_20090925235825.jar" id="org.apache.ivy.feature"
version="2.1.0.final_20090925235825"> <category name="old"/> </feature>
-            
-<feature url="features/org.apache.ivyde.feature_2.0.0.final-200907011148-RELEASE.jar"
id="org.apache.ivyde.feature" version="2.0.0.final-200907011148-RELEASE"> <category
name="old"/> </feature>
-                
-            
+    <category-def name="ivyde" label="Apache IvyDE Eclipse plugin" />
 
-   <category-def name="latest" label="Apache Ivy/IvyDE Latest Plugins"/>
+    <feature url="features/org.apache.ivy.feature_2.0.0.final_20090108225011.jar" id="org.apache.ivy.feature"
version="2.0.0.final_20090108225011"> 
+        <category name="ivy"/>
+    </feature>
+    <feature url="features/org.apache.ivy.feature_2.1.0.final_20090925235825.jar" id="org.apache.ivy.feature"
version="2.1.0.final_20090925235825"> 
+        <category name="ivy"/>
+    </feature>
+    <feature url="features/org.apache.ivy.feature_2.2.0.cr1_20100629224905.jar" id="org.apache.ivy.feature"
version="2.2.0.cr1_20100629224905"> 
+        <category name="ivy"/>
+    </feature>
+
+    <feature url="features/org.apache.ivyde.feature_2.0.0.final-200907011148-RELEASE.jar"
id="org.apache.ivyde.feature" version="2.0.0.final-200907011148-RELEASE"> 
+        <category name="ivyde"/>
+    </feature>
+    <feature url="features/org.apache.ivyde.feature_2.1.0.201008101807-RELEASE.jar" id="org.apache.ivyde.feature"
version="2.1.0.201008101807-RELEASE"> 
+        <category name="ivyde"/>
+    </feature>
 
-   <category-def name="old" label="Apache Ivy/IvyDE Older Plugins"/>
 </site>

Modified: ant/ivy/updatesite/trunk/site-footer.xml
URL: http://svn.apache.org/viewvc/ant/ivy/updatesite/trunk/site-footer.xml?rev=987452&r1=987451&r2=987452&view=diff
==============================================================================
--- ant/ivy/updatesite/trunk/site-footer.xml (original)
+++ ant/ivy/updatesite/trunk/site-footer.xml Fri Aug 20 10:33:17 2010
@@ -1,6 +1 @@
-
-
-   <category-def name="latest" label="Apache Ivy/IvyDE Latest Plugins"/>
-
-   <category-def name="old" label="Apache Ivy/IvyDE Older Plugins"/>
 </site>

Modified: ant/ivy/updatesite/trunk/site-header.xml
URL: http://svn.apache.org/viewvc/ant/ivy/updatesite/trunk/site-header.xml?rev=987452&r1=987451&r2=987452&view=diff
==============================================================================
--- ant/ivy/updatesite/trunk/site-header.xml (original)
+++ ant/ivy/updatesite/trunk/site-header.xml Fri Aug 20 10:33:17 2010
@@ -20,7 +20,11 @@
 <site pack200="@SITE_PACK200@"
       mirrorsURL="@MIRRORS_URL@"
       digestURL="./">
-   <description url="@UPDATESITE_URL@">
-      Eclipse update site for Apache Ivy and Apache IvyDE.
-   </description>
+    <description url="@UPDATESITE_URL@">
+        Eclipse update site for Apache Ivy and Apache IvyDE.
+    </description>
+
+    <category-def name="ivy" label="Apache Ivy library" />
+
+    <category-def name="ivyde" label="Apache IvyDE Eclipse plugin" />
 



Mime
View raw message