You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2021/10/21 12:01:00 UTC
[jira] [Created] (JCRVLT-566) "validatorSettings" does no longer
detect lowercase values for "defaultSeverity"
Konrad Windszus created JCRVLT-566:
--------------------------------------
Summary: "validatorSettings" does no longer detect lowercase values for "defaultSeverity"
Key: JCRVLT-566
URL: https://issues.apache.org/jira/browse/JCRVLT-566
Project: Jackrabbit FileVault
Issue Type: Bug
Components: package maven plugin
Affects Versions: package-maven-plugin-1.2.2
Reporter: Konrad Windszus
Assignee: Konrad Windszus
Fix For: package-maven-plugin-1.2.4
When using a configuration like
{code}
<configuration>
<validatorSettings>
<netcentric-aem-classification>
<defaultSeverity>warn</defaultSeverity>
<options>
<!-- references the classification.map from the ThreadContextClassLoader, might contain multiple maps (comma-separated) -->
<maps>tccl:biz/netcentric/filevault/validator/maps/aem-classification-map-deprecations/coral2deprecations.map,tccl:biz/netcentric/filevault/validator/maps/aem-classification-map-deprecations/graniteuideprecations.map,tccl:biz/netcentric/filevault/validator/maps/aem-classification-map-repo-annotations.map</maps>
</options>
</netcentric-aem-classification>
</validatorsSettings>
</configuration>
{code}
You see the following in the Maven log
{code}
[WARNING] Map in class org.apache.jackrabbit.filevault.maven.packaging.ValidatePackageMojo declares value type as: class org.apache.jackrabbit.filevault.maven.packaging.ValidatorSettings but saw: null at runtime
{code}
This is due to the fact that the complex object ValidatorSettings can not be injected, as the wrong setter method for {{defaultSeverity}} is called, i.e. https://github.com/apache/jackrabbit-filevault-package-maven-plugin/blob/36aeeb9ba39dbc1c683bad659fd0d1d9983dcd54/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/ValidatorSettings.java#L61 instead of https://github.com/apache/jackrabbit-filevault-package-maven-plugin/blob/36aeeb9ba39dbc1c683bad659fd0d1d9983dcd54/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/ValidatorSettings.java#L54.
Maven unfortunately does not emit any error due to the failed exception but just creates a null entry in the validatorSettings collection.
Workaround is to use uppercase String for "defaultSeverity" like {{DEBUG}},{{INFO}},{{WARN}} and {{ERROR}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)