Part of v2.7→v2.8 parity (raised by Remco). Umbrella: #34. Spin-off: #85 (BEAST core update notifier — out of scope here).
Vocabulary. New CLI/UI in this issue uses "upgrade" as the primary verb (matches apt/brew/dnf). The pre-existing "update" flags (-update, -updatenow) are kept as aliases so existing scripts keep working with no changes required.
Problem
The core upgrade machinery is mostly in place for CBAN .zip packages: PackageManager.updatePackages(...) at PackageManager.java:1687 is CLI-wired as -update / -updatenow (PackageManagerCLI.java:179-187) and handles end-to-end upgrades, including Windows defer-delete + toInstallList resume-after-restart (PackageInstaller.java:62, 202-209, 293-347). The gaps:
- Maven Central packages don't participate. No version discovery, and they're not surfaced in the unified
packageMap that updatePackages walks.
- No per-package CLI. Upgrades today are all-or-nothing; you can't say "just upgrade Mascot".
- No BEAUti affordance.
JPackageDialog has no "Upgrade?" column, no "Upgrade All" button, and doesn't list Maven-installed packages at all.
- Rollback bug.
PackageInstaller.prepareForInstall (PackageInstaller.java:44) uninstalls the old version before downloading the new one. A network failure mid-upgrade leaves the package gone.
- Stale comment at
PackageInstaller.java:312 referencing "packages could not be upgraded due to Windows preventing the deletion of jar files" — keep behaviour, fix wording.
(Note: BEAST.base / beast.fx are JPMS modules inside the beast3 core jar in v2.8 — not separately installable packages. Upgrading the core is an installer-level concern, tracked separately in #85.)
Plan
Phase 1 — CLI upgrade for CBAN + rollback-safe staging
Phase 2 — Maven version discovery + Maven upgrade
Phase 3 — BEAUti FX dialog parity
Phase 4 — Polish: upgrade checks for Maven
Acceptance
packagemanager -upgrade <name> and packagemanager -upgradeAll work for both CBAN and Maven packages.
packagemanager -update and -updatenow continue to work as aliases without warning or behavioural change.
- BEAUti
Manage Packages shows installed packages from both transports and highlights upgradable ones with an "Upgrade All" action.
- A failed download during upgrade leaves the prior install intact.
Open questions
- Hot reload on Linux/macOS for CBAN — does the current path truly hot-replace jars, or does it always require restart? Affects Phase 2 Maven UX wording.
- For Maven packages, what's the human-readable name in the table? Prefer embedded
version.xml/name if present, fall back to artifactId.
Part of v2.7→v2.8 parity (raised by Remco). Umbrella: #34. Spin-off: #85 (BEAST core update notifier — out of scope here).
Problem
The core upgrade machinery is mostly in place for CBAN .zip packages:
PackageManager.updatePackages(...)atPackageManager.java:1687is CLI-wired as-update/-updatenow(PackageManagerCLI.java:179-187) and handles end-to-end upgrades, including Windows defer-delete +toInstallListresume-after-restart (PackageInstaller.java:62, 202-209, 293-347). The gaps:packageMapthatupdatePackageswalks.JPackageDialoghas no "Upgrade?" column, no "Upgrade All" button, and doesn't list Maven-installed packages at all.PackageInstaller.prepareForInstall(PackageInstaller.java:44) uninstalls the old version before downloading the new one. A network failure mid-upgrade leaves the package gone.PackageInstaller.java:312referencing "packages could not be upgraded due to Windows preventing the deletion of jar files" — keep behaviour, fix wording.(Note:
BEAST.base/beast.fxare JPMS modules inside the beast3 core jar in v2.8 — not separately installable packages. Upgrading the core is an installer-level concern, tracked separately in #85.)Plan
Phase 1 — CLI upgrade for CBAN + rollback-safe staging
-upgrade <name>,-upgradeAll,-upgradeNow,-listUpgrades(apt-style: exit0clean /1if upgrades available) toPackageManagerCLI.java.-updateand-updatenowworking as aliases routing to the same code paths. No deprecation warnings — old scripts must remain silently functional.PackageInstaller.prepareForInstallstage downloads (download → unzip into temp dir → atomic rename) so failed upgrades leave the prior install intact.PackageInstaller.java:312.UpgradeFlowTest,UpgradeStagingTest,UpdateAliasTest(verifies old flag names still work) underbeast-pkgmgmt/src/test/java/test/beast/pkgmgmt/.Phase 2 — Maven version discovery + Maven upgrade
MavenPackageResolver.resolveLatestVersion(g, a)andresolveAvailableVersions(g, a)via AetherVersionRangeRequest.PackageManager.addInstalledMavenPackages(packageMap)so Maven coords appear alongside CBAN entries.-upgradeAllcovers both transport types; restart guidance for Maven where JPMS layers prevent hot reload.MavenVersionDiscoveryTestagainst a fixture Aether repo.Phase 3 — BEAUti FX dialog parity
Package.newVersionAvailable().JPackageDialog.createButtonBox().Phase 4 — Polish: upgrade checks for Maven
package.update.statusnag to include Maven packages.Acceptance
packagemanager -upgrade <name>andpackagemanager -upgradeAllwork for both CBAN and Maven packages.packagemanager -updateand-updatenowcontinue to work as aliases without warning or behavioural change.Manage Packagesshows installed packages from both transports and highlights upgradable ones with an "Upgrade All" action.Open questions
version.xml/nameif present, fall back toartifactId.