compile-custom fails on Windows 10
kasingal opened this issue · comments
It works on Ubuntu, MacOS but fails on Windows 10.
Using below execution configutration (with kroto-plus.version = 0.5.0)
<execution>
<id>grpc-coroutines</id>
<goals>
<goal>compile-custom</goal>
</goals>
<configuration>
<pluginId>kroto-plus</pluginId>
<pluginArtifact>com.github.marcoferrer.krotoplus:protoc-gen-kroto-plus:${kroto-plus.version}:jar:jvm8</pluginArtifact>
<pluginParameter>ConfigPath=./krotoPlusConfig.asciipb</pluginParameter>
</configuration>
</execution>
Windows Info:
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: windows
[INFO] os.detected.arch: x86_64
[INFO] os.detected.version: 10.0
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 0
[INFO] os.detected.classifier: windows-x86_64
Failed Error Logs:
[INFO] --- protobuf-maven-plugin:0.6.1:compile-custom (grpc-coroutines) @ blueprint-proto ---
[INFO] Compiling 4 proto file(s) to C:\git\modules\target\generated-sources\protobuf\kroto-plus
[ERROR] PROTOC FAILED: --kroto-plus_out: protoc-gen-kroto-plus: This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
[ERROR] C:\git\modules\components\proto-definition\proto\CommandExecutor.proto [0:0]: --kroto-plus_out: protoc-gen-kroto-plus: This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Sorry about the delayed response. Im sorry but yes there are currently issues when using the plugin within windows environments. It is discussed extensively in #6
The quickest short term workaround is outlined in this comment #6 (comment)
There is a long term stable solution currently queued up for the next release is this PR #87
Thanks @marcoferrer-- I left a single comment on the PR. Otherwise it looks good to me.
@mattdkerr No worries. Thanks again for reporting. The PRs been merged and I published a snapshot of 0.6.0
Please let me know if you run into anymore issues. I’m really happy to get this resolved. The issues with windows compatibility have been bugging me for a while.
I pulled in the 0.6.0-SNAPSHOT
version and changed the line to look like:
artifact = "com.github.marcoferrer.krotoplus:protoc-gen-kroto-plus:$krotoPlusVersion"
and then I get successful generateProto
and compileJava
sequences. Thanks!
Will this then be released?
Awesome thanks for the confirmation! The goal is to release later this week.
Using 0.6.0-SNAPSHOT
and removing :jvm8@jar
from the artifact in my protobuf config got this working on Windows for me.
My full protobuf config is:
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protobuf_version"
}
//noinspection GroovyAssignabilityCheck
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:$grpc_version" }
coroutines {
artifact = "com.github.marcoferrer.krotoplus:protoc-gen-grpc-coroutines:$krotoplus_version"
}
}
generateProtoTasks {
all().each{ task ->
task.plugins {
grpc {}
coroutines {}
}
}
}
}
With 0.6.0
released, there is now an executable windows artifact available.