adobe / aemanalyser-maven-plugin

A Maven plugin used by developers who develop Java components for AEMaaCS (AEM as a Cloud Service) during their local Java builds to ensure that their components work correctly in when deployed to AEM as a Cloud Service.
Apache License 2.0
23 stars 20 forks source link

Artifact-rules: Incorrect warning emitted for ACS AEM Commons #285

Open kwin opened 1 month ago

kwin commented 1 month ago

With ACS AEM Commons 6.4.0 being embedded in a container content package and being checked with aemanalyser:1.6.4:project-analyse the following incorrect warning is emitted:

[INFO] Using detected SDK Version for analysis: com.adobe.aem:aem-sdk-api:2024.7.17258.20240726T172406Z-240700
..
[WARNING] [artifact-rules] com.adobe.acs:acs-aem-commons-bundle:6.4.0: Use at least version 5.0.10 for ACS AEM Commons (my-group/common-3rd-party-container:1.0.0-SNAPSHOT|adobe/consulting:acs-aem-commons-all:6.4.0)

Obviously the version comparison is done incorrectly against the used package version of ACS AEM Commons.

kwin commented 1 month ago

This is coming from an incorrect artifact-rule within aem-sdk-api (e.g. in https://repo1.maven.org/maven2/com/adobe/aem/aem-sdk-api/2024.7.17258.20240726T172406Z-240700/aem-sdk-api-2024.7.17258.20240726T172406Z-240700-aem-author-sdk.slingosgifeature)

 "artifact-rules:JSON|false":{
    "mode":"LENIENT",
    "bundle-version-rules":[
      {
        "artifact-id":"com.adobe.acs:acs-aem-commons-bundle:0",
        "message":"Use at least version 5.0.10 for ACS AEM Commons",
        "allowed-version-ranges":[
          "[5.0.10,6.0.0)"
        ]
      },

There shouldn't be an upper bound in that rule!

cziegeler commented 1 month ago

Yes, thanks for reporting - this is a known issue and will be solved with one of the next SDK API releases.

kwin commented 2 weeks ago

This is fixed now in https://repo1.maven.org/maven2/com/adobe/aem/aem-sdk-api/2024.8.17569.20240822T203847Z-240700/aem-sdk-api-2024.8.17569.20240822T203847Z-240700-aem-author-sdk.slingosgifeature. However it again has an upper bound (for no obvious reason) which will be violated soon:

"artifact-rules:JSON|false":{
    "mode":"LENIENT",
    "bundle-version-rules":[
      {
        "artifact-id":"com.adobe.acs:acs-aem-commons-bundle:0",
        "message":"Use at least version 6.0.0 for ACS AEM Commons",
        "allowed-version-ranges":[
          "[6.0.0,7.0.0)"
        ]
      },

@cziegeler Can you please remove the upper bound? 7.0.0 appears soonish...

cziegeler commented 1 week ago

@kwin Lets wait until 7 is out because I also want to update the message to drive users to update to 7