In https://github.com/wcm-io/wcm-io-tooling-aem-cloud-dependencies/blob/57ca0242b624540e3a094fae6133bd3786ab6eba/pom.xml#L81 the aem-sdk-api is not referenced with scope import but compile. That limits the managed versions to the aem-sdk-api itself but not its transitive dependencies.
The transitive dependencies of https://repo1.maven.org/maven2/com/adobe/aem/aem-sdk-api/2020.8.4039.20200813T011654Z-200730/aem-sdk-api-2020.8.4039.20200813T011654Z-200730.pom don’t need to be redefined then.
related PR is: https://github.com/wcm-io/wcm-io-tooling-aem-cloud-dependencies/pull/1
thanks - however, this does not work:
import scope does only work for dependencies defined in the dependencyManagement section of the target POM - but the aem-sdk-api defines only direct dependencies
osgi.cmpn is not included in aem-sdk-api
Hi Stefan,
I tried it out with Maven 3.6.2 and with this PR I had no longer give a version for
<dependency>
<groupId>org.apache.sling</groupId><artifactId>org.apache.sling.servlets.annotations</artifactId>
</dependency>
But indeed as aem-sdk-api does not have any dependencyManagement it should not have any effect, I need to figure out what is going on in https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java;h=d895913eb6b665193da46e965f48f7fffefcde1c;hb=HEAD.
Â
Regarding
osgi.cmpn is not included in aem-sdk-api
Indeed only osgi.core is defined there.
i compared the output of "help:effective-pom" with and without your PR and the OSGi deps only got removed, but nothing added by the import. did not try it out in a real project, though.
the versions for the various OSGi and sling annotations we usually do not define in the aem-dependencies/aem-cloud-dependencies POM but within the aem-global-parent POM
https://github.com/wcm-io/wcm-io-tooling/blob/develop/maven/aem-global-parent/pom.xml
as those versions are not directly related to the underlying AEM version, but more to the versions of the related plugins defined in aem-global-parent (like bnd maven plugin plugin and it's dependencies).
closing this until there is an AEM SDK API POM with transitive dependencies
https://repo1.maven.org/maven2/com/adobe/aem/aem-sdk-api/