incubator-rat-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r949963 - /incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java
Date Tue, 01 Jun 2010 08:21:04 GMT
Author: bodewig
Date: Tue Jun  1 08:21:03 2010
New Revision: 949963

URL: http://svn.apache.org/viewvc?rev=949963&view=rev
Log:
-x and -s are mutually exclusive.  RAT-75

Modified:
    incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java

Modified: incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java?rev=949963&r1=949962&r2=949963&view=diff
==============================================================================
--- incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java (original)
+++ incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/Report.java Tue
Jun  1 08:21:03 2010
@@ -42,6 +42,7 @@ import org.apache.commons.cli.CommandLin
 import org.apache.commons.cli.HelpFormatter;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.OptionGroup;
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
 import org.apache.commons.cli.PosixParser;
@@ -160,13 +161,6 @@ public class Report {
         "The copyright message to use in the licence headers, usually in the form of \"Copyright
2008 Foo\"");
         opts.addOption(copyright);
 
-        Option xml = new Option(
-                "x",
-                "xml",
-                false,
-        "Output the report in XML format");
-        opts.addOption(xml);
-
         final Option exclude = OptionBuilder
                             .withArgName("expression")
                             .withLongOpt("exclude")
@@ -184,12 +178,23 @@ public class Report {
         "Used to indicate source when using --exclude");
         opts.addOption(dir);
 
+        OptionGroup outputType = new OptionGroup();
+
+        Option xml = new Option(
+                "x",
+                "xml",
+                false,
+                "Output the report in raw XML format.  Not compatible with -s");
+        outputType.addOption(xml);
+
         Option xslt = new Option(String.valueOf(STYLESHEET_CLI),
                                  "stylesheet",
                                  true,
                                  "XSLT stylesheet to use when creating the"
-                                 + " report");
-        opts.addOption(xslt);
+                                 + " report.  Not compatible with -x");
+        outputType.addOption(xslt);
+        opts.addOptionGroup(outputType);
+
         return opts;
     }
 



Mime
View raw message