How to maven build in offline server?

(I’m not good at English, so I used a translator. I’m sorry.)
This is an offline Jenkins environment.
I am trying to do a Maven build and have installed the necessary plugins manually.
However, the following error occurs when building Maven.

Exception in thread “main” java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.(Socket.java:434)
at java.net.Socket.(Socket.java:211)
at jenkins.maven3.agent.Maven35Main.main(Maven35Main.java:133)
at jenkins.maven3.agent.Maven35Main.main(Maven35Main.java:65)
[workspace] $ /bin/sh -xe {jenkins_dir}/temp/jenkins7436717266301016827.sh
ERROR: Failed to launch Maven. Exit code = 1
Finished: FAILURE

I searched, but the written solution did not solve the problem and the same error occurred.
Can you tell me where I missed it?
thank you

Jenkins setup:
Jenkins: 2.346.3
OS: Linux - 3.10.0-1160.114.2.el7.x86_64
Java: 1.8.0_202 - Oracle Corporation (Java HotSpot™ 64-Bit Server VM)

Hello and welcome to this community, @bha_je. :wave:

On a side note, aren’t you supposed to run Java 11 with Jenkins 2.346.3?

Isn’t maven trying to download its dependencies, those getting an error?

A stackoverflow article provides several helpful hints that may assist you as you configure Apache Maven for offline builds.

The question is not really related to Jenkins, but to Apache Maven. You may find more assistance from the Apache Maven community where they probably see this type of question more frequently.

1 Like

Thank you for your answer.
An error is occurring before downloading Maven dependencies.
In the case of version 2.346.3, I knew that Java 8 version was available, so I used the version in the settings.
Can you let me know if there is a problem using Java 8 version?

1 Like

My bad, the first version to require Java 11 was 2.357.

Thank you for your answer.
When I accessed Tomcat and checked for errors, the following error occurred.

hudson.scm.SubversionSCM.buildEnvironment no revision found corresponding to svn://[IP]:[PORT]/[SOURCE]; known: [svn://IP]/[SOURCE]]

Maybe there was a setting I missed?

Thank you.
When I accessed Tomcat and checked for errors, the following error occurred.

hudson.scm.SubversionSCM.buildEnvironment no revision found corresponding to svn://[IP]:[PORT]/[SOURCE]; known: [svn://IP]/[SOURCE]]

Maybe there was a setting I missed?

I tried many things, but there was no way other than opening to all IPs. If you use Jenkins, please refer to this.