I am following the below document for integration of Alibaba captcha..
But when I try to add the maven dependency for aliyun, I am getting an error in project.all module.
My dependency is:
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>captcha20230305</artifactId>
<version>1.1.2</version>
<scope>provided</scope>
</dependency>
The error I got was:
[ERROR] The analyser found the following errors for author and publish :
[ERROR] [api-regions-exportsimports] com.abc:aem-abc-project.core:4.1.0: Bundle aem-abc-project.core:4.1.0 is importing package(s) [com.aliyun.teaopenapi.models, com.aliyun.captcha20230305.models, com.aliyun.captcha20230305] in start level 20 but no bundle is exporting these for that start level. (com.abc:aem-abc-project.all:4.1.0)
I resolve the issue I tried the below reference:
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/getting-error-while-buildi...
But the issue is still the same.
Any leads?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
This explains how to solve your issue: https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html
Keep in mind that you should remove the <scope>provided</scope> tag once you embed the dependency as part of your bundle.
Hope this helps
Hi @SRC_AEM_DEV , Can you please check if the packages from the aliyun dependencies are exported in the Export-Package section of your bnd.bnd file or the maven-bundle-plugin configuration.
After adding the dependency you will need to add something like the below in your pom for maven-bundle-plugin
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.5.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Export-Package>
com.aliyun.captcha20230305.*
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
Hi,
This explains how to solve your issue: https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html
Keep in mind that you should remove the <scope>provided</scope> tag once you embed the dependency as part of your bundle.
Hope this helps
@SRC_AEM_DEV Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes