Author: jalkanen
Date: Sat May 23 20:44:03 2009
New Revision: 778018
URL: http://svn.apache.org/viewvc?rev=778018&view=rev
Log:
Improved build.xml to create better source zip files which unzip nicely
according to Apache conventions (jspwiki-<version>/... instead of just ...)
Modified:
incubator/jspwiki/trunk/build.xml
Modified: incubator/jspwiki/trunk/build.xml
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/build.xml?rev=778018&r1=778017&r2=778018&view=diff
==============================================================================
--- incubator/jspwiki/trunk/build.xml (original)
+++ incubator/jspwiki/trunk/build.xml Sat May 23 20:44:03 2009
@@ -574,9 +574,29 @@
<arg line="export ${svn.repository}/${svn.tag}
"${install.src}""/>
</exec>
- <zip zipfile="${release.dir}/${ant.project.name}-src.zip">
- <zipfileset dir="${install.src}" />
- </zip>
+ <!-- Figure out JSPWiki version -->
+
+ <javac srcdir="${install.src}" destdir="${code.build}"
includes="org/apache/wiki/Release"/>
+
+ <java classpath="${code.build}"
+ classname="org.apache.wiki.Release"
+ outputproperty="jspwiki.version"/>
+
+ <property name="tmpzipdir"
value="${tmpdir}/${ant.project.name}-${jspwiki.version}" />
+
+ <delete dir="${tmpzipdir}"/>
+ <mkdir dir="${tmpzipdir}"/>
+
+ <move todir="${tmpzipdir}">
+ <fileset dir="${install.src}">
+ <include name="**"/>
+ <!-- Any excluded files should go here -->
+ </fileset>
+ </move>
+
+ <zip zipfile="${release.dir}/${ant.project.name}-src.zip"
+ basedir="${tmpdir}"
+ includes="${ant.project.name}-${jspwiki.version}/**"/>
</target>