Skip to content

Scope the xchart-demo test skip to the release build#1014

Merged
timmolter merged 1 commit into
issue-594-demo-classpath-scan-space-in-pathfrom
enable-demo-module-tests
Jul 20, 2026
Merged

Scope the xchart-demo test skip to the release build#1014
timmolter merged 1 commit into
issue-594-demo-classpath-scan-space-in-pathfrom
enable-demo-module-tests

Conversation

@timmolter

Copy link
Copy Markdown
Member

Follow-up to #1013, which surfaced this. Based on that branch — merge #1013 first, and GitHub will retarget this to develop automatically.

Problem

xchart-demo/pom.xml set maven.test.skip=true as a module-wide property. The intent (per the comment, added in f0936f8) was narrow: stop release:prepare's clean verify subprocess from compiling tests. The effect was broad — the module's 81 tests never ran in any build, including CI. Neither workflow overrides the property, so mvn clean verify on a PR silently skipped the whole module.

That is precisely how DemoChartsTest got to sit broken. It stopped compiling on 2026-05-22 when the ToolTips constructor gained parameters — one day after the skip landed. Nothing was there to catch it.

Change

Move the skip into a profile activated by a property, and have the release plugin pass that property to its forked builds:

<!-- xchart-demo/pom.xml -->
<profile>
  <id>skip-demo-tests</id>
  <activation><property><name>skipDemoTests</name></property></activation>
  <properties><maven.test.skip>true</maven.test.skip></properties>
</profile>
<!-- pom.xml, maven-release-plugin -->
<arguments>-DskipDemoTests=true</arguments>

release:prepare behaves exactly as it does today. Every other build runs the tests.

I deliberately did not reach for <arguments>-Dmaven.test.skip=true</arguments> on its own, since that would skip the xchart module's 154 tests during release too — a weaker release gate than what's in place now.

Verification

Both directions, plus the exact command CI runs:

mvn -pl xchart-demo test                      → Tests run: 81, Failures: 0, Errors: 0
mvn -pl xchart-demo test -DskipDemoTests=true → Tests are skipped.  BUILD SUCCESS

mvn clean verify -Dmaven.javadoc.skip=true -Dfmt.skip=true
  xchart      → Tests run: 154, Failures: 0, Errors: 0
  xchart-demo → Tests run: 81,  Failures: 0, Errors: 0
  BUILD SUCCESS

Since this newly exposes 80 rendering tests to CI, I also ran them under -Djava.awt.headless=true: all 81 pass. (DateChart01 was already excluded in SKIPPED_EXAMPLE_CHARTS for headless reasons.)

One thing I could not verify: I have no way to run an actual release:prepare here, so the release path is reasoned from the plugin's arguments semantics and the property-activation test above rather than observed end to end. Worth a dry run before the next release.

🤖 Generated with Claude Code

xchart-demo set maven.test.skip=true as a module property to keep
release:prepare's clean verify subprocess from compiling tests. That
also disabled the module's tests everywhere else, including CI, so its
81 tests never ran on push or pull request - which is how DemoChartsTest
was able to stop compiling without anyone noticing.

Move the skip into a profile activated by -DskipDemoTests, and have the
release plugin pass that property to its forked builds. release:prepare
behaves exactly as before; every other build now runs the tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@timmolter
timmolter merged commit 6e2adf7 into issue-594-demo-classpath-scan-space-in-path Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant