1

I'm trying to build a mixed project having following components: 1: Spring Boot 2: rSocket 3: gRPC

Its a multi container app, where container 1 (Spring & rSocket, Java) interacts with container 2 (rSocker, Spring, gRPC, Java) via Spring-rSocket. It then passes on the information to container 3 (gRPC, Python) via rSocket-RPC.

Been trying since past 3 days but was able to setup a maven project due to conflicts in dependencies thus causing netty calls to fail.

Started setting up Gradle and I'm pretty new to gradle compared to maven. Came up with following script for proto task:

protobuf {
    protoc {
        artifact = 'com.google.protobuf:protoc:3.6.1'
    }
    generatedFilesBaseDir = "${projectDir}/build/generated-sources/"

    plugins {
            rsocketRpc {
            artifact = 'io.rsocket.rpc:rsocket-rpc-protobuf:0.2.17'
        }
    }
    generateProtoTasks {
        all()*.plugins {
            rsocketRpc {}
        }
    }
}

And following pluginManagement in settings.gradle

pluginManagement {
    repositories {
        maven { url 'https://repo.spring.io/snapshot' }
        maven { url 'https://repo.spring.io/milestone' }
        maven { url 'https://repository.jboss.org/nexus/content/repositories/public/' }
//        maven { url 'https://jcenter.bintray.com/' }
        jcenter()
        maven { url 'https://dl.bintray.com/netifi/netifi-oss/' }
        gradlePluginPortal()
    }
    resolutionStrategy {
        eachPlugin {
            if (requested.id.id == 'org.springframework.boot') {
                useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}")
            }
        }
    }
}

But the build always fails saying it isn't able to find plugin:

AzureAD+DebasishKanhar@DESKTOP-COEQQIB MINGW64 /d/Projects/Projects/Freelancing/Elysium Analytics/sia/graphdb/snowflake-graphdb/graphextractor_gradle (custom-graphdb-snowflake)
$ gradle build
> Task :generateProto FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateProto'.
> Could not resolve all files for configuration ':protobufToolsLocator_rsocketRpc'.
   > Could not find rsocket-rpc-protobuf-0.2.17-windows-x86_64.exe (io.rsocket.rpc:rsocket-rpc-protobuf:0.2.17).
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/io/rsocket/rpc/rsocket-rpc-protobuf/0.2.17/rsocket-rpc-protobuf-0.2.17-windows-x86_64.exe

Looks like its not finding the plugin in default maven repo which is correct as I know that the protoc plugin is hosted in jcenter. But if you see, I've added the URL in pluginManagement but then why doesn't my build script catch the jcenter repository?

Any help would be really appreciated :-)

Debasish Kanhar
  • 1,123
  • 2
  • 15
  • 27

1 Answers1

1

Searching for a solution to this problem myself I have found the answer.

In short it looks like currently there are no windows builds, only linux. See https://repo.maven.apache.org/maven2/io/rsocket/rpc/rsocket-rpc-protobuf/0.2.17/

Therefore you will need to do the development on a linux based OS (Ubuntu, Mac etc) or grpc proto rather than rsocket one.

Shame really, hopefully they package windows versions at some point

Pez
  • 11
  • 1
  • Oh wow! Thats really strange because rSocket is great framework and really powerful if you combine with gRPC. Had to change the whole architecture of microservices so its only pure gRPC now because of above error. But really thanks for posting your find :-) WIll be helpful for someone who is looking for same thing in future. – Debasish Kanhar Oct 16 '20 at 19:54