Hi, I want to import following things on my servlet. Can anyone let me know what is the process to add external dependencies and also what external dependencies are needed?
Views
Replies
Total Likes
Hello @sakethchandra02
Dependencies would be
<!-- https://mvnrepository.com/artifact/org.xhtmlrenderer/flying-saucer-pdf-itext5 -->
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.lowagie/itext -->
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency>
To use these dependencies, you can add the bundles in parent's pom.xml and all modules's pom.xml, like described on https://techrevel.blog/2023/09/27/managing-third-party-dependencies-in-aem/. Just refer to following:
Thanks a lot for the response. My core bundle is now stuck in installed state with the following error
I have added them as dependencies in core pom as well (As I was getting an error while build). Now the build is successful but core isn't getting active. Can you please let me know if there is anything missing here?
<!-- https://mvnrepository.com/artifact/org.xhtmlrenderer/flying-saucer-core -->
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-core</artifactId>
<version>9.3.1</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.3.1</version>
</dependency>
Updated version of earlier dependency
Thanks again for taking time but I can see the same error.
Each of the dependencies have their pom.xml in maven. Like:
Maven Repository: org.xhtmlrenderer » flying-saucer-pdf-itext5 » 9.3.1 (mvnrepository.com)
repo1.maven.org/maven2/com/lowagie/itext/4.2.2/itext-4.2.2.pom
requesting you to please check their dependencies in pom.xml and import the ones needed. It should help resolve the issue
Hi @sakethchandra02
Please check if the external dependencies are are resolved or not in AEM.
It might be possible that the dependencies are the jar but not the osgi bundles.
@sakethchandra02 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.
Views
Replies
Total Likes