You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2009/06/25 22:44:22 UTC
svn commit: r788503 - in /httpcomponents/httpclient/trunk:
httpclient-osgi/pom.xml pom.xml src/main/assembly/build.xml
Author: olegk
Date: Thu Jun 25 20:44:21 2009
New Revision: 788503
URL: http://svn.apache.org/viewvc?rev=788503&view=rev
Log:
Fix zip or tgz archives depending on host OS EOL setting (contributed by sebb)
Modified:
httpcomponents/httpclient/trunk/httpclient-osgi/pom.xml
httpcomponents/httpclient/trunk/pom.xml
httpcomponents/httpclient/trunk/src/main/assembly/build.xml
Modified: httpcomponents/httpclient/trunk/httpclient-osgi/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-osgi/pom.xml?rev=788503&r1=788502&r2=788503&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-osgi/pom.xml (original)
+++ httpcomponents/httpclient/trunk/httpclient-osgi/pom.xml Thu Jun 25 20:44:21 2009
@@ -88,6 +88,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
+ <version>1.4.3</version>
<extensions>true</extensions>
<configuration>
<instructions>
Modified: httpcomponents/httpclient/trunk/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/pom.xml?rev=788503&r1=788502&r2=788503&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/pom.xml (original)
+++ httpcomponents/httpclient/trunk/pom.xml Thu Jun 25 20:44:21 2009
@@ -155,25 +155,21 @@
<inherited>false</inherited>
<configuration>
<tasks>
- <ant antfile="src/main/assembly/build.xml" target="fixzip">
+ <ant antfile="src/main/assembly/build.xml">
<property name="target" value="${project.build.directory}" />
- <property name="package.zip" value="${pom.artifactId}-${pom.version}-bin.zip" />
+ <property name="package.name" value="${pom.artifactId}-${pom.version}-bin" />
</ant>
- <ant antfile="src/main/assembly/build.xml" target="fixzip">
+ <ant antfile="src/main/assembly/build.xml">
<property name="target" value="${project.build.directory}" />
- <property name="package.zip" value="${pom.artifactId}-${pom.version}-osgi-bin.zip" />
+ <property name="package.name" value="${pom.artifactId}-${pom.version}-bin-with-dependencies" />
</ant>
- <ant antfile="src/main/assembly/build.xml" target="fixzip">
+ <ant antfile="src/main/assembly/build.xml">
<property name="target" value="${project.build.directory}" />
- <property name="package.zip" value="${pom.artifactId}-${pom.version}-bin-with-dependencies.zip" />
+ <property name="package.name" value="${pom.artifactId}-${pom.version}-osgi-bin" />
</ant>
- <ant antfile="src/main/assembly/build.xml" target="fixzip">
+ <ant antfile="src/main/assembly/build.xml">
<property name="target" value="${project.build.directory}" />
- <property name="package.zip" value="${pom.artifactId}-${pom.version}-src.zip" />
- </ant>
- <ant antfile="src/main/assembly/build.xml" target="fixtar">
- <property name="target" value="${project.build.directory}" />
- <property name="package.tar" value="${pom.artifactId}-${pom.version}-bin-with-dependencies.tar.gz" />
+ <property name="package.name" value="${pom.artifactId}-${pom.version}-src" />
</ant>
</tasks>
</configuration>
Modified: httpcomponents/httpclient/trunk/src/main/assembly/build.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/src/main/assembly/build.xml?rev=788503&r1=788502&r2=788503&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/src/main/assembly/build.xml (original)
+++ httpcomponents/httpclient/trunk/src/main/assembly/build.xml Thu Jun 25 20:44:21 2009
@@ -22,23 +22,44 @@
information on the Apache Software Foundation, please see
<http://www.apache.org />.
-->
-<project name="assembly-postprocess" default="fixzip" basedir=".">
- <target name="fixzip">
+<project name="assembly-postprocess" default="fixarchives" basedir=".">
+
+ <target name="fixarchives" depends="_eolcheck,fixzip,fixtgz">
+ </target>
+
+ <target name="fixzip" unless="native.crlf">
<property name="tmp.dir" location="${target}/tmp"/>
- <property name="zip.file" location="${target}/${package.zip}"/>
+ <property name="zip.file" location="${target}/${package.name}.zip"/>
<delete dir="${tmp.dir}" />
<unzip src="${zip.file}" dest="${tmp.dir}"/>
- <fixcrlf srcdir="${tmp.dir}" eol="dos" eof="remove"
+ <fixcrlf srcdir="${tmp.dir}" eol="crlf" eof="remove" fixlast="false"
includes="**/*.txt, **/*.xml, **/*.properties, **/*.java, **/*.html, **/*.css" />
- <zip destfile="${zip.file}" basedir="${tmp.dir}" />
+ <zip destfile="${zip.file}" basedir="${tmp.dir}" duplicate="preserve" />
<delete dir="${tmp.dir}" />
</target>
- <target name="fixtar">
+
+ <target name="fixtgz" unless="native.lf">
<property name="tmp.dir" location="${target}/tmp"/>
- <property name="tar.file" location="${target}/${package.tar}"/>
- <delete dir="${tmp.dir}" />
- <untar src="${tar.file}" dest="${tmp.dir}" compression="gzip" />
- <tar destfile="${tar.file}" basedir="${tmp.dir}" compression="gzip" longfile="gnu" />
+ <property name="gz.file" location="${target}/${package.name}.tar.gz"/>
+ <property name="tar.file" location="${target}/${package.name}.tar"/>
<delete dir="${tmp.dir}" />
+ <gunzip src="${gz.file}" dest="${tar.file}"/>
+ <untar src="${tar.file}" dest="${tmp.dir}"/>
+ <fixcrlf srcdir="${tmp.dir}" eol="lf" eof="remove" fixlast="false"
+ includes="**/*.txt, **/*.xml, **/*.properties, **/*.java, **/*.html, **/*.css" />
+ <tar destfile="${tar.file}" basedir="${tmp.dir}" longfile="gnu"/>
+ <gzip src="${tar.file}" destfile="${gz.file}"/>
+ <delete file="${tar.file}"/>
+ <delete dir="${tmp.dir}"/>
</target>
+
+ <!-- Determine if the native format is CRLF or LF (or neither) -->
+ <target name="_eolcheck">
+ <condition property="native.lf">
+ <os family="unix"/>
+ </condition>
+ <condition property="native.crlf">
+ <os family="dos"/>
+ </condition>
+ </target>
</project>