@@ -7,3 +7,106 @@ Select models through path sampling/stepping stone analysis
77[ Path sampling] ( http://www.beast2.org/path-sampling/ )
88
99[ Path sampling with a GUI] ( http://www.beast2.org/2014/07/14/path-sampling-with-a-gui.html )
10+
11+ ## For developer
12+
13+ Build the package, skipping tests:
14+
15+ ``` bash
16+ mvn clean package -DskipTests
17+ ```
18+
19+ Run an example XML through BEAST:
20+
21+ ``` bash
22+ mvn exec:exec -Dbeast.args=" src/test/resources/modelselection/examples/normalTest-1.xml"
23+ ```
24+ ### Project folder structure
25+
26+ BEAUti templates and the example XMLs live under ` src/ ` , not root directory:
27+
28+ ```
29+ src/
30+ ├── main/resources/modelselection/
31+ │ ├── app/tools/ps.png
32+ │ └── fxtemplates/
33+ │ └── ModelSelection.xml
34+ └── test/resources/modelselection/examples/
35+ ├── normalTest-1.xml, normalTest-2.xml, normalTestPS-1.xml, normalTestPS-2.xml,
36+ │ testPairedPathSampler.xml, testPathSampler.xml, testPathSamplerForSimpleTree.xml
37+ └── legacy/ (superseded example XMLs, excluded from the release ZIP)
38+ ```
39+
40+ ` fxtemplates/ ` is a ** main** resource, so it's bundled into the jar (see below).
41+ ` examples/ ` is a ** test** resource, so the assembly plugin copies it into the ZIP's
42+ top-level ` /examples/ ` directly from ` src/test/resources/ ` , excluding ` legacy/** `
43+ (see ` src/assembly/beast-package.xml ` ).
44+
45+
46+ ## Releasing
47+
48+ ### Jar folder structure
49+
50+ The release module jar, bundled into the BEAST package ZIP's ` lib/ ` , contains:
51+
52+ ```
53+ META-INF/
54+ ├── MANIFEST.MF
55+ └── maven/io.github.beast2-dev/model-selection/
56+ ├── pom.xml
57+ └── pom.properties
58+ modelselection/
59+ ├── app/tools/ (PathSampler, PathSampleAnalyser, PairedPathSampler*, GeneralisedSteppingStone, ps.png)
60+ ├── core/ (CPOLogger)
61+ ├── cpo/ (CPOAnalyser, BEASTRunAnalyser + inner classes)
62+ ├── fxtemplates/
63+ │ └── ModelSelection.xml
64+ ├── gss/ (GeneralisedSteppingStone*, MCMC2GSS, MCMC2IS, GSSFromFile, TraceLog, ...)
65+ │ ├── coalescent/
66+ │ └── distribution/
67+ └── inference/ (PathSampler, PathSamplingStep, PairedPathSampler*, AICMAnalyser, DiffLogger, ...)
68+ version.xml
69+ module-info.class
70+ ```
71+
72+ ` modelselection/fxtemplates/ModelSelection.xml ` is loaded via module path resource
73+ lookup at runtime — ` src/assembly/beast-package.xml ` does not copy it anywhere else in
74+ the ZIP.
75+
76+ ### 1. Maven Central release (JARs)
77+
78+ Push a ` v* ` tag to trigger ` .github/workflows/ci-publish.yml ` , which sets the Maven
79+ version from the tag, builds, tests, GPG-signs, and publishes to Maven Central:
80+
81+ ``` bash
82+ git tag v1.7.0
83+ git push origin v1.7.0
84+ ```
85+
86+ Monitor the run at:
87+ https://github.com/BEAST2-Dev/model-selection/actions/workflows/ci-publish.yml
88+
89+ ### 2. GitHub release (BEAST package ZIP)
90+
91+ First remove ` -SNAPSHOT ` from ` <version> ` in ` pom.xml ` so it matches the release
92+ (e.g. ` 1.7.0-SNAPSHOT ` -> ` 1.7.0 ` ), then build the installable BEAST package ZIP locally:
93+
94+ ``` bash
95+ mvn clean package -DskipTests
96+ ```
97+
98+ ** Note:** if you skip the manual edit above, the build still succeeds, but the module
99+ jar bundled inside the ZIP (` lib/model-selection-<version>.jar ` ) will carry the
100+ ` -SNAPSHOT ` suffix — that's meant for dev/testing builds, not an official release.
101+ Alternatively, instead of hand-editing ` pom.xml ` , run:
102+
103+ ``` bash
104+ mvn versions:set -DnewVersion=< version> -DgenerateBackupPoms=false
105+ ```
106+
107+ The ZIP is written to ` target/MODEL_SELECTION.v<version>.zip ` . Then manually:
108+
109+ 1 . Go to https://github.com/BEAST2-Dev/model-selection/releases/new
110+ 2 . Choose the matching tag (e.g. ` v1.7.0 ` ), fill in the release title/notes
111+ 3 . Upload ` target/MODEL_SELECTION.v<version>.zip ` as a release asset
112+ 4 . Publish
0 commit comments