zipkin
zipkin copied to clipboard
Java: the zipkin2.proto3 package does not exist
Describe the Bug
Build Zipkin version V. 2.23.16 (2022-2-24 Latest) with IDEA Environment
Copy steps
(1)Load project (2)compile info: Java: the zipkin2.proto3 package does not exist
Expected Behaviour
add zipkin2.proto3
I get the same problem, the whole rest of the project builds ok but there's a few missing imports under zipkin2.proto3
How solve it? Thank you~!
Please, is it possible to get any comment on this? I would like to contribute something to Zipkin, but cannot build it in Intellij. @jcchavezs
Running ./mvnw --batch-mode -DskipTests --also-make clean install
from the root of the project generates those missing classes in zipkin-server module, I haven't yet figured out how to generate them for the "benchmarks" module.
this project doesn't package generated proto code for external use. We have SpanBytesEncoder.PROTO3
which does the same thing, and has no deps.
zipkin-proto3 is only used in our tests. we don't want to publish generated code for protos as they tend to drift across grpc versions. We use square wire, not protoc for tests.
If you want to use google protoc, you probably want to extract zipkin-proto3, from the https://github.com/openzipkin/zipkin-api project like this. Then you can use the normal protoc generation process.
<dependency>
<groupId>io.zipkin.proto3</groupId>
<artifactId>zipkin-proto3</artifactId>
<version>${zipkin-proto3.version}</version>
<scope>provided</scope>
</dependency>
--snip--
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
<executions>
<!-- wire-maven-plugin cannot get proto definitions from dependencies: this will -->
<execution>
<id>unpack-proto</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeArtifactIds>zipkin-proto3</includeArtifactIds>
<includes>**/*.proto</includes>
<outputDirectory>${unpack-proto.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>