proxy repository is blocked - maven

I added a proxy repository in nexus. When I update now in Routing, it failed. The repo url I added is https://raw.githubusercontent.com/dianping/cat/mvn-repo
I can access this url
https://raw.githubusercontent.com/dianping/cat/mvn-repo/org/unidal/maven/plugins/codegen/2.3.2/codegen-2.3.2.pom
I can't access this url
https://raw.githubusercontent.com/dianping/cat/mvn-repo
response 400: Invalid request
So. It's the repo server block nexus from update.
If I don't use mirror in maven setting, Maven update will work right.
Meanwhile, when I use nexus public repositores group as my mirror(I also added proxy repo to public repositories group), It just report Failure to find org.unidal.maven.plugins:codegen-maven-plugin:jar:2.3.2
in http://172.xxx/nexus/content/groups/public
How can I solve this problem?
And I guess the maven resolve flow is like:
maven resolve a dependency
find the dependency in local
find in repo manager
find in proxy repo.
As the full url like https://raw.githubusercontent.com/dianping/cat/mvn-repo/org/unidal/maven/plugins/codegen/2.3.2/codegen-2.3.2.pom can be access, repo manager could fetch the specific pom url, if my guess is right.
I wonder: Unlike maven central,which you can access its index or called file tree, this cat.repo you can only access its file but not its directory. So what's the diffenrence in maven? How to handle this?
EDIT
Because I've successed update not using <mirrorOf>*</mirrorOf>. My local repository already download these missing plugins in Nexus. So I follow the tips in Maven not using the local repo, and that missing plugin does not cause error again, but another artifact not found in nexus again.
I also do as maven missing artifact shows, by
Deleting maven-metadata*.xml and _*.repositories inside local
Still not working.

The remote is returning HTTP code 400 (invalid request) for request to "/".
Nexus does HEAD and GET requests to the root URL to determine if the remote is reachable, and in good health. This response code is causing Nexus to think the remote is not working.
To work around this, go to the proxy repository's configuration tab and set "auto-blocking enabled" to "false".

You can also get this failure if you are doing an http request to a server that only allows https.

Related

Maven Nexus V3 wont work with artifactory as a remote repo. How can I get around this issue?

So I currently am trying to get artifacts from repo.osegeo.org, which is a Nexus V3. I am having issues getting the artifacts to populate into my virtual repo that i created which holds the remote osegeo repo, libs release, libs snapshot and also my local repos. I have tried following the work around that is stated in this link below:
https://community.sonatype.com/t/maven-nexus-v3-remote-repository-integration-with-artifactory/2149
But I still have trouble actually getting the artifacts in my repo. Any ideas on what to do?
I suggest checking the following:
Connectivity - Is Artifactory able to reach the Nexus repository and vice versa?
The URL which is configured and if it is configured correctly.
Enable Bypass HEAD requests on the remote repository - Nexus can block HEAD requests and by default, Artifactory will create HEAD requests first before the GET requests to check if the artifact exists before attempting to resolve it.
If the Nexus repository requires authentication - Do not forget to put username and password under the advanced tab.
If there is also a reverse proxy in front of Nexus, you can try to bypass it and check if this works, if it does, the problem is probably the RP.
Check if the Maven client is configured correctly to work against the virtual repository (You didn't mention if you are able to publish or fetch from the local repository).

Connecting Nexus to Confluent repository fails

being behind a Nexus Repository Manager (3.4.x) I'm trying to setup a connection to the Confluent repository / Maven. I tried several steps, the most complete instructions I tried can be found here: Confluent Maven repository not working?
My workstation connects to a Nexus Repository Nexus. I have admin privileges on this Nexus.
Remote repository settings -- Nexus (1)
Further settings -- Nexus (2)
Using these settings I cannot connect to the Confluent repository. The Nexus works fine with other third party repositories.
I tried using the health check, but it just leaves me with 'Insufficient trend data' as shown here:
Insufficient trend Data -- Nexus (3)
I currently spend 1.5 days on this. I locally embedded some of the needed jars, but for production this is obviously not feasible.
What am I missing here? Is there a way to check availability of third party repositories from Nexus except Health Check? If you already have this setup running, I'm looking forward to your replies.
Manually added: kafka-avro-serializer, kafka-schema-registry-client
Currently unresolable: common-config
It looks like the URL you're pointing to packages.confluent.io/maven is returning a 404.
My guess is that this is causing Nexus to think that the downstream repository isn't working properly.
I'd contact the people who operate the confluent server and let them know the configuration in the documentation isn't working properly.

ArtifactTransferException: Could not transfer artifact ... to/from central

I'm following this tutorial: Spring - DAO and Service layer
I'm getting this error in Eclipse on my pom.xml:
ArtifactTransferException: Could not transfer artifact org.antlr:antlr:jar:3.2
from/to central (http://repo.maven.apache.org/maven2): No response received
after 60000
Any ideas why?
This sounds like a simple networking issue. I would recommend you attempt to access that URL in your web browser to confirm you have connectivity: http://repo.maven.apache.org/maven2. You should see:
Browsing for this directory has been disabled.
View this directory's contents on http://search.maven.org instead.
You may also wish to check that your local system does not require a proxy to access the Internet. If so, you need to follow these instructions to configure Eclipse to use your proxy.

Maven proxy vs mirror

I am finding it difficult to understand the difference between a mirror and a proxy defined in the settings.xml. I read that whatever a defined mirror is a mirrrorOf, all http requests to those(mirrorOf) repositories are overridden by a corresponding http request to the mirror. What is a proxy then? This question is in the wake of troubleshooting the following error I receive while I try to create a new project using mvn archetype:generate.
The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not
exist or no valid version could be found
Any help?
Proxy configuration relates to a standard HTTP proxy you might need reaching Internet, such as a proxy in your web browser. It does not relate to maven functionalities as such, but to reaching Internet connectivity.
If you can use a browser without a proxy, you probably don't need one for Maven either, and vice versa.
Mirror configuration, on the other hand, is meant to replace a maven repository with another. They are not related to connectivity - they change the target which your maven tries to reach.

Free artifactory or nexus service url without password, for using in intellij idea

Intelliji Idea shiped with 3 free online repository in settings -> maven -> artifactory or nexus service url
http://oss.sonatype.org/service/local/
http://repo.jfrog.org/artifactory/api/
https://repository.jboss.org/nexus/service/local/
all this repos are unavialable (404 error or password protected).
Can you give more free artifactory or nexus service url without password protect?
IDEA has no settings for password on repo URL.
The service URLs are used for attaching remote libraries to a module by running class search queries using the REST APIs available at those URLs and downloading the found librarie from the remote Artifactory.
The REST URLs aren't meant to be directly browsable.
Maybe this explains it better: http://blogs.jetbrains.com/idea/2010/08/getting-external-libraries-easily/
IDEA uses the REST services to get listings of all the repositories available on each host. All three work for me on my machine which is on a network without an HTTP proxy. Is it possible you are on a network with a proxy?
Those urls appear to be pointed at the REST resources of each system, they aren't repositories, not sure what the intellij guys were attempting to do.
If you need a repo to host your own stuff in for free, see here: http://nexus.sonatype.org/oss-repository-hosting.html
If you are trying to access the repositories on Nexus, then you can find them by browsing http://oss.sonatype.org or https://repository.jboss.org/nexus/
Sonatype's service URL now only supports https, so if you're not finding expected artifacts, try updating your Intellij Idea Maven > Repositories setting to https://oss.sonatype.org/service/local/

Resources