Skip to content

Commit e3328ef

Browse files
authored
chore: Add build.sh deps to update maven deps to latest. (#2184)
This will enable us to run build.sh deps to update all of the maven dependencies to an appropriate latest version. Some special code was added to ensure that special dependencies are updated appropriately: - guava should only use the "-jre" variant - sqladmin api should use the "v1beta4-" variant - mssql should use the '.jdk8' variant - netty should be pinned at 4.1.x due to a TLS incompatibility in version 4.2 and higher.
1 parent 7fb819f commit e3328ef

File tree

2 files changed

+102
-11
lines changed

2 files changed

+102
-11
lines changed

build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ function lint() {
6969
}
7070

7171

72+
## deps - updates dependencies to the latest version
73+
function deps() {
74+
mvn versions:use-latest-versions
75+
find . -name 'pom.xml.versionsBackup' -print0 | xargs -0 rm -f
76+
}
77+
78+
7279
# write_e2e_env - Loads secrets from the gcloud project and writes
7380
# them to target/e2e.env to run e2e tests.
7481
#

pom.xml

Lines changed: 95 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@
7777
<properties>
7878
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
7979
<javac.version>9+181-r4173-1</javac.version>
80-
<graal-sdk.version>24.2.1</graal-sdk.version>
81-
<netty.version>4.1.119.Final</netty.version>
82-
<ow2-asm.version>9.8</ow2-asm.version>
83-
<errorprone.version>2.41.0</errorprone.version>
8480
<assembly.skipAssembly>true</assembly.skipAssembly>
8581
</properties>
8682

@@ -89,22 +85,22 @@
8985
<dependency>
9086
<groupId>org.ow2.asm</groupId>
9187
<artifactId>asm</artifactId>
92-
<version>${ow2-asm.version}</version>
88+
<version>9.8</version>
9389
</dependency>
9490
<dependency>
9591
<groupId>org.ow2.asm</groupId>
9692
<artifactId>asm-tree</artifactId>
97-
<version>${ow2-asm.version}</version>
93+
<version>9.8</version>
9894
</dependency>
9995
<dependency>
10096
<groupId>org.ow2.asm</groupId>
10197
<artifactId>asm-analysis</artifactId>
102-
<version>${ow2-asm.version}</version>
98+
<version>9.8</version>
10399
</dependency>
104100
<dependency>
105101
<groupId>org.ow2.asm</groupId>
106102
<artifactId>asm-util</artifactId>
107-
<version>${ow2-asm.version}</version>
103+
<version>9.8</version>
108104
</dependency>
109105
<dependency>
110106
<groupId>com.google.auto.value</groupId>
@@ -189,7 +185,7 @@
189185
<dependency>
190186
<groupId>com.google.errorprone</groupId>
191187
<artifactId>error_prone_annotations</artifactId>
192-
<version>${errorprone.version}</version>
188+
<version>2.41.0</version>
193189
</dependency>
194190
<dependency>
195191
<groupId>com.github.jnr</groupId>
@@ -365,12 +361,100 @@
365361
</extension>
366362
</extensions>
367363

364+
<pluginManagement>
365+
<plugins>
366+
<plugin>
367+
<groupId>org.codehaus.mojo</groupId>
368+
<artifactId>versions-maven-plugin</artifactId>
369+
<version>2.18.0</version>
370+
<configuration>
371+
<ruleSet>
372+
<ignoreVersions>
373+
<ignoreVersion>
374+
<type>regex</type>
375+
<version>(.+-SNAPSHOT|.+-M\d)</version>
376+
</ignoreVersion>
377+
<ignoreVersion>
378+
<type>regex</type>
379+
<version>.+-(alpha|beta|preview).*</version>
380+
</ignoreVersion>
381+
</ignoreVersions>
382+
<rules>
383+
<rule>
384+
<!-- Always use google-api-services-sqladmin v1beta4-... versions -->
385+
<groupId>com.google.apis</groupId>
386+
<artifactId>google-api-services-sqladmin</artifactId>
387+
<ignoreVersion>
388+
<type>regex</type>
389+
<version>v1-.+</version>
390+
</ignoreVersion>
391+
</rule>
392+
<rule>
393+
<!-- Always Ignore netty versions > 4.1 -->
394+
<groupId>io.netty</groupId>
395+
<ignoreVersion>
396+
<type>range</type>
397+
<version>[4.2.0.Alpha,)</version>
398+
</ignoreVersion>
399+
<ignoreVersion>
400+
<type>regex</type>
401+
<version>.+\.(RC|Alpha|Beta).*</version>
402+
</ignoreVersion>
403+
</rule>
404+
<rule>
405+
<!-- Logback 1.3.x supports jdk8 -->
406+
<groupId>ch.qos.logback</groupId>
407+
<ignoreVersion>
408+
<type>range</type>
409+
<version>[1.4.0,)</version>
410+
</ignoreVersion>
411+
</rule>
412+
<rule>
413+
<!-- Hikari 4.x supports jdk8 -->
414+
<groupId>com.zaxxer</groupId>
415+
<artifactId>HikariCP</artifactId>
416+
<ignoreVersion>
417+
<type>range</type>
418+
<version>[5,)</version>
419+
</ignoreVersion>
420+
</rule>
421+
<rule>
422+
<!-- Always use guava -jre variant -->
423+
<groupId>com.google.guava</groupId>
424+
<artifactId>guava</artifactId>
425+
<ignoreVersions>
426+
<ignoreVersion>
427+
<type>regex</type>
428+
<version>^\d+\.\d+\.\d+(-(?!jre).+)?$</version>
429+
</ignoreVersion>
430+
</ignoreVersions>
431+
</rule>
432+
<rule>
433+
<!-- Always use mssql -jre8 variant -->
434+
<groupId>com.microsoft.sqlserver</groupId>
435+
<artifactId>mssql-jdbc</artifactId>
436+
<ignoreVersions>
437+
<ignoreVersion>
438+
<type>regex</type>
439+
<version>^\d+\.\d+\.\d+(\.(?!jre8).+)?$</version>
440+
</ignoreVersion>
441+
<ignoreVersion>
442+
<type>regex</type>
443+
<version>.+-preview</version>
444+
</ignoreVersion>
445+
</ignoreVersions>
446+
</rule>
447+
</rules>
448+
</ruleSet>
449+
</configuration>
450+
</plugin>
451+
</plugins>
452+
</pluginManagement>
368453
<plugins>
369454

370455
<plugin>
371456
<groupId>org.codehaus.mojo</groupId>
372457
<artifactId>versions-maven-plugin</artifactId>
373-
<version>2.18.0</version>
374458
</plugin>
375459

376460
<plugin>
@@ -437,7 +521,7 @@
437521
<path>
438522
<groupId>com.google.errorprone</groupId>
439523
<artifactId>error_prone_core</artifactId>
440-
<version>${errorprone.version}</version>
524+
<version>2.41.0</version>
441525
</path>
442526
</annotationProcessorPaths>
443527
<failOnWarning>true</failOnWarning>

0 commit comments

Comments
 (0)