Skip to content

Commit 235d1d0

Browse files
ctruedenclaude
andcommitted
release-version.sh: handle sibling version properties without dependencies
A module may define <artifactId>.version for a sibling module it does not depend on directly, to override the version of a transitive dependency managed by pom-scijava. Such properties were neither pinned to releases nor updated to new development versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d5cdeea commit 235d1d0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎release-version.sh‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ pom_artifactId() {
5050

5151
# Prints the names of properties used as the version of the given artifactId
5252
# in the given POM. E.g., <version>${scijava-meta.version}</version>.
53+
# Also prints the <artifactId>.version property when the POM defines it, even
54+
# without a direct dependency, since it may override the version of a
55+
# transitive dependency managed by pom-scijava.
5356
# Note: This assumes the artifactId element precedes the version element.
5457
pom_versionProperties() {
5558
awk -v artifactId="$2" '
@@ -59,6 +62,9 @@ pom_versionProperties() {
5962
a == artifactId && /<version>\$\{[^}]*\}<\/version>/ {
6063
p = $0; sub(/.*<version>\$\{/, "", p); sub(/\}<\/version>.*/, "", p); print p
6164
}
65+
index($0, "<" artifactId ".version>") {
66+
print artifactId ".version"
67+
}
6268
' "$1" | sort -u
6369
}
6470

0 commit comments

Comments
 (0)