Hello everyone,
i'm creating a servlet that converts a SVG image to a PNG with Apache Batik.
In my core/pom.xml i have the following dependency:
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-all</artifactId>
<version>1.17</version>
</dependency>
I can compile (and also run locally in a main function) the code but I'm getting the following error when installing the bundle on AEM:
org.apache.batik.gvt.renderer -- Cannot be resolved
org.apache.batik.transcoder -- Cannot be resolved
org.apache.batik.transcoder.image -- Cannot be resolved
How can I fix this?
For context, I'm using Java 8 and AEM 6.5.9.
Thank you for your replies.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Please follow this blog and see how to embed the dependency in you maven project.
https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html
Please follow this blog and see how to embed the dependency in you maven project.
https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html
So, i followed the blog's article but, since i'm using bnd-maven-plugin the article itself linked this page:https://myaemlearnings.blogspot.com/2021/12/embed-third-party-dependency-using-bnd.htm from the same site.
I used the first approach (the one with -conditionalpackage) and my plugin now looks like this:
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd>
<![CDATA[
Import-Package: javax.annotation;version=0.0.0,*
-conditionalpackage: com.apache.xmlgraphics.*
]]>
</bnd>
</configuration>
</execution>
</executions>
</plugin>
Unfortunately, this did not solve the issue.
Views
Replies
Total Likes
Hi @antoniomartino, You need to make the change on parent pom.xml.
Views
Replies
Total Likes
Are you referring that maven build is able to compile the build and once deployed on aem you are seeing the above error?
Views
Replies
Total Likes
Yes.
This is what is happening.
Views
Replies
Total Likes
Hi @antoniomartino
Could you please check if below is JAR or Bundle?
https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-all/1.17
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies