Introduction
Another article involving on how to solve an error message. The error message exist in the title of the article. That error message appear upon building, compiling and running a Java program using maven tool exist in NetBeans IDE. It is an internal integrated maven tool with the NetBeans IDE. The following is the output of the execution which is showing the error message appearing :
The POM for com.lowagie:itext:jar:2.1.7.js2 is missing, no dependency information available ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ Total time: 1:26.769s Finished at: Tue Feb 15 20:20:47 ICT 2022 Final Memory: 15M/158M ------------------------------------------------------------------------ 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 for [javax:javaee-api:jar:7.0 (provided), com.github.adminfaces:admin-template:jar:1.0.0-RC21 (compile), com.github.adminfaces:admin-theme:jar:1.0.0-RC21 (compile), org.primefaces:primefaces:jar:7.0.RC2 (compile), commons-io:commons-io:jar:2.6 (compile), commons-fileupload:commons-fileupload:jar:1.3 (compile), org.mybatis.spring.boot:mybatis-spring-boot-starter:jar:2.0.1 (compile), org.mybatis:mybatis:jar:3.4.6 (compile), org.mybatis:mybatis-cdi:jar:1.1.0 (compile), net.bootsfaces:bootsfaces:jar:1.4.2 (compile), javax.servlet:jstl:jar:1.2 (compile), net.sf.jasperreports:jasperreports:jar:6.9.0 (compile), org.apache.poi:poi:jar:3.15 (compile), org.apache.poi:poi-ooxml:jar:3.15 (compile), org.jboss.weld:weld-core:jar:2.1.0.Final (compile), org.postgresql:postgresql:jar:42.2.15 (compile), mysql:mysql-connector-java:jar:5.1.6 (compile), com.microsoft.sqlserver:mssql-jdbc:jar:8.4.1.jre8 (compile), org.mariadb.jdbc:mariadb-java-client:jar:2.1.2 (compile), org.keycloak:keycloak-core:jar:12.0.2 (compile), org.springframework.boot:spring-boot-starter-data-ldap:jar:2.3.3.RELEASE (compile), com.unboundid:unboundid-ldapsdk:jar:4.0.10 (compile), com.lowagie:itext:jar:2.1.7.js2 (compile)]: Failed to read artifact descriptor for com.lowagie:itext:jar:2.1.7.js6: Could not transfer artifact com.lowagie:itext:pom:2.1.7.js6 from/to jaspersoft-third-party (http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/): Connect to jaspersoft.jfrog.io:80 [jaspersoft.jfrog.io/35.243.130.159] failed: Connection timed out: connect -> [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
Basically, the error is ‘failed: Connection timed out: connect’. It is because before that error appear, there is another info giving the hint for it. It is in the following line :
The POM for com.lowagie:itext:jar:2.1.7.js2 is missing, no dependency information available
Solution
Actually, the error message appearing above has connection with several previous articles. One of them is the article with the title ‘How to Solve Error Message Return code is: 308 , ReasonPhrase:Permanent Redirect. when building Java Program using maven in NetBeans’ in this link.
So, the solution exist in the other article is in the following options :
-
Changing the version of the package. It exist as in the following list of packages :
<dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> <version>2.1.7</version> </dependency>
<dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> <version>2.1.7.js2</version> </dependency>
<dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> <version>2.1.7.js4</version> </dependency>
<dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> <version>2.1.7.js8</version> </dependency>
In other to search for the correct version, just search it the maven repository. That repository exist in this link.
-
Excluding it for further downloading. Actually, the package ‘com.lowagie.itext’ is a package where it is downloading another package automatically. That package is the ‘jasperreports’ package. In order to exclude it, just add it in the package which is including it for automatic download process as follows :
<dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.9.0</version> <exclusions> <exclusion> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> </exclusion> </exclusions> </dependency>
One thought on “How to Solve Error Message failed: Connection timed out: connect when building Java Program using maven in NetBeans”