aem-project-archetype icon indicating copy to clipboard operation
aem-project-archetype copied to clipboard

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

Open davidjgonzalez opened this issue 3 years ago • 2 comments

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:

  • Build using the latest aem-api dependency, using an open-ended version range like [2020,)

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).

davidjgonzalez avatar Nov 13 '20 14:11 davidjgonzalez

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 avatar Dec 18 '20 15:12 kwin

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)

kwin avatar Dec 18 '20 15:12 kwin