Home > Software design >  Nexus can not download dependencies of spring-boot
Nexus can not download dependencies of spring-boot

Time:11-22

I am using a nexus, which i did not configure. I log in with remote desktop on the system that runs windows server 2012. When i want to build my spring-boot application and i run the goal mvn clean package it downloands several dependencies and then fails with a connection refused error. I do not understand this. Why was is possible to download the first few, but not the spring-boot-starter-aop jar? What connection is refused? The one that is used to download the otheres? Here is my error report:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Application
[INFO] ------------------------------------------------------------------------
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/org/aspectj/aspectjweaver/1.9.6/aspectjweaver-1.9.6.pom
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5.pom
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/org/springframework/spring-jdbc/5.3.6/spring-jdbc-5.3.6.pom
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/jakarta/transaction/jakarta.transaction-api/1.3.3/jakarta.transaction-api-1.3.3.pom
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.pom
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/org/hibernate/hibernate-core/5.4.30.Final/hibernate-core-5.4.30.Final.pom
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/org/springframework/data/spring-data-jpa/2.4.8/spring-data-jpa-2.4.8.pom
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/org/springframework/spring-aspects/5.3.6/spring-aspects-5.3.6.pom
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/org/liquibase/liquibase-core/3.10.3/liquibase-core-3.10.3.pom
Downloading: http://192.168.1.142:8081/nexus/content/groups/public/org/postgresql/postgresql/42.2.19/postgresql-42.2.19.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.778 s
[INFO] Finished at: 2021-11-22T09:16:05 01:00
[INFO] Final Memory: 19M/67M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ecg-worklist: Could not resolve dependencies for project de.mdeset.worklist:ecg-worklist:war:1.0.0: Failed to collect dependencies at org.springframework.boot:
ot-starter-data-jpa:jar:2.4.5 -> org.springframework.boot:spring-boot-starter-aop:jar:2.4.5 -> org.aspectj:aspectjweaver:jar:1.9.6: Failed to read artifact descriptor for org.aspectj:aspectjweaver:jar:
uld not transfer artifact org.aspectj:aspectjweaver:pom:1.9.6 from/to Nexus (http://192.168.1.142:8081/nexus/content/groups/public/): Connect to 192.168.1.142:8081 [/192.168.1.142] failed: Connection r
onnect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

CodePudding user response:

It is not downloading any of them.

If you look at the order, it is actually failing for the first one Downloading: http://192.168.1.142:8081/nexus/content/groups/public/org/aspectj/aspectjweaver/1.9.6/aspectjweaver-1.9.6.pom.

It is telling you it is downloading, but then during the first attempt it fails to connect.

My suggestion is to try the URL on your browser without maven first to see if you can access it: http://192.168.1.142:8081/nexus/content/groups/public/ in the browser


If download was successfull of any of those dependencies, you would see (downloading/downloaded)

Downloading from cv-release: https://arm./springframework/session/spring-session-bom/2021.0.3/spring-session-bom-2021.0.3.pom

Downloaded from cv-release: https://arm./org/springframework/session/spring-session-bom/2021.0.3/spring-session-bom-2021.0.3.pom (2.7 kB at 15 kB/s)

  • Related