Error added third party dependency | Community
Skip to main content
March 12, 2024

Error added third party dependency

  • March 12, 2024
  • 3 replies
  • 1527 views

[ERROR] [api-regions-exportsimports] com.adobe.aem.guides:aem-guides-wknd.core:3.0.0: Bundle aem-guides-wknd.core:3.0
.0 is importing package(s) [com.twilio.type, com.twilio, com.twilio.rest.api.v2010.account, com.twilio.base] in start
level 20 but no bundle is exporting these for that start level. (com.adobe.aem.guides:aem-guides-wknd.all:3.0.0)

 

I have created a sub-module common-core:- 

common-core/pom.xml

<parent>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd</artifactId>
<version>3.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wetraining.common-core</artifactId>
<packaging>bundle</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>*;resolution:=optional</Import-Package>
<Export-Package>
com.twilio.sdk.*,
com.twilio.type.*,
com.twilio.*,
com.twilio.rest.api.v2010.account.*,
com.twilio.base.*
</Export-Package>
<Embed-Dependency>*</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>sling-maven-plugin</artifactId>
</plugin>
</plugins>
</build>


<dependencies>
<dependency>
<groupId>com.twilio.sdk</groupId>
<artifactId>twilio</artifactId>
<version>10.1.0</version>
</dependency>

</dependencies>

core/ pom.xml

<dependency>
<groupId>com.twilio.sdk</groupId>
<artifactId>twilio</artifactId>
<version>10.1.0</version>
</dependency>

ui.apps/ pom.xml

<dependency>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>wetraining.common-core</artifactId>
<version>${project.version}</version>
</dependency>

all/ pom.xml

<dependency>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>wetraining.common-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<embedded>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>wetraining.common-core</artifactId>
<type>jar</type>
<target>/apps/wknd-vendor-packages/application/install</target>
</embedded>

 

 I have added all these pom.xml files but the same issue occurred. Could you please help?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

March 12, 2024

Hi @vishal_s01 

 

Can you add embed-dependency, similar to this?

<Embed-Dependency> org.everit.json.schema, jackson-core, jackson-annotations, jackson-databind, handlebars, snakeyaml, httpclient-osgi, org.apache.servicemix.bundles.solr-solrj, org.apache.servicemix.bundles.zookeeper, org.apache.sling.query </Embed-Dependency>
March 12, 2024

Hi @mahesh_gunaje 

I have checked the above solution but again the same issue happened.

March 12, 2024

Hi @vishal_s01 

as per your question, you have added these in <Export-Package>

<Export-Package> com.twilio.sdk.*, com.twilio.type.*, com.twilio.*, com.twilio.rest.api.v2010.account.*, com.twilio.base.* </Export-Package>

But these are third party dependency and you want these to be part of your package, right?  You need to add these under:  <Embed-Dependency>

March 13, 2024

Hi @arunpatidar 

I checked and tried the above articles but didn't find any solution.

 

March 13, 2024

Hi @vishal_s01 

If you are testing this in local and just to make sure that issue is related to "Embed-dependency", can u upload the external bundle directly in system/console/bundles?

For me looks like, those external bundle is depend on some other bundle or packages.

Make the embed-dependency blank in pom.xml or else, remove this part.

Note: This is just for testing. Ideally dependent bundle details should be part of code(pom.xml file)

kautuk_sahni
Community Manager
Community Manager
March 14, 2024

@vishal_s01 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
March 14, 2024

I am trying to do this and checked some posts but still issues is there.

 

Hi Developers, Is there any solution?