jasper reports - Why does jasperreports-maven-plugin needs itext:itext:jar:4.2.0? -
since today can't build our jasper file more. use jasperreports-maven-plugin this.
in maven 2.2.1, configured this:
<plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>jasperreports-maven-plugin</artifactid> <version>1.0-beta-2</version> <executions> <execution> <goals> <goal>compile-reports</goal> </goals> <configuration> <sourcedirectory>${basedir}/src/main/resources/reports</sourcedirectory> <outputdirectory>>${project.build.directory}/classes/reports</outputdirectory> </configuration> </execution> </executions> <dependencies> <dependency> <groupid>net.sf.jasperreports</groupid> <artifactid>jasperreports</artifactid> <version>5.5.1</version> <scope>compile</scope> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>servlet-api</artifactid> <version>2.5</version> <scope>compile</scope> </dependency> </dependencies> <configuration> <sourcedirectory>c:\windows\temp/src/main/resources/reports</sourcedirectory> <outputdirectory>c:\windows\temp\target/classes/reports</outputdirectory> </configuration> </plugin>
but, said, since today, got build error:
... downloading: http://repo1.maven.org/maven2/itext/itext/4.2.0/itext-4.2.0.jar [info] ------------------------------------------------------------------------ [error] build error [info] ------------------------------------------------------------------------ [info] failed resolve artifact. missing: ---------- 1) itext:itext:jar:4.2.0 try downloading file manually project website. then, install using command: mvn install:install-file -dgroupid=itext -dartifactid=itext -dversion=4.2.0 -dpackaging=jar -dfile=/path/to/file alternatively, if host own repository can deploy file there: mvn deploy:deploy-file -dgroupid=itext -dartifactid=itext -dversion=4.2.0 -dpackaging=jar -dfile=/path/to/file -durl=[url] -drepositoryid=[id] path dependency: 1) org.codehaus.mojo:jasperreports-maven-plugin:maven-plugin:1.0-beta-2 2) jasperreports:jasperreports:jar:1.2.0 3) itext:itext:jar:4.2.0
i think question (dependency error in jasper-reports itext) related his. , tried solution of meher use maven 3.2.3. seems solution, can't upgrade (now) maven version. need solution resolve issue. ideas? tried exclude dependencies , use fixed versions, haven't managed succeed build. mean this:
<!-- compile jasper reports --> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>jasperreports-maven-plugin</artifactid> <version>1.0-beta-2</version> <configuration> <sourcedirectory>${basedir}/src/main/resources/reports</sourcedirectory> <outputdirectory>${project.build.directory}/classes/reports</outputdirectory> </configuration> <executions> <execution> <goals> <goal>compile-reports</goal> </goals> <phase>generate-sources</phase> </execution> </executions> <dependencies> <dependency> <groupid>org.codehaus.mojo</groupid> <artifactid>jasperreports-maven-plugin</artifactid> <version>1.0-beta-2</version> <exclusions> <exclusion> <groupid>net.sf.jasperreports</groupid> <artifactid>jasperreports</artifactid> </exclusion> </exclusions> </dependency> <dependency> <groupid>net.sf.jasperreports</groupid> <artifactid>jasperreports</artifactid> <version>5.5.1</version> <exclusions> <exclusion> <groupid>com.lowagie</groupid> <artifactid>itext</artifactid> </exclusion> </exclusions> </dependency> <dependency> <groupid>com.lowagie</groupid> <artifactid>itext</artifactid> <version>2.1.7</version> </dependency> </dependencies> </plugin>
why plugin still searching itext:itext:jar:4.2.0? ideas or suggestions solve this?
thanks!
background:
itext group nv owner of groupid com.lowagie
, com.itextpdf
on maven central. itext group nv released com.lowagie:itext
version 2.1.7 in july 2009. next release itext group nv com.itextpdf:itextpdf
version 5.0.0, in december 2009. current version (as of december 2015) 5.5.8.
itext group nv never released version 4.x.x.
somewhere in 2011, company called inprotopia "hijacked" com.lowagie
, released fork of itext version number 4.2.0. according [guidelines of maven central][1], should have published com.inprotopia:itext
, didn't. later published 4.2.1 own patches. itext group nv took ownership of com.lowagie
, published version 4.2.2 redirection com.itextpdf:itextpdf
version 5.5.6 (the current version @ time).
possible solutions:
- if need
com.lowagie
itext, need set fixed version inpom.xml
. last official release 2.1.7. - if need itext 4.x.x, contact inprotopia. luck that, because website down, , far find out, company no longer exists.
- if don’t mind version of itext use, use current version of itext published itext group nv,
com.itextpdf:itextpdf
5.5.8 (as of december 2015). - use latest version of
jasperreports
. has explicit dependency on itext2.1.7.js
, custom itext version jasper reports.
more info @ itext blog. http://itextpdf.com/maven-update-problem-with-itext-4.2.2
[1] https://maven.apache.org/guides/mini/guide-central-repository-upload.html
Comments
Post a Comment