[MNG-3757] avoid deleting M2_HOME if it is empty

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@727671 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2008-12-18 07:59:58 +00:00
parent e0cdbdc475
commit 385888d545
1 changed files with 10 additions and 1 deletions

View File

@ -44,7 +44,16 @@ END SNIPPET: ant-bootstrap -->
<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>
</target>
<target name="init" depends="isMavenHomeSet">