IDEA keeps attempting to resolve dependencies only from repo.maven.apache
已回答
As in the subject. I need to make maven resolve them from the corporate repositorium I'm working with.
What I have tried/verified:
- Set my custom maven repos ("maven" and "jar")
- Verified the connection/proxy settings; my repo is reachable
- Set a correct settings.xml for maven
- Created a project on those settings
- Restarted, re-imported, invalidated caches
To no effect.
Any clues how to force IntelliJ to just use the repositoria I'm telling it to? IntelliJ keeps attempting to use repo.maven.apache, no visible sign of even trying the repos given in Settings.
The logs don't contain the address of my repos. It's as if Settings were not being applied. They are persisted though, because I can restart IDEA and the Settings are there.
请先登录再写评论。
>IntelliJ keeps attempting to use repo.maven.apache, no visible sign of even trying the repos given in Settings.
How do you know it?
>Any clues how to force IntelliJ to just use the repositoria I'm telling it to?
How and where do you define repositories? The repositories must be defined in Maven: either in pom.xml used in project or in Maven settings.xml which is specified in Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Maven | User settings file.
Do you have command line Maven working using custom repositories?
>IntelliJ keeps attempting to use repo.maven.apache, no visible sign of even trying the repos given in Settings.
>How do you know it?
When attempting to re-import projects, background Tasks pop-up > "Resolving dependencies of XXX.pom [http://repo.maven.apache..."
Also, Maven view -> hover on a project -> pop-up -> "Failed to transfer XXX.pom from http://repo.maven.apache..."
>How and where do you define repositories?
In three places: maven settings.xml (which I specify), then also Settings > Build, Execution, Deployment -> Maven -> Repositories and also Settings -> Build, Execution, Deployment -> Remote Jar Repositories.
Yes, maven is correctly working with these corporate repos from both the command line and Eclipse.
For Maven import IDE uses only configuration defined in Maven settings. It does not use IDE configured repositories. Those repositories are used for Adding dependency from Maven action.
Make sure you are using in IDE same Maven settings as your commend line Maven uses.
Could you provide idea.log (Help | Show Log in ... action) file after IDE restart and re-importing project and reproducing the issue?
For uploading you can use ftp://ftp.intellij.net/.uploads / https://uploads.services.jetbrains.com or any file sharing service.