Claudenw commented on PR #755:
URL: https://github.com/apache/creadur-rat/pull/755#issuecomment-6423302449

   @ottlinger I think the solution is in the wrong place, but I may be 
convinced otherwise.
   
   @arturobernalg `excludeSubProjects` is a Maven only option, and this is the 
root of my quandary.
   
   RAT is a CLI first implementation.  So all general implementations start in 
the RAT CLI code.  The RAT CLI configurations are supposed to drive the other 
UI (Ant, Maven, and eventually Gradle).
   
   The UI should not allow multiple configuration options from the same Arg 
group.  That is how we do deprecation. 
   
   The issue is that the Maven UI does not determine if the current or 
deprecated Arg group option was used.  It should do that and add the modules to 
the correct one.  
   
   This means that the addition of the `exccludeSubProjects` files to the 
exclude list must be done later than it is.  Currently this is in the 
AbstractRatMojo at line 441, however that all changes in #749 .
   
   However, I see the point of your change in that if any UI ends up using 2 or 
more Arg group options the correct processing is completed.
   
   We do have on Arg group that has 2 deprecated options, however it has only 
one argument.
   
   ```
   OUTPUT_STYLE(new OptionGroup()
               
.addOption(Option.builder().longOpt("output-style").hasArg().argName("StyleSheet")
                       .desc("XSLT stylesheet to use when creating the report. "
                               + "Either an external xsl file may be specified 
or one of the internal named sheets.")
                       .build())
               
.addOption(Option.builder("s").longOpt("stylesheet").hasArg().argName("StyleSheet")
                       
.deprecated(DeprecatedAttributes.builder().setSince("0.17").setForRemoval(true).setDescription(StdMsgs.useMsg("--output-style")).get())
                       .desc("XSLT stylesheet to use when creating the report.")
                       .build())
               .addOption(Option.builder("x").longOpt("xml")
                       .deprecated(DeprecatedAttributes.builder()
                               .setSince("0.17")
                               .setForRemoval(true)
                               .setDescription(StdMsgs.useMsg("--output-style 
with the 'xml' argument")).get())
                       .desc("forces XML output rather than the textual 
report.")
                       .build()),
       ```
   
   Would you write a test that shows that if there is an Arg group that accepts 
multiple arguments and has 2 deprecated options that your solution still holds?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to