Reputation: 604
Is there any possibility to make an option conditionally required in Apache commons CLI? E.g. I have two options -c and -d. Option -c can only take a value from a predefined list ('value one', 'value two'). Is there any way to make the option -d required only if -c parameter is set to 'value one', but keep it optional if -c is set to 'value two'?
Upvotes: 4
Views: 677
Reputation: 604
Looks like it is not supported in the current version (1.4). Should implement this kind of restriction in my own code.
Upvotes: 1