In my project i have dependencies displaytag
and birt-runtime
. And here display tag needs itext-2.0.1.jar
and birt-runtime
needs itext-2.1.7.jar
so how can i declare this in my pom.xml
to use itext-2.0.1.jar
only by displaytag and use itext-2.1.7.jar
only by birt-runtime
. could some one let me know how to achieve this?
Thanks in advance.
In normal java application this is not possible, because in the application itext 2.1 and 2.0 will share the same classloader. But normally, java-apis take care about backward-compatibility, so it should be possible to include only 2.1.
If not, you need multiple classloaders and then it will become complicated.
Existing solutions:
DIY: