ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1180895 - in /ant/ivy/ivyde/trunk: build.xml builder/ASL2-header.xml builder/component/build.properties
Date Mon, 10 Oct 2011 12:00:27 GMT
Author: hibou
Date: Mon Oct 10 12:00:27 2011
New Revision: 1180895

URL: http://svn.apache.org/viewvc?rev=1180895&view=rev
Log:
Make the zip distrib of the binaries of IvyDE a p2 repository

Added:
    ant/ivy/ivyde/trunk/builder/ASL2-header.xml   (with props)
Modified:
    ant/ivy/ivyde/trunk/build.xml
    ant/ivy/ivyde/trunk/builder/component/build.properties

Modified: ant/ivy/ivyde/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/build.xml?rev=1180895&r1=1180894&r2=1180895&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/build.xml (original)
+++ ant/ivy/ivyde/trunk/build.xml Mon Oct 10 12:00:27 2011
@@ -173,7 +173,7 @@
         </copy>
     </target>
 
-    <target name="generate-dist-doc-html">
+    <target name="generate-dist-doc-html" unless="skip.doc">
         <taskdef uri="antlib:xooki" file="${basedir}/doc/xooki/antlib.xml" />
         <property name="checkUpToDate" value="true" />
         <mkdir dir="${dist.work.dir}/apache-ivyde-${build.version}/doc" />
@@ -186,10 +186,14 @@
         </xooki:generate>
     </target>
 
-    <target name="package-binaries" depends="build,generate-dist-doc-files,generate-dist-doc-html">
+    <target name="package-binaries" depends="build,generate-p2-category,generate-dist-doc-files,generate-dist-doc-html">
         <mkdir dir="${dist.work.dir}/apache-ivyde-${build.version}" />
         <unzip src="${eclipse.work.dir}/${build.version}/org.apache.ivyde.feature-${build.version}.zip"
dest="${dist.work.dir}/apache-ivyde-${build.version}" />
         <unzip src="${eclipse.work.dir}/${build.version}/org.apache.ivyde.eclipse.resolvevisualizer.feature-${build.version}.zip"
dest="${dist.work.dir}/apache-ivyde-${build.version}" />
+        <!-- packaging the zip as a p2 repository -->
+        <copy todir="${dist.work.dir}/apache-ivyde-${build.version}">
+            <fileset dir="${eclipse.work.dir}/p2repo" />
+        </copy>
         <copy todir="${dist.work.dir}/apache-ivyde-${build.version}">
             <fileset dir="${basedir}">
                 <include name="LICENSE" />
@@ -230,6 +234,35 @@ ivyde.build.version=${build.version}
         <tar destfile="${dist.dir}/apache-ivyde-sources-${build.version}.tar.gz" basedir="${work.dir}/sources"
compression="gzip" />
     </target>
 
+    <target name="generate-p2-category" depends="compute-version,eclipse-classpath">
+        <loadfile property="ASL2-header" srcFile="${basedir}/builder/ASL2-header.xml"/>
+        <echo file="${work.dir}/category.xml"><![CDATA[<?xml version='1.0' encoding='UTF-8'?>
+<site>
+    <category-def name="org.apache.ivyde.category" label="Apache IvyDE Eclipse plugins"
/>
+    <feature url="features/org.apache.ivyde.feature_${build.version}.jar" id="org.apache.ivyde.feature"
version="${build.version}">
+        <category name="org.apache.ivyde.category"/>
+    </feature>
+    <feature url="features/org.apache.ivyde.eclipse.resolvevisualizer.feature_${build.version}.jar"
id="org.apache.ivyde.eclipse.resolvevisualizer.feature" version="${build.version}">
+        <category name="org.apache.ivyde.category"/>
+    </feature>
+</site>
+]]></echo>
+        <makeurl file="${eclipse.work.dir}/p2repo" property="p2repo.eclipse.work.dir.url"/>
+        <makeurl file="${work.dir}/category.xml" property="p2repo.category.url"/>
+        <java classpath="${eclipse.classpath}" classname="org.eclipse.core.launcher.Main"
fork="true" failonerror="true">
+            <arg line="-clean" />
+            <arg line="-application org.eclipse.equinox.p2.publisher.CategoryPublisher"
/>
+            <arg line="-metadataRepository ${p2repo.eclipse.work.dir.url}" />
+            <arg line="-categoryDefinition ${p2repo.category.url}" />
+            <arg line="-categoryQualifier" />
+            <sysproperty key="eclipse.consoleLog" value="${eclipse.consoleLog}" />
+        </java>
+        <!-- as we're at it, let's put the ASL header -->
+        <replaceregexp match="&lt;repository name='" replace="${ASL2-header}&lt;repository
name='" flags="g">
+            <fileset dir="${eclipse.work.dir}/p2repo" includes="*.xml" />
+        </replaceregexp>
+    </target>
+
     <!-- 
         ======================================================================================
         Targets related to the installation of Ivy in the Eclipse install
@@ -536,7 +569,7 @@ forceContextQualifier=${hudson.version.q
         <delete dir="${eclipse-doc.dir}" />
     </target>
 
-    <target name="generate-eclipse-doc-html">
+    <target name="generate-eclipse-doc-html" unless="skip.doc">
         <taskdef uri="antlib:xooki" file="${basedir}/doc/xooki/antlib.xml" />
         <copy todir="${doc-eclipse.work.dir}">
             <fileset dir="${src.doc.dir}" />

Added: ant/ivy/ivyde/trunk/builder/ASL2-header.xml
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/builder/ASL2-header.xml?rev=1180895&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/builder/ASL2-header.xml (added)
+++ ant/ivy/ivyde/trunk/builder/ASL2-header.xml Mon Oct 10 12:00:27 2011
@@ -0,0 +1,18 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->

Propchange: ant/ivy/ivyde/trunk/builder/ASL2-header.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/ivyde/trunk/builder/ASL2-header.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/ivyde/trunk/builder/ASL2-header.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ant/ivy/ivyde/trunk/builder/component/build.properties
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/builder/component/build.properties?rev=1180895&r1=1180894&r2=1180895&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/builder/component/build.properties (original)
+++ ant/ivy/ivyde/trunk/builder/component/build.properties Mon Oct 10 12:00:27 2011
@@ -25,8 +25,8 @@
 #skipDirector=true
 
 generate.p2.metadata=true
-p2.metadata.repo=file:${buildDirectory}/repository
-p2.artifact.repo=file:${buildDirectory}/repository
+p2.metadata.repo=file:${buildDirectory}/p2repo
+p2.artifact.repo=file:${buildDirectory}/p2repo
 p2.metadata.repo.name=Apache IvyDE P2 Eclipse repository
 p2.artifact.repo.name=Apache IvyDE P2 Eclipse repository
 p2.publish.artifacts=false



Mime
View raw message