You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2008/12/18 08:55:52 UTC
svn commit: r727670 - /maven/components/branches/maven-2.1.x/build.xml
Author: brett
Date: Wed Dec 17 23:55:51 2008
New Revision: 727670
URL: http://svn.apache.org/viewvc?rev=727670&view=rev
Log:
[MNG-3757] avoid deleting M2_HOME if it is empty
Modified:
maven/components/branches/maven-2.1.x/build.xml
Modified: maven/components/branches/maven-2.1.x/build.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/build.xml?rev=727670&r1=727669&r2=727670&view=diff
==============================================================================
--- maven/components/branches/maven-2.1.x/build.xml (original)
+++ maven/components/branches/maven-2.1.x/build.xml Wed Dec 17 23:55:51 2008
@@ -52,7 +52,16 @@
<condition property="maven.home" value="${env.M2_HOME}">
<isset property="env.M2_HOME"/>
</condition>
- <fail unless="maven.home" message="You must set the M2_HOME environment variable or specify a maven.home property to this Ant script"/>
+ <fail message="You must set the M2_HOME environment variable or specify a maven.home property to this Ant script">
+ <condition>
+ <or>
+ <not>
+ <isset property="maven.home" />
+ </not>
+ <equals arg1="${maven.home}" arg2="" trim="true" />
+ </or>
+ </condition>
+ </fail>
<echo>Using Maven home at: ${maven.home}</echo>
</target>