You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 14dae7d
Browse filesBrowse the repository at this point in the historyBrowse files
Recorded the Ant build traps found building the r1rv86 tag in a clean tree: the empty core/src/main/resources git cannot carry, the build1-* scripts not propagating an Ant failure, the shared build directory, and using a worktree rather than checking a tag out in this clone.
Full workflow (build → **sign with the `bcsign` helper, release machine only** → test), the complete API→fix table, the test-exclusion overlay mechanism, and the diagnostic for telling a real bug from a JRE-5 JIT defect (`-Xint`) are in the `build-jdk15to18` skill.
146
152
147
153
There is an even stricter Java 1.4 distribution (`sh build1-4`) that compiles with a genuine 1.4 javac — post-1.4 APIs fail it at *compile* time, and it has its own overlay trees, source preprocessor, and signing flow: see `build-jdk14.md`.
154
+
155
+
## Driving the Ant builds, and the two ways they lie about succeeding
156
+
157
+
`build1-4`, `build1-5to1-8` and `build1-8+` all wrap Ant the same way, and two traps come with that.
158
+
159
+
**A clean checkout cannot build at all.**`ant/jdk15+.xml:38` and `ant/jdk18+.xml` both reference
160
+
`<fileset dir="core/src/main/resources" …>`, but that directory holds **no tracked files** — git
161
+
cannot carry an empty directory, so it exists in any long-lived clone and is simply absent from a
162
+
fresh clone, checkout or worktree. Ant then dies on the first target with
163
+
`core/src/main/resources not found`. It is invisible locally and hits anyone building a release tag,
164
+
so `mkdir -p core/src/main/resources` is step one in a new tree. The sibling `prov`, `pkix` and
165
+
`mail` resource directories each carry tracked files and are fine; `jdk14.xml`, `jdk13.xml` and
166
+
`bc+-build.xml` don't reference the core one.
167
+
168
+
**The scripts do not propagate an Ant failure.** Each is
169
+
170
+
```sh
171
+
if ant -f ant/<file> build-provider
172
+
then
173
+
ant -f ant/<file> build
174
+
ant -f ant/<file> zip-src
175
+
fi
176
+
```
177
+
178
+
so a failing `build-provider` skips the body and the script still exits **0** (a shell `if` with no
179
+
`else` succeeds), a failing `build` is masked by the `zip-src` that runs after it, and only
180
+
`zip-src`'s status ever reaches the caller. This is the Ant-side sibling of the `UP-TO-DATE` trap
181
+
above: grep the log for `BUILD FAILED`, or check the jars actually appeared under
182
+
`build/artifacts/<jdkdir>/jars/`, rather than trusting `$?`.
183
+
184
+
The three builds also share `build/`. They stage into separate subdirectories and write separate
185
+
artifact trees, but they run Ant over one tree — run them sequentially, never in parallel.
186
+
187
+
Build only, no tests, on this machine (r1rv86, warm, fresh worktree): `build1-8+` 50s / 9 jars,
188
+
`build1-5to1-8` 1m21s / 9 jars, `build1-4` 56s / 8 jars — about 1.6G of artifacts in total, with no
189
+
`bcjmail` on the jdk1.4 line. Worth knowing because `build-jdk14.md` quotes "~25 minutes" for that
190
+
pipeline: that is build plus signing plus the full test run, and the build alone is a minute.
191
+
192
+
Each artifact tree holds `jars/`, a `<module>-<vmrange>-<ver>/` directory per module carrying
193
+
`src.zip` and `javadoc/`, and `lcrypto-<vmrange>-<ver>/` — the source distribution as a **directory**.
194
+
Nothing in the repository creates the `lcrypto-<vmrange>-<ver>.tar.gz` / `.zip` archives the download
195
+
page links (`grep -E '<(tar|zip) ' ant/*.xml` finds only the per-module `src.zip` tasks), so those
196
+
come from a release step outside the tree: a missing archive on the site means that step didn't run,
197
+
not that the tag is short of content.
198
+
199
+
### The Ant `jdk18+` build is not the published `jdk18on` artifact
200
+
201
+
`build1-8+` produces a `bcprov-jdk18on-<ver>.jar` with **zero**`META-INF/versions/` entries and an
202
+
`Ant-Version: Apache Ant 1.6.5` manifest — the published multi-release jar comes from Gradle. Don't
203
+
reach for the Ant output when reproducing a released artifact. What it is genuinely good for is the
204
+
two variants Gradle does not build at all, `bcprov-ext-jdk18on` and `bctest-jdk18on`.
205
+
206
+
Note also that both wrapper scripts post-process the provider jars *after* Ant to add the
207
+
`META-INF/services/java.security.Provider` registration, and do it differently: `build1-5to1-8`
208
+
loops `jar uf` over a `bcprov*jdk15to18*.jar` glob (so it catches `bcprov-ext` and a debug build)
209
+
while `build1-8+` uses a `tar` pipe and names the two jars explicitly. That is where to look when a
210
+
provider jar loads from Gradle but not from an Ant build.
0 commit comments