Bug 1021528 - ant does not accept targets starting by hyphen
ant does not accept targets starting by hyphen
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: ant (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Mikolaj Izdebski
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-21 09:08 EDT by Vít Ondruch
Modified: 2013-10-21 09:20 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-21 09:20:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vít Ondruch 2013-10-21 09:08:35 EDT
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
Comment 1 Vít Ondruch 2013-10-21 09:09:56 EDT
Please note that using double hyphen trick fails similarly:

$ ant -f build.xml -- -build-native-library
Unknown argument: --
Comment 2 Mikolaj Izdebski 2013-10-21 09:20:22 EDT
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

Note You need to log in before you can comment on or make changes to this bug.