seam iText integration seems to use older version of iText jars, would it be possible to use the latest iText 5.0.2 specific jars as part of the maven dependencies. Has anyone done this before?
http://repository.jboss.org/maven2/org/jboss/seam/jboss-seam-pdf/2.2.0.GA/jboss-seam-pdf-2.2.0.GA.pom http://repository.jboss.org/maven2/com/lowagie/itext/2.1.2/itext-2.1.2.pom
The following dependency uses 2.1.2 version of iText, not sure how to make it use the latest version 5.0.2 of iText.
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam-pdf</artifactId>
<version>${jboss-seam.version}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam-ui</artifactId>
</exclusion>
</exclusions>
</dependency>
First,
jboss-seam-pdf-2.2.0.GA.jarhas the following dependencies (skipping exclusions, refer to the root POMorg.jboss.seam:root:2.2.0.GA.pomfor full details):Second, the only itext 5.0.2 artifact I could find is the one mentioned in this thread (and available in the repository http://maven.itextpdf.com/):
As we can see it has different
groupIdandartifactIdthan the previous itext dependencies so we can’t use Maven’sdependencyManagementhere to force the use of this version (assuming this artifact replaces the previous one, I have no idea about this). So this leaves us withexclusions. Something like this:With this POM, the dependency tree becomes:
$ mvn dependency:tree ... [INFO] [dependency:tree {execution: default-cli}] [INFO] com.statckoverflow:Q2793234:jar:1.0-SNAPSHOT [INFO] +- junit:junit:jar:3.8.1:test [INFO] +- org.jboss.seam:jboss-seam-pdf:jar:2.2.0.GA:compile [INFO] | \- com.sun.facelets:jsf-facelets:jar:1.1.15.B1:compile [INFO] \- com.itextpdf:itextpdf:jar:5.0.2:compile ...I’m not saying this will work at runtime, I’m just giving you a way to replace a dependency with Maven.