Reputation: 2057
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
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:
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.
Upvotes: 4
Views: 16114
Reputation: 1030
You can also get this failure if you are doing an http
request to a server that only allows https
.
Upvotes: 4
Reputation: 5328
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".
Upvotes: 7