title: Windows batch - why is the if not processed?
body: <p>I made a .bat file that should call Maven task and then copy newly created ear file. I don't know why the file is neither copied, nor the "file doesn't exist" message occurs. If I comment out the "mvn clean install" row, the copying is processed.</p>
  
  <pre><code>cd d:\test\
  mvn clean install
  
  if exist d:\test.war (
      echo "copying"
      copy d:\test.war D:\Development\liferay-portal-6.2-ce-ga3\deploy\
  ) else (
      echo "file doesn't exist"
  )
  </code></pre>
  
  <p>Note: I know this functionality can be done by Maven plugin.</p>