Introduction
This is an article about solving error message as the main content. So, the main focus is discussing about the solution to solve an error message exist. The error message itself exist when building and compiling a certain project of Java-based application program. The building and compiling execution is using a Java-based IDE called Netbeans IDE. As an additional information, this article has a connection with the previous one. That article is an article with the title of ‘How to Solve Error Message Failure to find com.lowagie:itext:pom:2.1.7.js6 when building and compiling Java Project in Netbeans IDE’ in this link. Furthermore, the following are the error exist as an output of the building and compiling process :
cd C:\apps; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_111" M2_HOME=C:\\apache-maven-3.6.3 cmd /c "\"\"C:\\apache-maven-3.6.3\\bin\\mvn.cmd\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" clean install\"" Scanning for projects... ---------------------< com.github.adminfaces:apps >--------------------- Building apps 0.1-SNAPSHOT --------------------------------[ war ]--------------------------------- Downloading from snapshots: https://oss.sonatype.org/content/repositories/snapshots/com/lowagie/itext/2.1.7.js7/itext-2.1.7.js7.pom Downloading from prime-repo: http://repository.primefaces.org/com/lowagie/itext/2.1.7.js7/itext-2.1.7.js7.pom Downloading from central: https://repo.maven.apache.org/maven2/com/lowagie/itext/2.1.7.js7/itext-2.1.7.js7.pom Downloading from jaspersoft-third-party: http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/lowagie/itext/2.1.7.js7/itext-2.1.7.js7.pom Downloading from jr-ce-releases: http://jaspersoft.jfrog.io/jaspersoft/jr-ce-releases/com/lowagie/itext/2.1.7.js7/itext-2.1.7.js7.pom ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ Total time: 8.113 s Finished at: 2021-07-22T07:04:37+07:00 ------------------------------------------------------------------------ Failed to execute goal on project apps: Could not resolve dependencies for project com.github.adminfaces:apps:war:0.1-SNAPSHOT: Failed to collect dependencies at net.sf.jasperreports:jasperreports:jar:6.13.0 -> com.lowagie:itext:jar:2.1.7.js7: Failed to read artifact descriptor for com.lowagie:itext:jar:2.1.7.js7: Could not transfer artifact com.lowagie:itext:pom:2.1.7.js7 from/to jaspersoft-third-party (http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/): Transfer failed for http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/lowagie/itext/2.1.7.js7/itext-2.1.7.js7.pom 308 Permanent Redirect -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Solution
As the problem arise in the previous part, the following is the discussion on the solution. Basically, the cause of the appearance of the error message is because of the following pom.xml file definition after searching thoroughly :
<dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.10.0</version> </dependency>
Generally, the error will also appears upon using another higher version of the jasperreports. So, start from jasperreports with the version of 6.10.0 tall the way to the higher version from 6.11.0, 6.12.0 and 6.13.0, it will generate the same error. So, the solution is actually similar with the one available in the previous article with the title of ‘How to Solve Error Message Failure to find com.lowagie:itext:pom:2.1.7.js6 when building and compiling Java Project in Netbeans IDE’ in this link. The solution is very simple. Just add the following script configuration :
<exclusions> <exclusion> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> </exclusion> </exclusions>
In the end, the full configuration of the pom.xml will be like the following :
<dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.10.0</version> <exclusions> <exclusion> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> </exclusion> </exclusions> </dependency>
Last but not least, do not forget to build and compile the project once more. If there are no other errors appear, the process for building and compiling the project will be a success.
One thought on “How to Solve Error Message Failure to find com.lowagie:itext:pom:2.1.7.js7 when building and compiling Java Project in Netbeans IDE”