Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

Commit c53f291

Browse files
author
Bogdan Drutu
authored
Cleanup dependencies and examples. (#94)
* Fix examples and remove grpc-netty. * Deprecate the constructor with api path. * Remove API guice module. * Fix some extra dependencies on guice-api.
1 parent cd6a3e5 commit c53f291

File tree

23 files changed

+102
-318
lines changed

23 files changed

+102
-318
lines changed

README.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,29 +65,18 @@ The following sample writes a trace span to the Stackdriver Trace API using gRPC
6565
<dependencies>
6666
<dependency>
6767
<groupId>com.google.cloud.trace</groupId>
68-
<artifactId>trace-grpc-api-service</artifactId>
68+
<artifactId>core</artifactId>
6969
<version>VERSION</version>
7070
</dependency>
7171
<dependency>
7272
<groupId>com.google.cloud.trace</groupId>
73-
<artifactId>core</artifactId>
73+
<artifactId>service</artifactId>
7474
<version>VERSION</version>
7575
</dependency>
7676
<dependency>
77-
<groupId>com.google.auth</groupId>
78-
<artifactId>google-auth-library-oauth2-http</artifactId>
79-
<version>0.4.0</version>
80-
</dependency>
81-
<!-- gRPC dependencies -->
82-
<dependency>
83-
<groupId>io.grpc</groupId>
84-
<artifactId>grpc-netty</artifactId>
85-
<version>1.0.1</version>
86-
</dependency>
87-
<dependency>
88-
<groupId>io.netty</groupId>
89-
<artifactId>netty-tcnative-boringssl-static</artifactId>
90-
<version>1.1.33.Fork23</version>
77+
<groupId>com.google.cloud.trace</groupId>
78+
<artifactId>trace-grpc-api-service</artifactId>
79+
<version>VERSION</version>
9180
</dependency>
9281
</dependencies>
9382
```

guice/api/pom.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

guice/api/src/main/java/com/google/cloud/trace/guice/api/ApiHost.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

guice/api/src/main/java/com/google/cloud/trace/guice/api/ApiHostModule.java

Lines changed: 0 additions & 24 deletions
This file was deleted.

guice/grpc-sink/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
<artifactId>grpc-consumer</artifactId>
2323
<version>${project.version}</version>
2424
</dependency>
25-
<dependency>
26-
<groupId>${project.groupId}</groupId>
27-
<artifactId>guice-api</artifactId>
28-
<version>${project.version}</version>
29-
</dependency>
3025
<dependency>
3126
<groupId>${project.groupId}</groupId>
3227
<artifactId>guice-v1</artifactId>

guice/grpc-sink/src/main/java/com/google/cloud/trace/guice/grpc/v1/GrpcTraceSinkModule.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import com.google.auth.Credentials;
1818
import com.google.cloud.trace.grpc.v1.GrpcTraceConsumer;
19-
import com.google.cloud.trace.guice.api.ApiHost;
2019
import com.google.cloud.trace.guice.v1.ApiTraceSink;
2120
import com.google.cloud.trace.v1.consumer.TraceConsumer;
2221
import com.google.inject.AbstractModule;
@@ -31,8 +30,8 @@ protected void configure() {}
3130
@Provides
3231
@ApiTraceSink
3332
@Singleton
34-
TraceConsumer provideTraceSink(@ApiHost String apiHost, Credentials credentials)
33+
TraceConsumer provideTraceSink(Credentials credentials)
3534
throws IOException {
36-
return GrpcTraceConsumer.create(apiHost, credentials);
35+
return GrpcTraceConsumer.createWithCredentials(credentials);
3736
}
3837
}

guice/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
<modules>
1919
<module>annotation</module>
20-
<module>api</module>
2120
<module>core</module>
2221
<module>google-auth</module>
2322
<module>grpc-sink</module>

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
<properties>
3333
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3434
<grpc.version>1.6.1</grpc.version>
35-
<netty-boringssl.version>2.0.5.Final</netty-boringssl.version>
3635
<google-cloud-trace.version>0.24.0-alpha</google-cloud-trace.version>
3736
<google-auth-library-credentials.version>0.8.0</google-auth-library-credentials.version>
3837
<google-auth-library-oauth2-http.version>0.8.0</google-auth-library-oauth2-http.version>

samples/basic-logging/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,17 @@
3434
<scope>runtime</scope>
3535
</dependency>
3636
</dependencies>
37+
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.codehaus.mojo</groupId>
42+
<artifactId>exec-maven-plugin</artifactId>
43+
<version>1.5.0</version>
44+
<configuration>
45+
<mainClass>com.google.cloud.trace.samples.logging.basic.BasicLogging</mainClass>
46+
</configuration>
47+
</plugin>
48+
</plugins>
49+
</build>
3750
</project>

samples/buffering-grpc/pom.xml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -41,53 +41,10 @@
4141
<artifactId>sink</artifactId>
4242
<version>${project.version}</version>
4343
</dependency>
44-
<dependency>
45-
<groupId>com.google.auth</groupId>
46-
<artifactId>google-auth-library-oauth2-http</artifactId>
47-
<version>${google-auth-library-oauth2-http.version}</version>
48-
</dependency>
49-
50-
<dependency>
51-
<groupId>io.grpc</groupId>
52-
<artifactId>grpc-netty</artifactId>
53-
</dependency>
54-
<dependency>
55-
<groupId>io.netty</groupId>
56-
<artifactId>netty-tcnative-boringssl-static</artifactId>
57-
<version>${netty-boringssl.version}</version>
58-
<classifier>${os.detected.classifier}</classifier>
59-
</dependency>
6044
</dependencies>
6145

6246
<build>
63-
<extensions>
64-
<extension>
65-
<groupId>kr.motd.maven</groupId>
66-
<artifactId>os-maven-plugin</artifactId>
67-
<version>1.5.0.Final</version>
68-
</extension>
69-
</extensions>
7047
<plugins>
71-
<plugin>
72-
<groupId>org.apache.maven.plugins</groupId>
73-
<artifactId>maven-antrun-plugin</artifactId>
74-
<executions>
75-
<execution>
76-
<phase>initialize</phase>
77-
<configuration>
78-
<exportAntProperties>true</exportAntProperties>
79-
<target>
80-
<condition property="tcnative.classifier" value="${os.detected.classifier}-fedora" else="${os.detected.classifier}">
81-
<isset property="os.detected.release.fedora" />
82-
</condition>
83-
</target>
84-
</configuration>
85-
<goals>
86-
<goal>run</goal>
87-
</goals>
88-
</execution>
89-
</executions>
90-
</plugin>
9148
<plugin>
9249
<groupId>org.codehaus.mojo</groupId>
9350
<artifactId>exec-maven-plugin</artifactId>

0 commit comments

Comments
 (0)