How to Integrate Alibaba captcha in AEMaacs | Community
Skip to main content
New Participant
August 6, 2024
Solved

How to Integrate Alibaba captcha in AEMaacs

  • August 6, 2024
  • 3 replies
  • 823 views

I am following the below document for integration of Alibaba captcha.. 

 

https://www.alibabacloud.com/help/en/captcha/captcha2-0/user-guide/add-a-web-or-html5-client-to-alib...

 

 

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-building-maven-project-quot-bundle-aem/td-p/433298
But the issue is still the same.

Any leads?

 

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

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

3 replies

kautuk_sahni
Employee
August 7, 2024

@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!

Kautuk Sahni
EstebanBustamante
EstebanBustamanteAccepted solution
New Participant
August 6, 2024

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

Esteban Bustamante
Pradeep_Kumar_Srivastav
New Participant
August 6, 2024

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>