[
https://issues.apache.org/jira/browse/RAT-450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17896862#comment-17896862
]
Claude Warren commented on RAT-450:
-----------------------------------
The deprecation is coming from 2 sources.
h1. Arguments based on command line options.
These are easy to detect as the names are simply the kebab case values we see
in the "Arg" class converted to camel case with a lower case first letter (XML
camel case); additionally if the "Option" accepts multiple arguments an "s" is
added to the XML name. These are the correctly formatted messages like the one
for "excludes" (--exclude).
The Maven system picks up the deprecation warning from the "@deprecated" tag on
the method as found in the generated file
"creadur-rat/apache-rat-plugin/target/generated/src/main/java/org/apache/rat/plugin/BaseRatMojo.java".
These annotations are generated by the "getDeprecated" method in
creadur-rat/apache-rat-tools/src/main/java/org/apache/rat/tools/AbstractOption.java
from the "Option" as defined in "Arg" with replacement of the "--long-arg"
form with the specific UI form for the arguments mentioned.
h1. Arguments not based on command line options
These are legacy Maven options like "addDefaultLicenseMatchers". They are
defined in the Mojo classes in
"creadur-rat/apache-rat-plugin/src/main/java/org/apache/rat/mp/" (e.g.
RatCheckMojo.java) through the use of the Maven @property annotation. The
Maven system picks up the deprecation messages from the "@deprecated" tag on
the method or variable definitions in the source. These messages have to be
crafted by hand and do not have access to additional information. Keep in mind
that the methods in the Mojo are all prefixed by "set" so "setReportFile"
becomes "reportFile" in the XML format. Also, for properties that have
multiple values the XML name has an "s" appended. For example
"setAddAdditionalLicenseHeaders" is the method for the
"additionalLicenseHeaders" XML element that will contain multiple
"additionalLicenseHeader" child elements.
As an example in the AbstractMojo.java we find "setUseIdeaDefaultExclude" the
deprecated tag for it reads: "@deprecated when set to true specifies that the
MAVEN patterns are excluded Use "inputIncludeStd MAVEN" to override."
So it appears that the "useIdeDefaultExclude" has been corrected.
> Bug: Deprecation warning does not contain dots at the end of sentences
> ----------------------------------------------------------------------
>
> Key: RAT-450
> URL: https://issues.apache.org/jira/browse/RAT-450
> Project: Apache Rat
> Issue Type: Sub-task
> Reporter: Philipp Ottlinger
> Priority: Major
>
> While enabling the current SNAPSHOT on a project that used v0.16.1 I realized
> that the format of the error message could be more user-friendly.
> ## Shown behaviour
> [WARNING] Parameter 'addDefaultLicenseMatchers' (user property
> 'rat.addDefaultLicenseMatchers') is deprecated: use <config>
> [WARNING] Parameter 'excludes' is deprecated: Deprecated for removal since
> 0.17: Use <inputExclude> instead.
> [WARNING] Parameter 'useDefaultExcludes' (user property
> 'rat.useDefaultExcludes') is deprecated: when set to true specifies that the
> STANDARD_PATTERNS are excluded, as are the STANDARD_SCMS patterns. Use the
> various InputExclude and InputInclude elements to explicitly specify what to
> include or exclude.
> [WARNING] Parameter 'useEclipseDefaultExcludes' (user property
> 'rat.useEclipseDefaultExcludes') is deprecated: when set to true specifies
> that the ECLIPSE patterns are excluded Use "inputIncludeStd ECLIPSE" to
> override.
> [WARNING] Parameter 'useIdeaDefaultExcludes' (user property
> 'rat.useIdeaDefaultExcludes') is deprecated: when set to true specifies that
> the IDEA patterns are excluded Use "inputIncludeStd IDEA" to override.
> [WARNING] Parameter 'useMavenDefaultExcludes' (user property
> 'rat.useMavenDefaultExcludes') is deprecated: when set to true specifies that
> the MAVEN patterns are excluded Use "inputIncludeStd MAVEN" to override.
> ## Expected behaviour
> [WARNING] Parameter 'useMavenDefaultExcludes' (user property
> 'rat.useMavenDefaultExcludes') is deprecated: when set to true specifies that
> the MAVEN patterns are excluded. Use "inputIncludeStd MAVEN" to override.
> This seems to work fine Options as is printed:
> [WARNING] Option [-e, --exclude] used. Deprecated for removal since 0.17: Use
> --input-exclude instead.
> WDYT? [[email protected]]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)