Configuring Local Nexus Server - maven

I configured a Nexus server locally on my computer. And I configured several proxy for the company repositories and for the maven-central. If I type the url for an artifact in the browser such as http://localhost:2312/repository/my_repo/junit/junit/4.9/junit-4.9.jar the artifact is downloaded without problems.
But when I try to run the build using the prompt, when I type mvn clean install I get the message:Failed to read artifact descriptor for junit:junit:jar:4.9: Could not transfer artifact junit:junit:pom:4.9 from/to Nexus (http://localhost:2312/repository/my_repo/): Failed to transfer file: http://localhost:2312/repository/my_repo/junit/junit/4.9/junit-4.9.pom. Return code is: 504, ReasonPhrase: Gateway Timeout.
Can anyone tell me what I'm doing wrong, or forgetting to do?

Related

Git runner - problem to download dependency

I have one project that uses the git runner.
The command mvn package works fine on local, all dependencies are downloaded from my local nexus.
When I execute build command at the git runner environment, all dependencies from my local nexus where downloaded without problem too, but only one dependency is a problem, lets see:
[ERROR] Failed to execute goal on project sic: Could not resolve dependencies for project com.example:sic:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at br.com.sspds:ojdbc6:jar:1.0.1: Failed to read artifact descriptor for br.com.sspds:ojdbc6:jar:1.0.1: Could not transfer artifact br.com.sspds:ojdbc6:pom:1.0.1 from/to Nexus (http://172.25.100.75:8090/repository/maven-public/): Transfer failed for http://172.25.100.75:8090/repository/maven-public/br/com/sspds/ojdbc6/1.0.1/ojdbc6-1.0.1.pom: No route to host (Host unreachable)
One big detail: the library ojdbc6-1.0.1.jar was developed by our team and made available manually on our nexus server.
My configuration from nexus server is into my pom.xml.
Any idea about this problem?

"Maven builds are failing with "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" for Java 7 and Java 6

Effective January 15, 2020, The Central Repository no longer supports insecure communication over plain HTTP and requires that all requests to the repository are encrypted over HTTPS
We changed our maven central repo from HTTP to HTTPS where builds are working fine for Java version 8 but failing for Java 7 and 6 with the error as
Error: Plugin org.apache.maven.plugins:maven-source-plugin:2.1.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-source-plugin:jar:2.1.2: Could not transfer artifact org.apache.maven.plugins:maven-plugins:pom:18 from/to central (https://repo1.maven.org/maven2/): peer not authenticated -> [Help 1]
Any suggestions would be highly appreciated.
Set up a local repository instructed to mirror Maven Central and use that mirror for your builds.
Nexus is configured to do so out of the box, and can easily be run as a docker instance.

Springboot,maven dependencies error

I have a sample spring boot app to deploy in my system which is throwing me following error.I tried cleaning up the maven files from cache still struck with the issue. Can anyone help me with this. Following is the error I Get
Project build error: Non-resolvable parent POM for com.broad.gateway:com-
gateway:0.0.1-SNAPSHOT: Could not transfer artifact
org.springframework.boot:spring-boot-starter-parent:pom:2.0.2.RELEASE from/to
central (https://repo.maven.apache.org/maven2): connect timed out and
'parent.relativePath' points at no local POM
You are getting connection timeout error. This generally happens when you are behind a corporate firewall and your company restricts connection to maven central or any other repos. Try defining your company specific nexus repository under pom.xml in repositories section.

Can't download jar files using maven

I've been using Maven for few years now, installing it on different machines and OS's and never had problem with it. Ten days ago i installed in on new Windows 7 machine and since than
i can't find the reason why it can't download jar file's from remote repo's.
I am able to download jar file by typing URL in browser but when i run mvn install in console it start to download the jar, wait some time and then i am getting error message:
"...Could not transfer artifact org.primefaces:primefaces:jar:5.0 from/to central (http://repo.maven.apache.org/maven2):
GET request of: org/primefaces/primefaces/5.0/primefaces-5.0.jar from central failed:
Read timed out ... java.net.SocketTimeoutException: Read timed out".
I read all articles here, tried everything but without success.
Can anyone help?
Primefaces artefacts are not in Maven Central. You need to setup a supplemental repository to get those artifacts. I would suggest to start using a repository manager.

Maven build error on maven install

I imported a maven project onto my eclipse. I clicked on Run As->Maven Install. But I got the following build error. Please help
plugin org.apache.maven.plugins:maven-jar-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar 2.3.2:Could not transfer artifact org.apache.maven.plugins:maven-jar-plugin:pom: 2.3.2 from/to central(http://repo1.maven.org/maven2):Error transferring file: repo1.maven.org: Unknown host repo1.maven.org
I checked /m2/repository. But could not find anything related.
Somehow it is not able to download the required artifacts from the Maven Central repo.
A suggestion please check your network connectivity, are you behind any firewall or try to change your proxysettings.
Otherwise in the worst case try to download required artifacts manually and put them in .m2/repository (as per ur local system) and try to install again.
http://search.maven.org/#browse|672389075
It should work.
Thanks

Resources