# HG changeset patch # User Gilles Duboscq # Date 1398352524 -7200 # Node ID b3cd96f137a683152ed517919d82c31654c65fbb # Parent 1b82cd9e72e990856172abf882238ca55525c654 mx build: make --error-prone, --jdt and --force-javac mutually exclusive diff -r 1b82cd9e72e9 -r b3cd96f137a6 mxtool/mx.py --- a/mxtool/mx.py Thu Apr 24 17:06:23 2014 +0200 +++ b/mxtool/mx.py Thu Apr 24 17:15:24 2014 +0200 @@ -1800,11 +1800,13 @@ parser.add_argument('--only', action='store', help='comma separated projects to build, without checking their dependencies (omit to build all projects)') parser.add_argument('--no-java', action='store_false', dest='java', help='do not build Java projects') parser.add_argument('--no-native', action='store_false', dest='native', help='do not build native projects') - parser.add_argument('--force-javac', action='store_true', dest='javac', help='use javac despite ecj.jar is found or not') - parser.add_argument('--jdt', help='path to ecj.jar, the Eclipse batch compiler (default: ' + defaultEcjPath + ')', default=defaultEcjPath, metavar='') parser.add_argument('--jdt-warning-as-error', action='store_true', help='convert all Eclipse batch compiler warnings to errors') parser.add_argument('--jdt-show-task-tags', action='store_true', help='show task tags as Eclipse batch compiler warnings') - parser.add_argument('--error-prone', dest='error_prone', help='path to error-prone.jar', metavar='') + compilerSelect = parser.add_mutually_exclusive_group() + compilerSelect.add_argument('--error-prone', dest='error_prone', help='path to error-prone.jar', metavar='') + compilerSelect.add_argument('--jdt', help='path to ecj.jar, the Eclipse batch compiler (default: ' + defaultEcjPath + ')', default=defaultEcjPath, metavar='') + compilerSelect.add_argument('--force-javac', action='store_true', dest='javac', help='use javac despite ecj.jar is found or not') + if suppliedParser: parser.add_argument('remainder', nargs=REMAINDER, metavar='...')