adobe / aem-project-archetype

Maven template to create best-practice websites on AEM.
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/overview.html
Apache License 2.0
547 stars 423 forks source link

[IDEA] Update aem-api dependency to use latest available version #553

Open davidjgonzalez opened 3 years ago

davidjgonzalez commented 3 years ago

This is more of an idea discussion thread, that could be turned into an enhancement if it makes sense.

It might be nice to provide a way in the maven archetype to:

The logic being, Cloud Manager builds the project using the aem-api dependency version specified in the project, but this version does not (and in fact, rarely) matches the version of AEM being deployed to - especially on auto-updating AEM envs.

Pinning a version (as we do today) could be useful for those that want to deploy to a fixed Sandbox or non-production env (that they let sit on an old version, which again, is not ideal).

Understandably, there may be some trepidation about constantly and unknowingly changing the dependency version you're building/testing against, but Adobe promises the aem-api is backward compatibility, so IIUC this is should never be problematic (and break a build/behavior).

kwin commented 3 years ago

The problem is the local or non Cloud environments, because compiling against a newer AEM API changes the compatible version ranges, i.e. in general the generated bundles do no longer resolve on older environments. IMHO compiling against a newer API is a) in general not necessary because bundles compiled against the old version will still resolve (as because as you said the new versions are supposed to be backwards compatible) b) only necessary in case you want to rely on a feature introduced with the new version. That should be a deliberate decision and is fine to require a manual dependency update IMHO

kwin commented 3 years ago

To clarify: The problem is the standard import version range being generated by Bnd (https://bnd.bndtools.org/chapters/170-versioning.html#import-version-policy)