Hi Support team,
I am converting project from maven to gradle.
when I execute “gradle init”
I am getting following error:
execution failed for task: ‘init’
could not resolve org.apache.maven.-core:3.6.3
could not get resource ‘https://repo.maven.apache.org/maven2/org/apache/maven/......pom’
Connect to repo.maven.apache.org:443[repo.maven.apache.org/18.104.22.168] failed : connection timedout
I know it’s network error, gradle is not able to download required dependencies from maven repo.
but from our company, connecting to remote maven repo is prohibited,
how can I instruct “gradle init” command to use our company repository to download required dependencies
Can anyone please help
You need to become a bit more patient.
There is no support team here.
This is a community forum.
It might occasionally happen that some of the Gradle folks are around here, but typically users like me are helping fellow users.
And unfortunately the answer is, that from the Gradle side you cannot.
If you really need it, you need to use some proxy that is redirecting to your company repository,
or some DNS tricks like
hosts file if the paths are compatible or similar.
init task that converts from POM has non-overridably hard-coded to use Maven Central.
The easiest is probably to just not use that conversion, but just doing it by hand.
The standard case is translated pretty easily and much more is not supported by the conversion anyway.