Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip
4 changes: 2 additions & 2 deletions benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<maven.compiler.release>17</maven.compiler.release>

<jmh.version>1.37</jmh.version>
<junit.bom.version>6.1.2</junit.bom.version>
<junit.bom.version>6.1.3</junit.bom.version>
<assertj.version>3.27.7</assertj.version>
<logback.version>1.6.1</logback.version>
<logback.version>1.6.2</logback.version>

<openhtmltopdf.version>1.0.10</openhtmltopdf.version>
<itext.version>9.7.1</itext.version>
Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@

<!-- Runtime / library dependencies -->
<flexmark.version>0.64.8</flexmark.version>
<logback.version>1.6.1</logback.version>
<logback.version>1.6.2</logback.version>
<lombok.version>1.18.46</lombok.version>
<slf4j.version>2.0.18</slf4j.version>

<!-- Test dependencies -->
<assertj.version>3.27.7</assertj.version>
<junit.bom.version>6.1.2</junit.bom.version>
<junit.bom.version>6.1.3</junit.bom.version>
<mockito.version>5.23.0</mockito.version>
<byteBuddy.version>1.18.11</byteBuddy.version>
<archunit.version>1.5.0</archunit.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,82 @@ private static boolean declaresDependencyOn(Element project, String artifactId)
return false;
}

/**
* Every consumer-smoke default names the release a user can actually resolve.
*
* <p>The harness verifies the published artefacts, and each of its entry points writes
* down which version to verify when the caller names none: the two runner scripts, the
* workflow input, and the {@code <gc.version>} each consumer pom falls back to. The
* runners always pass one, so the poms' copy decides nothing on a normal run — which is
* how it sat two releases behind the rest without a single run going red, until
* Dependabot opened a pull request to move it.</p>
*
* <p>Read out of the files rather than compared against a constant here, and held to
* {@link #acceptableTargets()} — the same published-release rule the install snippets
* follow. A default naming a version nobody can download would have the gate verify a
* release that does not exist; one naming an older release has it report green for the
* release before, which is the failure a release gate must not have.</p>
*/
@Test
void everyConsumerSmokeDefaultNamesThePublishedRelease() throws Exception {
Set<String> targets = acceptableTargets();
Map<String, String> defaults = new LinkedHashMap<>();

defaults.put("scripts/release-smoke/run.sh",
declaredVersion("scripts/release-smoke/run.sh",
"(?m)^GC_VERSION=\"([\\w.\\-]+)\""));
defaults.put("scripts/release-smoke/run.ps1",
declaredVersion("scripts/release-smoke/run.ps1",
"\\[string]\\$Version = '([\\w.\\-]+)'"));
defaults.put(".github/workflows/release-smoke.yml",
declaredVersion(".github/workflows/release-smoke.yml",
"(?m)^\\s+default: '([\\w.\\-]+)'"));

List<Path> consumers = consumerProjects();
assertThat(consumers)
.describedAs("no consumer-smoke project under scripts/release-smoke: the harness "
+ "this guards would be verifying nothing")
.isNotEmpty();
for (Path pom : consumers) {
String relative = PROJECT_ROOT.relativize(pom).toString().replace('\\', '/');
defaults.put(relative,
declaredVersion(relative, "<gc\\.version>([\\w.\\-]+)</gc\\.version>"));
}

assertThat(defaults)
.describedAs("each consumer-smoke default must name the published release %s: a "
+ "run that accepts the prefilled value would otherwise verify a version "
+ "nobody can resolve, or the release before this one", targets)
.allSatisfy((where, version) -> assertThat(version)
.describedAs("%s", where)
.isIn(targets));
}

/** The consumer projects, found rather than listed: one arrives per published coordinate. */
private static List<Path> consumerProjects() throws IOException {
Path root = PROJECT_ROOT.resolve("scripts/release-smoke");
if (!Files.isDirectory(root)) {
return List.of();
}
try (Stream<Path> entries = Files.list(root)) {
return entries.map(entry -> entry.resolve("pom.xml"))
.filter(Files::isRegularFile)
.sorted()
.toList();
}
}

/** The one version a file declares, or a failure naming the file that stopped declaring it. */
private static String declaredVersion(String relativePath, String pattern) throws IOException {
Matcher declared = Pattern.compile(pattern)
.matcher(Files.readString(PROJECT_ROOT.resolve(relativePath)));
assertThat(declared.find())
.describedAs("%s no longer declares a smoke version matching %s — the release step "
+ "that moves it would silently skip the file", relativePath, pattern)
.isTrue();
return declared.group(1);
}

private static Element directChild(Element parent, String name) {
NodeList children = parent.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Expand Down
4 changes: 2 additions & 2 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<properties>
<graphcompose.version>${project.version}</graphcompose.version>
<logback.version>1.6.1</logback.version>
<logback.version>1.6.2</logback.version>
<maven.compiler.release>17</maven.compiler.release>

<!--
Expand All @@ -45,7 +45,7 @@
-->
<graphcompose.examples.renderDate>2026-01-15</graphcompose.examples.renderDate>

<junit.bom.version>6.1.2</junit.bom.version>
<junit.bom.version>6.1.3</junit.bom.version>
<assertj.version>3.27.7</assertj.version>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions qa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
<maven.surefire.plugin.version>3.5.6</maven.surefire.plugin.version>

<jackson.bom.version>2.22.1</jackson.bom.version>
<junit.bom.version>6.1.2</junit.bom.version>
<junit.bom.version>6.1.3</junit.bom.version>
<assertj.version>3.27.7</assertj.version>
<mockito.version>5.23.0</mockito.version>
<logback.version>1.6.1</logback.version>
<logback.version>1.6.2</logback.version>
<pdfbox.version>3.0.8</pdfbox.version>
<javafx.version>21.0.12</javafx.version>
<!-- ArchUnit for the cross-module boundary guards below. Roughly in step
Expand Down
4 changes: 2 additions & 2 deletions render-docx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
<maven.compiler.release>17</maven.compiler.release>

<poi.version>5.5.1</poi.version>
<junit.bom.version>6.1.2</junit.bom.version>
<junit.bom.version>6.1.3</junit.bom.version>
<assertj.version>3.27.7</assertj.version>
<logback.version>1.6.1</logback.version>
<logback.version>1.6.2</logback.version>
<graphcompose.fonts.version>1.1.0</graphcompose.fonts.version>
<graphcompose.emoji.version>1.0.0</graphcompose.emoji.version>

Expand Down
4 changes: 2 additions & 2 deletions render-pdf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
<pdfbox.version>3.0.8</pdfbox.version>
<zxing.version>3.5.4</zxing.version>
<slf4j.version>2.0.18</slf4j.version>
<junit.bom.version>6.1.2</junit.bom.version>
<junit.bom.version>6.1.3</junit.bom.version>
<assertj.version>3.27.7</assertj.version>
<mockito.version>5.23.0</mockito.version>
<logback.version>1.6.1</logback.version>
<logback.version>1.6.2</logback.version>
<graphcompose.fonts.version>1.1.0</graphcompose.fonts.version>
<graphcompose.emoji.version>1.0.0</graphcompose.emoji.version>

Expand Down
4 changes: 2 additions & 2 deletions render-pptx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
<!-- Keep in lockstep with render-pdf/pom.xml: a drift would mix fontbox
and pdfbox versions at runtime (the direct fontbox wins mediation). -->
<pdfbox.version>3.0.8</pdfbox.version>
<junit.bom.version>6.1.2</junit.bom.version>
<junit.bom.version>6.1.3</junit.bom.version>
<assertj.version>3.27.7</assertj.version>
<logback.version>1.6.1</logback.version>
<logback.version>1.6.2</logback.version>
<graphcompose.fonts.version>1.1.0</graphcompose.fonts.version>

<maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version>
Expand Down
23 changes: 23 additions & 0 deletions scripts/cut-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,16 @@ function Update-ReleaseSmokeDefaultVersion($repoRoot, $newVersion) {
# re-verifies the PREVIOUS release and reports green — the one failure mode a
# release gate must not have. Each pattern is anchored to its own construct so
# a bump cannot smear across unrelated version strings in the same file.
#
# The consumer projects carry that default a second time, in the <gc.version>
# each pom falls back to when the runner passes none. Every runner does pass one,
# so the fallback decides nothing on a normal run — which is why it sat two
# releases behind until Dependabot opened a PR to move it. It is still a published
# version written down in the repository, so it moves with the release.
#
# Found rather than listed: the projects are one per published coordinate
# combination, so the set grows when a coordinate does, and a list here would be a
# second place to remember that.
$targets = @(
@{ Path = 'scripts/release-smoke/run.sh'; Pattern = '(?<=^GC_VERSION=")[\w\.\-]+(?=")'; Label = 'run.sh default' },
@{ Path = 'scripts/release-smoke/run.sh'; Pattern = '(?<=tests gc\.version=)[\w\.\-]+'; Label = 'run.sh usage' },
Expand All @@ -785,6 +795,19 @@ function Update-ReleaseSmokeDefaultVersion($repoRoot, $newVersion) {
@{ Path = 'scripts/release-smoke/README.md'; Pattern = '(?<=defaults to the current published release \(`)[\w\.\-]+(?=`\))'; Label = 'README prose' }
)

$consumerRoot = Join-Path $repoRoot 'scripts/release-smoke'
if (Test-Path $consumerRoot) {
foreach ($project in Get-ChildItem $consumerRoot -Directory | Sort-Object Name) {
if (Test-Path (Join-Path $project.FullName 'pom.xml')) {
$targets += @{
Path = "scripts/release-smoke/$($project.Name)/pom.xml"
Pattern = '(?<=<gc\.version>)[\w\.\-]+(?=</gc\.version>)'
Label = "$($project.Name) fallback"
}
}
}
}

foreach ($target in $targets) {
$path = Join-Path $repoRoot $target.Path
if (-not (Test-Path $path)) {
Expand Down
6 changes: 3 additions & 3 deletions scripts/release-smoke/s1-graph-compose/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<gc.version>2.0.0</gc.version>
<junit.version>5.11.4</junit.version>
<gc.version>2.2.0</gc.version>
<junit.version>6.1.3</junit.version>
<assertj.version>3.27.7</assertj.version>
<surefire.version>3.5.2</surefire.version>
<surefire.version>3.5.6</surefire.version>
</properties>

<dependencies>
Expand Down
8 changes: 4 additions & 4 deletions scripts/release-smoke/s2-core-only/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<gc.version>2.0.0</gc.version>
<junit.version>5.11.4</junit.version>
<gc.version>2.2.0</gc.version>
<junit.version>6.1.3</junit.version>
<assertj.version>3.27.7</assertj.version>
<surefire.version>3.5.2</surefire.version>
<enforcer.version>3.5.0</enforcer.version>
<surefire.version>3.5.6</surefire.version>
<enforcer.version>3.6.3</enforcer.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions scripts/release-smoke/s3-core-render-pdf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<gc.version>2.0.0</gc.version>
<junit.version>5.11.4</junit.version>
<gc.version>2.2.0</gc.version>
<junit.version>6.1.3</junit.version>
<assertj.version>3.27.7</assertj.version>
<surefire.version>3.5.2</surefire.version>
<surefire.version>3.5.6</surefire.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions scripts/release-smoke/s4-templates/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<gc.version>2.0.0</gc.version>
<junit.version>5.11.4</junit.version>
<gc.version>2.2.0</gc.version>
<junit.version>6.1.3</junit.version>
<assertj.version>3.27.7</assertj.version>
<surefire.version>3.5.2</surefire.version>
<surefire.version>3.5.6</surefire.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions scripts/release-smoke/s5-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<gc.version>2.0.0</gc.version>
<junit.version>5.11.4</junit.version>
<gc.version>2.2.0</gc.version>
<junit.version>6.1.3</junit.version>
<assertj.version>3.27.7</assertj.version>
<surefire.version>3.5.2</surefire.version>
<surefire.version>3.5.6</surefire.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions scripts/release-smoke/s6-bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<gc.version>2.0.0</gc.version>
<junit.version>5.11.4</junit.version>
<gc.version>2.2.0</gc.version>
<junit.version>6.1.3</junit.version>
<assertj.version>3.27.7</assertj.version>
<surefire.version>3.5.2</surefire.version>
<surefire.version>3.5.6</surefire.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions scripts/release-smoke/s7-core-render-pptx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<gc.version>2.0.0</gc.version>
<junit.version>5.11.4</junit.version>
<gc.version>2.2.0</gc.version>
<junit.version>6.1.3</junit.version>
<assertj.version>3.27.7</assertj.version>
<surefire.version>3.5.2</surefire.version>
<surefire.version>3.5.6</surefire.version>
</properties>

<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions scripts/release-smoke/s8-core-render-docx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
<gc.version>2.0.0</gc.version>
<junit.version>5.11.4</junit.version>
<gc.version>2.2.0</gc.version>
<junit.version>6.1.3</junit.version>
<assertj.version>3.27.7</assertj.version>
<surefire.version>3.5.2</surefire.version>
<surefire.version>3.5.6</surefire.version>
</properties>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions templates/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
<maven.compiler.release>17</maven.compiler.release>

<lombok.version>1.18.46</lombok.version>
<junit.bom.version>6.1.2</junit.bom.version>
<junit.bom.version>6.1.3</junit.bom.version>
<assertj.version>3.27.7</assertj.version>
<logback.version>1.6.1</logback.version>
<logback.version>1.6.2</logback.version>

<maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version>
<maven.jar.plugin.version>3.5.1</maven.jar.plugin.version>
Expand Down
4 changes: 2 additions & 2 deletions testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@

<pdfbox.version>3.0.8</pdfbox.version>
<jackson.bom.version>2.22.1</jackson.bom.version>
<junit.bom.version>6.1.2</junit.bom.version>
<junit.bom.version>6.1.3</junit.bom.version>
<assertj.version>3.27.7</assertj.version>
<logback.version>1.6.1</logback.version>
<logback.version>1.6.2</logback.version>

<maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version>
<maven.jar.plugin.version>3.5.1</maven.jar.plugin.version>
Expand Down
Loading