-
Notifications
You must be signed in to change notification settings - Fork 134
chore(jdbc): standalone jar to run driver-agnostic tests #4132
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
base: main
Are you sure you want to change the base?
Changes from all commits
7882f56
48c9a31
5cb4d54
e99dfff
7b95c93
3c48e02
3a74c0c
7743dfe
448e7dc
1e9d94d
bd6faea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| <?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> | ||
| <parent> | ||
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>google-cloud-bigquery-parent</artifactId> | ||
| <version>2.60.0</version> | ||
| <relativePath>../pom.xml</relativePath> | ||
| </parent> | ||
|
Comment on lines
+4
to
+9
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The parent POM configuration has a couple of issues:
It's recommended to align the parent configuration with the main |
||
|
|
||
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>google-cloud-bigquery-jdbc-it</artifactId> | ||
| <version>0.4.0</version> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| <name>BigQuery JDBC IT Assembly</name> | ||
| <packaging>pom</packaging> | ||
|
|
||
| <properties> | ||
| <animal.sniffer.skip>true</animal.sniffer.skip> | ||
| <checkstyle.skip>true</checkstyle.skip> | ||
| <enforcer.skip>true</enforcer.skip> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>google-cloud-bigquery-jdbc</artifactId> | ||
| <version>0.4.0</version> | ||
| <type>test-jar</type> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>google-cloud-bigquery-jdbc</artifactId> | ||
| <version>0.4.0</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
Comment on lines
+24
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are a couple of issues with these dependencies:
|
||
| <dependency> | ||
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>google-cloud-bigquery</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.google.cloud</groupId> | ||
| <artifactId>google-cloud-bigquerystorage</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>junit</groupId> | ||
| <artifactId>junit</artifactId> | ||
| <version>4.13.2</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.google.truth</groupId> | ||
| <artifactId>truth</artifactId> | ||
| <version>1.1.3</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.mockito</groupId> | ||
| <artifactId>mockito-core</artifactId> | ||
| <version>4.11.0</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <directory>target-it</directory> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-assembly-plugin</artifactId> | ||
| <version>3.6.0</version> | ||
| <executions> | ||
| <execution> | ||
| <id>make-test-assembly</id> | ||
| <phase>package</phase> | ||
| <goals> | ||
| <goal>single</goal> | ||
| </goals> | ||
| <configuration> | ||
| <descriptors> | ||
| <descriptor>src/assembly/test-assembly.xml</descriptor> | ||
| </descriptors> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.1" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.1 http://maven.apache.org/xsd/assembly-2.1.1.xsd"> | ||
| <id>standalone</id> | ||
| <formats> | ||
| <format>jar</format> | ||
| </formats> | ||
| <includeBaseDirectory>false</includeBaseDirectory> | ||
|
|
||
| <dependencySets> | ||
| <dependencySet> | ||
| <outputDirectory>/</outputDirectory> | ||
| <useProjectArtifact>false</useProjectArtifact> | ||
| <unpack>true</unpack> | ||
| <scope>test</scope> | ||
| <excludes> | ||
| <exclude>com.google.cloud:google-cloud-bigquery-jdbc:jar</exclude> | ||
| </excludes> | ||
| <unpackOptions> | ||
| <excludes> | ||
| <exclude>META-INF/*.SF</exclude> | ||
| <exclude>META-INF/*.DSA</exclude> | ||
| <exclude>META-INF/*.RSA</exclude> | ||
| <exclude>META-INF/*.MF</exclude> | ||
| </excludes> | ||
| </unpackOptions> | ||
| </dependencySet> | ||
| </dependencySets> | ||
| </assembly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The versions for
DRIVER_JARandSTANDALONE_JARare hardcoded. This will require manual updates whenever the project version changes, making it brittle. It would be more robust to determine these versions dynamically from thepom.xmlfiles. You can usemvn help:evaluatefor this, similar to howBUILD_DIRis determined elsewhere in this file.