Description of problem: I am trying to build target starting by hyphen by ant, but it fails unfortunately: $ ant '-build-native-library' Unknown argument: -build-native-library Version-Release number of selected component (if applicable): $ rpm -q ant ant-1.9.2-7.fc21.noarch How reproducible: Always Steps to Reproduce: 1. ant '-build-native-library' 2. 3. Actual results: $ ant '-build-native-library' Unknown argument: -build-native-library Expected results: $ ant '-build-native-library' ... building the target Additional info: I might be mistaken, but it should work according to: http://stackoverflow.com/questions/4256958/command-line-to-run-the-ant-task-with-hyphen-in-the-task-name
Please note that using double hyphen trick fails similarly: $ ant -f build.xml -- -build-native-library Unknown argument: --
Targets beginning with a hyphen such as "-restart" are valid, and can be used to name targets that should not be called directly from the command line. See upstream documentation: http://ant.apache.org/manual/targets.html