Expand my Community achievements bar.

Error added third party dependency

Avatar

Level 3

[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?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

10 Replies

Avatar

Level 8

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>

Avatar

Level 3

Hi @Mahesh_Gunaje 

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

Avatar

Level 8

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>

Avatar

Level 3

Hi @Mahesh_Gunaje, Yes correct, I added the same. The same issue happened.

Vishal_S01_0-1710249044206.png

and build fail in All module.

Avatar

Level 3

Hi @arunpatidar 

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

 

Avatar

Level 8

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)

Avatar

Level 3

Hi @Mahesh_Gunaje ,

Yes, we can do it this way [system/console/bundles].

but I want to add this to the codebase.

 

 

Avatar

Administrator

@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

Avatar

Level 3

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

 

Hi Developers, Is there any solution?