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?
Solved! Go to Solution.
Views
Replies
Total Likes
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
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 -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) found | No importing bundle(s) found | No maven information available |
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
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
@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!
Views
Replies
Total Likes
Views
Likes
Replies