Skip to content

Move the example XML files to beast-base/examples and beast-fx/examples - #243

Merged
walterxie merged 1 commit into
masterfrom
fix/examples-top-level
Nov 11, 2026
Merged

walterxie merged 1 commit into
masterfrom
fix/examples-top-level

Conversation

@alexeid

@alexeid alexeid commented Nov 10, 2026

Copy link
Copy Markdown
Member

Fixes #241.

What changes

The example XML files move to the top of their modules, as the BEAUti templates did in #238:

Before After
beast-base/src/test/resources/beast.base/examples/ beast-base/examples/
beast-fx/src/test/resources/beast.fx/examples/ beast-fx/examples/

Each folder moves as a whole, including the legacy/ and beast2vs1/ subfolders used by the tests. This is the layout of the examples/ folder in BEAST 2.

Two notes that were in the beast-base examples folder (the migration report and the to-do list of #204) move to scripts/, so that the folder holds only examples and test XML.

How

  • beast-base/pom.xml and beast-fx/pom.xml declare examples/ as a test resource with the target path the tests already use (beast.base/examples, beast.fx/examples). No test changes.
  • The step in beast-fx/pom.xml that copies the beast-base examples into its test classes reads from beast-base/examples.
  • Both package.xml assemblies read from the new folders. They select the same files as before (top-level XML and JSON, nexus/, fasta/), so legacy/ and beast2vs1/ are still not released.
  • Docs: README.md, the READMEs in the examples folders, release/Mac/README.md, release/Linux/README.md, a table in scripts/spec-namespace-test-resources.md and one path in the PackageManager javadoc.

Checks

Compared with a clean build of master:

  • The file listings of BEAST.base.package.*.zip and BEAST.app.package.*.zip are identical.
  • The file listings of the beast-base and beast-fx JARs are identical.
  • target/test-classes of both modules is identical except for the two notes, which are no longer copied in.

mvn test on all modules: beast-pkgmgmt 47, beast-base 605, beast-fx 76 tests, no failures.

Not checked: the release scripts for the three platforms run end to end (they take the examples from the package zips, which are unchanged), and importing the project in Eclipse.

The examples were in beast-base/src/test/resources/beast.base/examples and
beast-fx/src/test/resources/beast.fx/examples, which is hard to find. Each
folder moves to the top of its module as a whole, including the legacy/ and
beast2vs1/ subfolders used by the tests.

Each pom maps its examples folder to the resource path the tests already use
(beast.base/examples, beast.fx/examples), and the package assemblies read from
the new folders, so the test class path and the package zips are unchanged.

The migration report and the to-do list of #204 move from the examples folder
to scripts/.
@alexeid
alexeid requested a review from walterxie November 10, 2026 22:27
@walterxie
walterxie merged commit f684b7d into master Nov 11, 2026
1 check passed
@walterxie
walterxie deleted the fix/examples-top-level branch November 11, 2026 02:57
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.

Example XML files are hard to find: move them to beast-base/examples and beast-fx/examples

2 participants