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

Publish a jar for zipkin-api to maven #45

Closed
gneokleo opened this issue Apr 2, 2018 · 8 comments
Closed

Publish a jar for zipkin-api to maven #45

gneokleo opened this issue Apr 2, 2018 · 8 comments

Comments

@gneokleo
Copy link

gneokleo commented Apr 2, 2018

The old thrift spec used to be published on zipkin here. Would it be possible to publish this as well? We use it to compile it and generate the java code.

@codefromthecrypt
Copy link
Member

hmm.. not sure we want to encourage new use of thrift

@gneokleo
Copy link
Author

gneokleo commented Apr 3, 2018

I see. What would be the preferred binary serialization in v2 with cross language support?

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Apr 4, 2018 via email

@codefromthecrypt
Copy link
Member

fyi we actually had an issue #39

@codefromthecrypt
Copy link
Member

#47 for work in progress

@codefromthecrypt
Copy link
Member

as "zipkin-api" especially in maven could be confused with a potentially future java interface, I think zipkin-proto3 makes more sense. Will set this up

codefromthecrypt pushed a commit that referenced this issue Apr 23, 2018
This will automatically publish io.zipkin.api:zipkin-proto3 to maven
via circleci. Notably, this leaves travis alone so that the openapi
config can be left in tact.

Fixes #45
@codefromthecrypt
Copy link
Member

io.zipkin.proto3:zipkin-proto3 is waiting some process clearing from bintray, which will temporarily delay this to maven central. will ping back

@codefromthecrypt
Copy link
Member

Note that io.zipkin.zipkin2:zipkin:2.8+ jar will include a dependency free codec like we used to have for thrift openzipkin/zipkin#1998

here's how to use this with normal protobuf, should you want to cc @devinsba @gneokleo @yurishkuro @basvanbeek @wu-sheng @jcchavezs

+    <protobuf.version>3.5.1</protobuf.version>

+    <dependency>
+      <groupId>io.zipkin.proto3</groupId>
+      <artifactId>zipkin-proto3</artifactId>
+      <version>0.1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java</artifactId>
+      <version>${protobuf.version}</version>
+    </dependency>

+    <extensions>
+      <extension>
+        <groupId>kr.motd.maven</groupId>
+        <artifactId>os-maven-plugin</artifactId>
+        <version>1.5.0.Final</version>
+      </extension>
+    </extensions>

+      <!-- protobuf-maven-plugin cannot get proto definitions from dependencies, so we will -->
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>unpack-proto</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>unpack-dependencies</goal>
+            </goals>
+            <configuration>
+              <includeArtifactIds>zipkin-proto3</includeArtifactIds>
+              <includes>**/*.proto</includes>
+              <outputDirectory>${project.build.directory}/proto</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.xolstice.maven.plugins</groupId>
+        <artifactId>protobuf-maven-plugin</artifactId>
+        <version>0.5.1</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <protoSourceRoot>${project.build.directory}/proto</protoSourceRoot>
+          <protocArtifact>
+            com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
+          </protocArtifact>
+        </configuration>
+      </plugin>

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