Dependency could not being resolve by Gradle but Maven can

Hi,

I try to use spring-cloud-azure-eventhubs-stream-binder version 1.1.0.M4, but gradle couldn’t resolve it.

Maven can.

And com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder:1.1.0.RC2 version can be resolved by gradle.

I try to raise a issue to them on github. But still want to know the reason.

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder:1.1.0.M4.
     Required by:
         project :
      > Could not resolve com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder:1.1.0.M4.
         > Could not parse POM https://repo.maven.apache.org/maven2/com/microsoft/azure/spring-cloud-azure-eventhubs-stream-binder/1.1.0.M4/spring-cloud-azure-eventhubs-stream-binder-1.1.0.M4.pom
            > Could not resolve com.microsoft.azure:spring-cloud-azure-stream-binder:1.1.0.M4.
               > Could not resolve com.microsoft.azure:spring-cloud-azure-stream-binder:1.1.0.M4.
                  > Could not parse POM https://repo.maven.apache.org/maven2/com/microsoft/azure/spring-cloud-azure-stream-binder/1.1.0.M4/spring-cloud-azure-stream-binder-1.1.0.M4.pom
                     > Could not resolve com.microsoft.azure:spring-cloud-azure:1.1.0.M4.
                        > Could not resolve com.microsoft.azure:spring-cloud-azure:1.1.0.M4.
                           > Could not parse POM https://repo.maven.apache.org/maven2/com/microsoft/azure/spring-cloud-azure/1.1.0.M4/spring-cloud-azure-1.1.0.M4.pom
                              > Could not resolve com.microsoft.azure:spring-cloud-azure-dependencies:1.1.0.M4.
                                 > Could not resolve com.microsoft.azure:spring-cloud-azure-dependencies:1.1.0.M4.
                                    > Could not parse POM https://repo.maven.apache.org/maven2/com/microsoft/azure/spring-cloud-azure-dependencies/1.1.0.M4/spring-cloud-azure-dependencies-1.1.0.M4.pom
                                       > Could not find org.springframework.cloud:spring-cloud-dependencies-parent:2.1.0.RC3.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
2 actionable tasks: 1 executed, 1 up-to-date

I know org.springframework.cloud:spring-cloud-dependencies-parent:2.1.0.RC3 doesn’t exist in maven center repository. But I am wondering why maven can work, but gradle cannot.

I resolve it by

repositories {
    mavenCentral()
    maven {
        url 'https://maven.springframework.org/milestone/'
    }
}

But what I don’t understand is the reposoitory has been sepcify in the POM of https://repo.maven.apache.org/maven2/com/microsoft/azure/spring-cloud-azure-dependencies/1.1.0.M4/spring-cloud-azure-dependencies-1.1.0.M4.pom

Do I need to sepcify in build.gradle?