Skip to content

Commit

Permalink
deps: remove deps that are already in java-spanner
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Nov 20, 2024
1 parent e6df56a commit c30d590
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 42 deletions.
25 changes: 4 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,41 +200,24 @@
<scope>test</scope>
</dependency>

<!--
Add OpenTelemetry implementation and exporters for use in integration tests.
They are added with compile scope, as the Spanner client requires these, and we do not want to
reduce the scope in the JDBC driver.
-->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-context</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-common</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-trace</artifactId>
</dependency>
<!-- Add OpenTelemetry implementation and exporters for use in integration tests. -->
<dependency>
<groupId>com.google.cloud.opentelemetry</groupId>
<artifactId>exporter-trace</artifactId>
<version>0.32.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-trace</artifactId>
<version>2.52.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-trace-v1</artifactId>
<version>2.52.0</version>
<scope>test</scope>
</dependency>

</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ public void setup() {

@Test
public void testUseSingleJar() throws Exception {
// printDeps();
buildSingleJar();
buildMainClass();
runTestApplication();
}

@Test
public void testUseShadedJar() throws Exception {
// printDeps();
buildShadedJar();
buildMainClass();
runTestApplication();
Expand All @@ -93,12 +91,6 @@ private void runTestApplication() throws Exception {
execute(builder);
}

private void printDeps() throws Exception {
ProcessBuilder builder = new ProcessBuilder();
builder.command("mvn", "dependency:tree");
execute(builder, true);
}

private void buildSingleJar() throws Exception {
ProcessBuilder builder = new ProcessBuilder();
builder.command("mvn", "clean", "package", "-DskipTests", "-Dalt.build.dir=./target/single");
Expand All @@ -124,23 +116,11 @@ private void buildMainClass() throws Exception {
}

private void execute(ProcessBuilder builder) throws Exception {
execute(builder, false);
}

private void execute(ProcessBuilder builder, boolean showOutput) throws Exception {
Process process = builder.start();
String errors, output = "";
String errors;
try (InputStreamReader reader = new InputStreamReader(process.getErrorStream())) {
errors = CharStreams.toString(reader);
}
if (showOutput) {
try (InputStreamReader reader = new InputStreamReader(process.getInputStream())) {
output = CharStreams.toString(reader);
}
}
assertEquals(errors, 0, process.waitFor());
if (showOutput) {
System.out.print(output);
}
}
}

0 comments on commit c30d590

Please sign in to comment.