Maven to gradle conversion

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 ‘
Connect to[] 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

Rakesh K

Can anyone please help

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.

The 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.

1 Like