Reference aem-sdk-api with scope "import"

Description

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.

Activity

Show:
Konrad Windszus
August 17, 2020, 5:25 PM
Stefan Seifert
August 19, 2020, 8:04 AM

related PR is: https://github.com/wcm-io/wcm-io-tooling-aem-cloud-dependencies/pull/1

thanks - however, this does not work:

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

  2. osgi.cmpn is not included in aem-sdk-api

Konrad Windszus
August 19, 2020, 8:28 AM

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.

Stefan Seifert
August 19, 2020, 8:34 AM

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

Stefan Seifert
October 8, 2020, 10:03 AM

closing this until there is an AEM SDK API POM with transitive dependencies
https://repo1.maven.org/maven2/com/adobe/aem/aem-sdk-api/

Incomplete

Assignee

Unassigned

Reporter

Konrad Windszus

Labels

None

Components

Priority

Major
Configure