Skip to content

Commit 380d937

Browse files
committed
chore: Update test dependency script
1 parent 5e3dfd2 commit 380d937

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/scripts/test_dependency_compatibility.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020
# The default upper-bound dependencies file is `dependencies.txt` located in the root
2121
# of sdk-platform-java. The upper-bound dependencies file will be in the format of:
22-
# ${dependency.name}=${dependency.version}
22+
# {groupId}:{artifactId}={version} or {artifactId}={version}
2323

2424
set -ex
2525

@@ -36,7 +36,10 @@ function add_dependency_to_maven_command() {
3636
echo "Malformed dependency string: ${dep_pair}. Expected format: dependency=version"
3737
exit 1
3838
fi
39-
local dependency=$(echo "${dep_pair}" | cut -d'=' -f1 | tr -d '[:space:]')
39+
local full_dependency=$(echo "${dep_pair}" | cut -d'=' -f1 | tr -d '[:space:]')
40+
# The dependency can be in the format of {groupId}:{artifactId} or {artifactId}
41+
# We only want the artifactId
42+
local dependency=$(echo "${full_dependency}" | awk -F':' '{print $NF}')
4043
local version=$(echo "${dep_pair}" | cut -d'=' -f2 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
4144
MAVEN_COMMAND+=" -D${dependency}.version=${version}"
4245
}

dependencies.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ com.fasterxml.jackson:jackson-bom=2.19.2
3333
commons-codec:commons-codec=1.19.0
3434
org.apache.httpcomponents:httpclient=4.5.14
3535
org.apache.httpcomponents:httpcore=4.4.16
36-
org.apache.httpcomponents.client5:httpclient5-5=5.5
36+
org.apache.httpcomponents.client5:httpclient5=5.5
3737
org.apache.httpcomponents.core5:httpcore5=5.3.4
3838
io.perfmark:perfmark-api=0.27.0
3939
# Note: This is the google opentelemetry exporter and not the general opentelemetry project

java-shared-dependencies/third-party-dependencies/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<commons-codec.version>1.18.0</commons-codec.version>
3333
<httpcore.version>4.4.16</httpcore.version>
3434
<httpclient.version>4.5.14</httpclient.version>
35-
<httpclient5-5.version>5.3.1</httpclient5-5.version>
3635
<httpcore5.version>5.2.5</httpcore5.version>
36+
<httpclient5.version>5.3.1</httpclient5.version>
3737
<!-- ensure checker-qual version matches what Guava uses -->
3838
<checker-qual.version>3.49.0</checker-qual.version>
3939
<perfmark-api.version>0.27.0</perfmark-api.version>
@@ -83,7 +83,7 @@
8383
<dependency>
8484
<groupId>org.apache.httpcomponents.client5</groupId>
8585
<artifactId>httpclient5</artifactId>
86-
<version>${httpclient5-5.version}</version>
86+
<version>${httpclient5.version}</version>
8787
</dependency>
8888
<dependency>
8989
<groupId>org.threeten</groupId>

0 commit comments

Comments
 (0)