asset-share-commons
asset-share-commons copied to clipboard
Build fails with profile "analysis"
The build with profile analysis fails with PMD errors on the current develop branch.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.2:check (default) on project assetshare.core: You have 5 PMD violations. ...
This is the XML report:
<?xml version="1.0" encoding="UTF-8"?>
<pmd version="5.1.2" timestamp="2022-05-30T19:55:21.030">
<file name="/Users/konradwindszus/git/adobe/asset-share-commons/core/src/main/java/com/adobe/aem/commons/assetshare/content/impl/CombinedProperties.java">
<violation beginline="90" endline="92" begincolumn="13" endcolumn="13" rule="CollapsibleIfStatements" ruleset="Basic" package="com.adobe.aem.commons.assetshare.content.impl" class="CombinedProperties" method="containsKey" externalInfoUrl="http://pmd.sourceforge.net/pmd-5.1.2/rules/java/basic.html#CollapsibleIfStatements" priority="3">
These nested if statements could be combined
</violation>
</file>
<file name="/Users/konradwindszus/git/adobe/asset-share-commons/core/src/main/java/com/adobe/aem/commons/assetshare/content/renditions/impl/dispatchers/AbstractRenditionDispatcherImpl.java">
<violation beginline="37" endline="37" begincolumn="27" endcolumn="94" rule="LoggerIsNotStaticFinal" ruleset="Java Logging" package="com.adobe.aem.commons.assetshare.content.renditions.impl.dispatchers" class="AbstractRenditionDispatcherImpl" variable="log" externalInfoUrl="http://pmd.sourceforge.net/pmd-5.1.2/rules/java/logging-java.html#LoggerIsNotStaticFinal" priority="2">
The Logger variable declaration does not contain the static and final modifiers
</violation>
</file>
<file name="/Users/konradwindszus/git/adobe/asset-share-commons/core/src/main/java/com/adobe/aem/commons/assetshare/content/renditions/impl/dispatchers/ExternalRedirectRenditionDispatcherImpl.java">
<violation beginline="67" endline="67" begincolumn="27" endcolumn="102" rule="LoggerIsNotStaticFinal" ruleset="Java Logging" package="com.adobe.aem.commons.assetshare.content.renditions.impl.dispatchers" class="ExternalRedirectRenditionDispatcherImpl" variable="log" externalInfoUrl="http://pmd.sourceforge.net/pmd-5.1.2/rules/java/logging-java.html#LoggerIsNotStaticFinal" priority="2">
The Logger variable declaration does not contain the static and final modifiers
</violation>
</file>
<file name="/Users/konradwindszus/git/adobe/asset-share-commons/core/src/main/java/com/adobe/aem/commons/assetshare/content/renditions/impl/dispatchers/InternalRedirectRenditionDispatcherImpl.java">
<violation beginline="67" endline="67" begincolumn="27" endcolumn="102" rule="LoggerIsNotStaticFinal" ruleset="Java Logging" package="com.adobe.aem.commons.assetshare.content.renditions.impl.dispatchers" class="InternalRedirectRenditionDispatcherImpl" variable="log" externalInfoUrl="http://pmd.sourceforge.net/pmd-5.1.2/rules/java/logging-java.html#LoggerIsNotStaticFinal" priority="2">
The Logger variable declaration does not contain the static and final modifiers
</violation>
</file>
<file name="/Users/konradwindszus/git/adobe/asset-share-commons/core/src/main/java/com/adobe/aem/commons/assetshare/content/renditions/impl/dispatchers/StaticRenditionDispatcherImpl.java">
<violation beginline="69" endline="69" begincolumn="27" endcolumn="92" rule="LoggerIsNotStaticFinal" ruleset="Java Logging" package="com.adobe.aem.commons.assetshare.content.renditions.impl.dispatchers" class="StaticRenditionDispatcherImpl" variable="log" externalInfoUrl="http://pmd.sourceforge.net/pmd-5.1.2/rules/java/logging-java.html#LoggerIsNotStaticFinal" priority="2">
The Logger variable declaration does not contain the static and final modifiers
</violation>
</file>
</pmd>
There is also analysisCI (https://github.com/adobe/asset-share-commons/blob/8eb97f843e78c9dc8372a5a86a2a0b6dc99bb141/pom.xml#L717) but even that one doesn't seem to be active for the GitHub Actions Build (https://github.com/adobe/asset-share-commons/blob/8eb97f843e78c9dc8372a5a86a2a0b6dc99bb141/.github/workflows/maven.yml#L35).
Please clarify which profiles are supposed to be used locally (prior to creating PRs) and enable the same profile for the CI build.