Author: chammers
Date: Thu Oct 22 22:28:53 2009
New Revision: 828879

URL: http://svn.apache.org/viewvc?rev=828879&view=rev
Log:
Create .zip file with identical content as the PEAR .tgz.
Too bad that the PEAR version number may not (it's validated) contain
the -SNAPSHOT so the it has to be specified separately. I could not
find out how to elegantly use sed or a regex in the pom.xml.

Modified:
    incubator/log4php/trunk/pom.xml

Modified: incubator/log4php/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/log4php/trunk/pom.xml?rev=828879&r1=828878&r2=828879&view=diff
==============================================================================
--- incubator/log4php/trunk/pom.xml (original)
+++ incubator/log4php/trunk/pom.xml Thu Oct 22 22:28:53 2009
@@ -117,6 +117,7 @@
        <properties>
                <surefire.reports>target/surefire-reports</surefire.reports>
                <coverage.report>target/site/coverage-report</coverage.report>
+               <pear.version>2.0</pear.version>
        </properties>
 
        <build>
@@ -190,6 +191,14 @@
                                 <exec executable="pear" dir="target/pear">
                                     <arg line="package"/>
                                 </exec>
+                                <!-- Create zip archive with identical 
contents as the .tgz -->
+                                <!-- The version number of the pear package 
does never contain -SNAPSHOT. -->
+                                <untar dest="target/zip">
+                                    <gzipresource>
+                                        <file 
file="target/pear/log4php-${pear.version}.tgz"/>
+                                    </gzipresource>
+                                </untar>
+                                <zip 
destfile="target/pear/log4php-${pear.version}.zip" basedir="target/zip/" />
                             </tasks>
                         </configuration>
                     </execution>


Reply via email to