You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to migrate my project from maven, but I can not access the custom company repository. Gradle connects to the central repository by default, and disregards both my maven settings.xml and init.gradle. The issue is the same as gradle/gradle#19884 but I am using a windows machine.
Expected Behavior
Gradle should use the repository settings from init.gradle.
Current Behavior
Gradle ignores the settings and tries to access https://repo.maven.apache.org/maven2 instead and gets blocked by corporate proxy. Same settings work fine while running any other gradle command, such as build.
Context
I can not convert a maven project to gradle while behind a corporate proxy that blocks maven repos.
Steps to Reproduce (for bugs)
1- Be behind a proxy that blocks maven repos.
2- Have a maven project
3- Open maven project folder and run gradle init with init.gradle config.
<mirrors>
<mirror>
<mirrorOf>*</mirrorOf>
<name>remote-repos</name>
<url>custom-repo</url>
<id>remote-repos</id>
</mirror>
<!-- This was added in case * mirror did not work, but changed nothing. -->
<mirror>
<mirrorOf>central</mirrorOf>
<name>apache-repo</name>
<url>custom-repo</url>
<id>apache-repo</id>
</mirror>
</mirrors>
<!-- This was added in case mirrors did not work, but changed nothing. -->
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>custom-repo</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>custom-repo</url>
</repository>
</repositories>
Build scan URL:
I ran gradle init --scan and got the following error:
FAILURE: Build failed with an exception.
Where:
Auto-applied by using --scan
What went wrong:
Plugin [id: 'com.gradle.enterprise', version: '3.8.1', artifact: 'com.gradle:gradle-enterprise-gradle-plugin:3.8.1'] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Plugin Repositories (could not resolve plugin artifact 'com.gradle:gradle-enterprise-gradle-plugin:3.8.1')
Searched in the following repositories:
Gradle Central Plugin Repository
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Hi! any update on this issue? I experience the same problem - try to transform maven project to gradle one, but it fails because my laptop behind firewall and it can't reach private repos
I am trying to migrate my project from maven, but I can not access the custom company repository. Gradle connects to the central repository by default, and disregards both my maven settings.xml and init.gradle. The issue is the same as gradle/gradle#19884 but I am using a windows machine.
Expected Behavior
Gradle should use the repository settings from init.gradle.
Current Behavior
Gradle ignores the settings and tries to access https://repo.maven.apache.org/maven2 instead and gets blocked by corporate proxy. Same settings work fine while running any other gradle command, such as build.
Context
I can not convert a maven project to gradle while behind a corporate proxy that blocks maven repos.
Steps to Reproduce (for bugs)
1- Be behind a proxy that blocks maven repos.
2- Have a maven project
3- Open maven project folder and run gradle init with init.gradle config.
Your Environment
init.gradle file:
Settings xml:
Build scan URL:
I ran gradle init --scan and got the following error:
FAILURE: Build failed with an exception.
Where:
Auto-applied by using --scan
What went wrong:
Plugin [id: 'com.gradle.enterprise', version: '3.8.1', artifact: 'com.gradle:gradle-enterprise-gradle-plugin:3.8.1'] was not found in any of the following sources:
Searched in the following repositories:
Gradle Central Plugin Repository
This is probably because it did not use my repo settings and got blocked by proxy.
The text was updated successfully, but these errors were encountered: