[ 
https://issues.apache.org/jira/browse/RAT-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17806626#comment-17806626
 ] 

Maxim Solodovnik commented on RAT-346:
--------------------------------------

[~pottlinger] I would say no warning is displayed :(((

my config:

{code}
<licenses>
        <license>
                <family>MIT</family>
                <any>
                        <text>licensed under the MIT</text>
                        <text>Licensed MIT</text>
                </any>
        </license>
        <license>
                <family>OM_CC_BY_4</family>
                <any>
                        <text>CC BY 4.0 License</text>
                </any>
        </license>
</licenses>
<families>
        <family>
                <id>MIT</id>
                <name>MIT</name>
        </family>
        <family>
                <id>OM_CC_BY_4</id>
                <name>CC BY 4.0</name>
        </family>
</families>
{code}


Filtered output of {{mvn clean apache-rat:0.16.1-SNAPSHOT:check}}

{code}
[INFO] --- apache-rat:0.16.1-SNAPSHOT:check (default-cli) @ openmeetings-web ---
[WARNING] Parameter 'licenses' is deprecated: No reason given
[INFO] Rat check: Summary over all files. Unapproved: 5, unknown: 5, generated: 
63, approved: 596 licenses.
[WARNING] Files with unapproved licenses:
  src/main/front/src/css/_cssemoticons.scss
  src/main/front/src/chat/cssemoticons.js
  src/main/webapp/css/theme_om/jquery-ui.css
  src/main/webapp/css/theme_om/jquery-ui.min.css
  src/main/webapp/css/images/audio.svg

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
{code}


> WARN in case user defined License family has the same name as existing one
> --------------------------------------------------------------------------
>
>                 Key: RAT-346
>                 URL: https://issues.apache.org/jira/browse/RAT-346
>             Project: Apache Rat
>          Issue Type: Improvement
>          Components: scan
>    Affects Versions: 0.16
>            Reporter: Claude Warren
>            Assignee: Claude Warren
>            Priority: Major
>             Fix For: 0.16.1
>
>
> Could you please raise WARN in case user defined License family has the same 
> name as internal one?
> It seems user defined one is `just ignored` in such caseĀ :(
> h2. Architecture remark
> I removed the API module because it consisted of a) class files that were not 
> being used in the code but that were misleading in name; and more importantly 
> b) because there were a number of test cases that would have been converted 
> to Junit5 only to be removed again later.
> The harmonization is not necessarily the use of a single API module but 
> rather that the options in each of the UIs should be similarly constructed 
> (same basic phrasing) not have 2 UIs where one says 
> "--enable-default-licenses" (default off) and the other says 
> "--disable-default-licenses" (default on). Also there are options that have 
> been added to one UI that are general in nature (i.e. not part of managing 
> the specific platform the UI is on) and are not available in the other UIs.
> I will remove the commented out code. I should have before I submitted this 
> pull request, but skipped it in favor of getting this code change infront of 
> more eyes quickly.
> I also have to make a pass to update javadocs.
> @jbonofre Most of the changes in this request are the migration to Junit 5. 
> The significant changes are the creation of the classes in the o.a.r..utils 
> directory, the addition of methods to set the associated properties in 
> ReportConfiguration along with the tests for those classes and changes.
> The request was to warn on duplication so the solution submitted does the 
> following:
>     Creates a ReportingSet class that is a SortedSet implementation (wrapping 
> and delegating to a SortedSet). it intercepts the calls to add and addAll to 
> determine if the new elements are already in the set and take an action.
>   * If logging is enabled (not set to None on the very thing logging wrapper 
> Log) write a message about the collision to the log at the specific level.
>   * If the internal action (ReportingSet.Option) is set to IGNORE the change 
> is ignored, OVERWRITE the old entry is replaced, FAIL an exception is thrown.
> Finally the ReportingSet has an instance variable called duplicateFmt that is 
> a Function<T,String> that produces the information to display in the message.
> The change to ReportConfiguration are to use ReportingSet to contain the 
> Licenses and LicenseFamilies, and supporting methods to configure (as noted 
> above).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to