title: How to build an ant target from DOS command-line when target starts with a '-' as in -ivy-info
body: <p>While troubleshooting a problem with <a href="http://ant.apache.org/ivy/" rel="nofollow">apache-ivy</a>, I want to call an <a href="http://ant.apache.org/" rel="nofollow">ant</a> target named <strong><em>-ivy-info</em></strong> defined in my build.xml.  My -ivy-info target calls the <a href="http://ant.apache.org/ivy/history/latest-milestone/use/info.html" rel="nofollow">ivy:info</a> task and the <a href="http://ant.apache.org/ivy/history/latest-milestone/use/buildnumber.html" rel="nofollow">ivy:buildnumber</a> task and calculates the next revision number.</p>
  
  <p>Problem is the ant command-line interprets the -ivy-info as a command-line option then fails with: <code>Unknown argument: -ivy-info</code></p>
  
  <p>One workaround I have found is to change the default target to -ivy-info via the first line of build.xml: <code>&lt;project name="my.project" default="-ivy-info"&gt;</code> and then run ant with no arguments, which works fine.</p>
  
  <p>Other options are to rename the -ivy-info target so it does not start with a '-' character, or to create a new empty target with a name not starting with '-' and that includes -ivy-info as a dependency.</p>
  
  <p>However I still want to know if there is any way that <strong>doesn't involve first editing build files</strong>?</p>