Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions java-bigquery/.cloudbuild/scripts/jdbc-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ source .kokoro/common.sh
install_modules java-bigquery

cd ${ROOT_FOLDER}/java-bigquery/google-cloud-bigquery-jdbc
make integration-test test=ITBigQueryJDBCTest
make integration-test test=ITNightlyBigQueryTest
make integration-test test=ITNightlyTests
2 changes: 1 addition & 1 deletion java-bigquery/.cloudbuild/scripts/jdbc-presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ source .kokoro/common.sh
install_modules java-bigquery

cd ${ROOT_FOLDER}/java-bigquery/google-cloud-bigquery-jdbc
make integration-test test=ITBigQueryJDBCTest
make integration-test test=ITPresubmitTests
1 change: 1 addition & 0 deletions java-bigquery/google-cloud-bigquery-jdbc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drivers/
2 changes: 1 addition & 1 deletion java-bigquery/google-cloud-bigquery-jdbc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ integration-test:
-DskipSurefire=$(skipSurefire) \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dit.failIfNoSpecifiedTests=false \
-Dit.failIfNoSpecifiedTests=true \
-Dit.test=$(test) \
integration-test

Expand Down
138 changes: 138 additions & 0 deletions java-bigquery/google-cloud-bigquery-jdbc/pom-it.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery-jdbc-it-standalone</artifactId>
<!-- Use same version as the main project, or generic 1.0-SNAPSHOT -->
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>BigQuery JDBC Standalone IT Tests</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>

<dependencies>
<!-- Include the test classes from the main project -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery-jdbc</artifactId>
<version>0.4.1-SNAPSHOT</version>
<type>test-jar</type>
<scope>compile</scope>
</dependency>

<!-- Console launcher to run tests from command line without maven -->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-console-standalone</artifactId>
<version>1.11.4</version>
<scope>compile</scope>
</dependency>

<!-- Test dependencies are usually test scope, we make them compile here so they get shaded into the jar -->
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>1.4.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.11.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.11.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>4.11.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-api</artifactId>
<version>1.11.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-engine</artifactId>
<version>1.11.4</version>
<scope>compile</scope>
</dependency>
Comment on lines +21 to +85
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Several dependency versions in this file are incorrect and do not exist in Maven Central, which will cause the build to fail. Specifically:

  • google-cloud-bigquery-jdbc: The version is hardcoded to 0.4.1-SNAPSHOT, which is brittle. It's better to use a property that can be updated easily.
  • junit-platform-console-standalone: Version 1.11.4 is incorrect. The latest is 1.10.2.
  • junit-jupiter-* artifacts: Version 5.11.4 is incorrect. The latest is 5.10.2.
  • junit-platform-suite-* artifacts: Version 1.11.4 is incorrect. The latest is 1.10.2.

I recommend defining these versions as properties for consistency and easier maintenance.

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!--
We exclude the main bigquery-jdbc framework classes.
This jar should ONLY contain tests and their dependencies (Junit, Mockito, Truth),
plus the test classes themselves. When running, the ACTUAL JDBC driver jar
will be placed on the classpath.
-->
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<excludes>
<exclude>com.google.cloud:google-cloud-bigquery</exclude>
<exclude>com.google.cloud:google-cloud-bigquerystorage</exclude>
<exclude>io.grpc:*</exclude>
<exclude>com.google.protobuf:*</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/services/java.sql.Driver</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.junit.platform.console.ConsoleLauncher</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
31 changes: 28 additions & 3 deletions java-bigquery/google-cloud-bigquery-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@
<JDBC_TESTS>true</JDBC_TESTS>
</systemPropertyVariables>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>3.5.2</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The version 3.5.2 for surefire-junit-platform is incorrect and does not exist in Maven Central. The latest version for maven-surefire-plugin artifacts is 3.2.5. Using a non-existent version will break the build.

Suggested change
<version>3.5.2</version>
<version>3.2.5</version>

</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
Expand All @@ -78,9 +85,9 @@
<ignoredUsedUndeclaredDependency>io.grpc:*</ignoredUsedUndeclaredDependency>
</ignoredUsedUndeclaredDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version> <!-- Use the latest version -->
<executions>
Expand Down Expand Up @@ -300,6 +307,17 @@
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-api</artifactId>
<version>1.11.4</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The version 1.11.4 for junit-platform-suite-api is incorrect as it doesn't exist in Maven Central. The latest version is 1.10.2. This will cause the build to fail.

Suggested change
<version>1.11.4</version>
<version>1.10.2</version>

<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
Expand All @@ -324,6 +342,13 @@
<argLine>--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<argLine>--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Loading
Loading