Closed paulvi closed 7 years ago
Well, at least now we have a publicly available reproducible example of the problematic behaviour. Thank you for that.
I still wish to plead innocence and I kindly ask you to raise a separate ticket in trustin/os-maven-plugin
project. Unfortunately, I neither use Eclipse nor have a good enough understanding of what is going on inside it. @trustin may be in a better position there to figure out what is going on.
To me, Missing: ---------- 1) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.1.0
indicates that Eclipse was unable to resolve or substitute os.detected.classifier
property upon rebuilding the project. An that is the root issue, which causes the protobuf plugin to fail due to misconfiguration.
Solved in #16 with your link https://github.com/trustin/os-maven-plugin#issues-with-eclipse-m2e-or-other-ides
This issue possibly has to do with the version missmatch in pom.xml and downloaded .jar put into <ECLIPSE_HOME>/plugins
directory. So leave open for now.
Well, while linked solution did worked for simple example https://github.com/paulvi/com.example.grpc.maven
I could not make it work for company project using both 1.4.1.Final or 1.5.0.Final os-mave-plugin
It must be some sort of class loading issue in Eclipse that prevents the correct functioning of the os-maven-plugin
and its Eclipse extension. I am really sorry, but I won't be able to help you resolve that (and the root cause does not seem to be related to protobuf-maven-plugin
at all). Please raise an issue against os-maven-plugin
or Eclipse, or both.
I fixed this by adding the following sniplet to my maven settings.xml:
<profiles>
<profile>
<id>protobuf</id>
<properties>
<os.detected.classifier>windows-x86_64</os.detected.classifier>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>protobuf</activeProfile>
</activeProfiles>
Of course the value of the property would need to be changed depending on what OS you're on.
Similar to https://github.com/xolstice/protobuf-maven-plugin/issues/10#issuecomment-252944822 raised by @ccleve in a test project https://github.com/paulvi/com.example.grpc.maven
To reproduce press Alt+F5 that is call Maven -> Update Project...
That marks pom.xml and and the project into red.