Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle example fails on linux #331

Open
dsyer opened this issue Jan 17, 2025 · 2 comments
Open

Gradle example fails on linux #331

dsyer opened this issue Jan 17, 2025 · 2 comments

Comments

@dsyer
Copy link

dsyer commented Jan 17, 2025

The example from the README fails like this for me:

...
> 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_reactor'.
   > Could not find reactor-grpc-1.2.4-linux-x86_64.exe (com.salesforce.servicelibs:reactor-grpc:1.2.4).
     Searched in the following locations:
         file:/home/dsyer/.m2/repository/com/salesforce/servicelibs/reactor-grpc/1.2.4/reactor-grpc-1.2.4-linux-x86_64.exe
...

I can see that .exe file in Maven Central. It works with Maven.

UPDATE: (hopefully useful for others in the same pickle, including future me) it works for me if you put mavenLocal() after mavenCentral() in the repositories declaration. So someone, somewhere is not taking into account all the repositories.

@rmichela
Copy link
Collaborator

Try replacing reactor-grpc with reactive-grpc in your config.

@dsyer
Copy link
Author

dsyer commented Jan 17, 2025

Not sure where exactly you mean I should do that. Here's the result:

> 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_reactor'.
   > Could not find reactive-grpc-1.2.4-linux-x86_64.exe (com.salesforce.servicelibs:reactive-grpc:1.2.4).
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/com/salesforce/servicelibs/reactive-grpc/1.2.4/reactive-grpc-1.2.4-linux-x86_64.exe

when I put

protobuf {
    protoc {
        artifact = "com.google.protobuf:protoc:${dependencyManagement.importedProperties['protobuf-java.version']}"
    }
    plugins {
        grpc {
            artifact = "io.grpc:protoc-gen-grpc-java:${dependencyManagement.importedProperties['grpc.version']}"
        }
        reactor {
            artifact = "com.salesforce.servicelibs:reactive-grpc:1.2.4"
        }
    }
    generateProtoTasks {
        all()*.plugins {
            grpc {
                option 'jakarta_omit'
                option '@generated=omit'
            }
            reactor {}
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants