|
14 | 14 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
15 | 15 | <maven.compiler.source>8</maven.compiler.source> |
16 | 16 | <maven.compiler.target>8</maven.compiler.target> |
| 17 | + <bigquery-jdbc.version>1.2.0-SNAPSHOT</bigquery-jdbc.version><!-- {x-version-update:google-cloud-bigquery-jdbc:current} --> |
17 | 18 | </properties> |
18 | 19 |
|
19 | 20 | <dependencies> |
20 | 21 | <!-- Include the test classes from the main project --> |
21 | 22 | <dependency> |
22 | 23 | <groupId>com.google.cloud</groupId> |
23 | 24 | <artifactId>google-cloud-bigquery-jdbc</artifactId> |
24 | | - <version>1.0.0</version><!-- {x-version-update:google-cloud-bigquery-jdbc:current} --> |
| 25 | + <version>${bigquery-jdbc.version}</version> |
25 | 26 | <type>test-jar</type> |
26 | 27 | <scope>compile</scope> |
27 | 28 | </dependency> |
|
88 | 89 | <build> |
89 | 90 | <directory>target-it</directory> |
90 | 91 | <plugins> |
| 92 | + <plugin> |
| 93 | + <groupId>org.apache.maven.plugins</groupId> |
| 94 | + <artifactId>maven-compiler-plugin</artifactId> |
| 95 | + <executions> |
| 96 | + <execution> |
| 97 | + <id>default-compile</id> |
| 98 | + <phase>none</phase> |
| 99 | + </execution> |
| 100 | + <execution> |
| 101 | + <id>default-testCompile</id> |
| 102 | + <phase>none</phase> |
| 103 | + </execution> |
| 104 | + </executions> |
| 105 | + </plugin> |
91 | 106 | <plugin> |
92 | 107 | <groupId>org.apache.maven.plugins</groupId> |
93 | 108 | <artifactId>maven-shade-plugin</artifactId> |
|
99 | 114 | <goal>shade</goal> |
100 | 115 | </goals> |
101 | 116 | <configuration> |
102 | | - <!-- |
103 | | - We exclude the main bigquery-jdbc framework classes. |
104 | | - This jar should ONLY contain tests and their dependencies (Junit, Mockito, Truth), |
105 | | - plus the test classes themselves. When running, the ACTUAL JDBC driver jar |
106 | | - will be placed on the classpath. |
107 | | - --> |
108 | 117 | <createDependencyReducedPom>false</createDependencyReducedPom> |
109 | | - <artifactSet> |
110 | | - <excludes> |
111 | | - <exclude>com.google.cloud:google-cloud-bigquery</exclude> |
112 | | - <exclude>com.google.cloud:google-cloud-bigquerystorage</exclude> |
113 | | - <exclude>io.grpc:*</exclude> |
114 | | - <exclude>com.google.protobuf:*</exclude> |
115 | | - </excludes> |
116 | | - </artifactSet> |
| 118 | + <!-- Shading everything except junit & integration tests to avoid version conflicts --> |
| 119 | + <relocations> |
| 120 | + <relocation> |
| 121 | + <pattern>com.</pattern> |
| 122 | + <shadedPattern>com.google.bqjdbc.shaded.com.</shadedPattern> |
| 123 | + <excludes>com.google.cloud.bigquery.jdbc.it.**</excludes> |
| 124 | + </relocation> |
| 125 | + <relocation> |
| 126 | + <pattern>org.</pattern> |
| 127 | + <shadedPattern>com.google.bqjdbc.shaded.org.</shadedPattern> |
| 128 | + <excludes> |
| 129 | + <exclude>org.junit.**</exclude> |
| 130 | + </excludes> |
| 131 | + </relocation> |
| 132 | + <relocation> |
| 133 | + <pattern>io.</pattern> |
| 134 | + <shadedPattern>com.google.bqjdbc.shaded.io.</shadedPattern> |
| 135 | + </relocation> |
| 136 | + </relocations> |
117 | 137 | <filters> |
118 | 138 | <filter> |
119 | 139 | <artifact>*:*</artifact> |
|
0 commit comments