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.
解決済! 解決策の投稿を見る。
トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。
表示
返信
いいね!の合計
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.
表示
返信
いいね!の合計
Hi @antoniomartino, You need to make the change on parent pom.xml.
表示
返信
いいね!の合計
Are you referring that maven build is able to compile the build and once deployed on aem you are seeing the above error?
表示
返信
いいね!の合計
Yes.
This is what is happening.
表示
返信
いいね!の合計
Hi @antoniomartino
Could you please check if below is JAR or Bundle?
https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-all/1.17
表示
返信
いいね!の合計