dependencies issue in bundle | Community
Skip to main content
Level 3
September 16, 2024
Solved

dependencies issue in bundle

  • September 16, 2024
  • 4 replies
  • 1172 views

hi,
im using AEM 6.5.8
in my  project i want to use below dependencies , i added in pom file build success but  project bundle is  inactive and  issue is this   dependencies  cannot be resolved

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>

</dependency>


org.apache.commons.text,version=[1.10,2) -- Cannot be resolved

how i can resolve this issue?

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 somen-sarkar

Hi @user96222 ,

The dependencies can not be resolved issue appears when  the same is not available in the context of OSGI. First check if you have any other OSGI packages which is already available OOTB and can be used to perform the functionalities that you are trying to achieve .

 

If it's not possible then embedding the dependency is another approach . Pls check the below article  for more details .

https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html

 

Thanks,

Somen

4 replies

Himanshu_Jain
Community Advisor
Community Advisor
September 16, 2024

Hi @user96222 ,

Kindly check the error and try to delete the jar from .m2 folder and run mvn clean install again.

Also validate the correct version of dependency using the depfinder tool http://localhost:4502/system/console/depfinder

 

Thanks

Himanshu Jain
user96222Author
Level 3
September 16, 2024

@himanshu_jain  -i didnt find any version in depfinder

 

Package Version Exported by Used by bundle(s) Maven Dependency

org.apache.commons.text-No exporting bundle(s) foundNo importing bundle(s) foundNo maven information available
somen-sarkar
Community Advisor
somen-sarkarCommunity AdvisorAccepted solution
Community Advisor
September 16, 2024

Hi @user96222 ,

The dependencies can not be resolved issue appears when  the same is not available in the context of OSGI. First check if you have any other OSGI packages which is already available OOTB and can be used to perform the functionalities that you are trying to achieve .

 

If it's not possible then embedding the dependency is another approach . Pls check the below article  for more details .

https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html

 

Thanks,

Somen

ManviSharma
Adobe Employee
Adobe Employee
September 16, 2024

Hi Team,

 

To resolve the issue with `org.apache.commons.text` in AEM 6.5.8, ensure that the dependency is properly embedded in your project. Update your `maven-bundle-plugin` configuration in the `core/pom.xml` to include the dependency under `Embed-Dependency`, like this: `commons-text;scope=compile|runtime`.

Alternatively, manually install the `commons-text` bundle in AEM’s OSGi console by downloading it from Maven Central. Finally, verify that the dependency version is compatible, and consider using an older version (e.g., 1.9.0) if needed.

Regards,

Manvi Sharma

kautuk_sahni
Community Manager
Community Manager
September 25, 2024

@user96222 Did you find the suggestions 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