Permalink
Browse files

Fixed snapshot naming issue if BUILD_NUMBER set to "".

ant conditions just check if the property isset or not.
there is no easy way to unset a property in general added
an additional check for empty strings in $BUILD_NUMBER to set
the snapshot name for ant snapshot target.
  • Loading branch information...
1 parent 669001f commit a49144ef909c5545aea72d48d60a8d6f61d4d8ab @bbansal bbansal committed Jun 26, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 build.xml
View
8 build.xml
@@ -18,9 +18,15 @@
<!-- set the build number based on environment variable, otherwise blank -->
<property environment="env" description="System environment variables (including those set by Hudson)"/>
<condition property="curr.release.snapshot" value="${curr.release.base}-snapshot-${env.BUILD_NUMBER}" else="${curr.release.base}">
- <isset property="env.BUILD_NUMBER" />
+ <and>
+ <isset property="env.BUILD_NUMBER" />
+ <not>
+ <equals arg1="" arg2="${env.BUILD_NUMBER}" trim="yes"/>
+ </not>
+ </and>
</condition>
+
<path id="contrib-classpath">
<fileset dir="${dist.dir}">
<include name="${name}-${curr.release}.jar" />

0 comments on commit a49144e

Please sign in to comment.