← Back to issue list

Runtime/build-time discrepancies with jdk and ant plugins

View original Github issue

Metadata

Project
snapcraft
Number
#15
Type
issue
State
closed
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Closed after a maintainer said it appeared fixed and requested a reproducer; no resolving PR, commit, or release was identified, and LP1477745 was closed as unimplemented.

Resolution: closed stale

Reason: No concrete implementation could be tied to the closure: the only maintainer comment said the problem was thought fixed and requested a failing snapcraft.yaml. Linked Launchpad bug LP1477745 was closed as unimplemented.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Hi, While testing ant and jdk plugins, I noticed a couple of things; this bug to discuss the best resolution. First, I was surprized by a "jdk" plugin; I actually thought the plugin would be "jre" because I thought it was just embedding a java runtime. But then I noticed that "ant" wasn't working on my system, compilation would fail with missing javac classes. This is because the ant Ubuntu package doesn't pull a JDK but only a JRE. Yet, ant was run successfully during a snapcraft build. This is because ant was being run with the java runtime pulled by the jdk plugin (from the snap). I found this surprizing, I was actually expecting the ant package would be used on my system against the java runtime on my system, but I can see how there are pros and cons to using system java vs. snap's java. Pros of using system jdk to run ant and embedding a jre package in the snap: - smaller runtime -- the current approach still ends up embedding a bunch of lib_.a files, lib_.so (including X.org libs) - feels more natural (to me) Cons: - ant doesn't pull a jdk by default - more complex to digest (more plugins) Pros of using snap's jdk to run ant: - less copies of java around -- no discrepancies, perhaps less waster space (not sure) - less plugins To make the matter more complex, I believe we should have multiple architecture in mind. This problem will get worse when we're considering building packages across architectures and/or for multiple architectures. This is actually quite common in the "develop on x86-64 Ubuntu desktop, deploy on ARM board" scenario. This last topic is actually what convinces me we should go for using the system JDK to run ant rather than the snap's JDK. This makes the snap less easily bloated with JDK bits (we could offer regular vs. -headless jre as an option to make this even smaller), and means we dont need to worry about cross-architecture. It's even relatively easy to support multiple architectures if we stop relying on default-java and rather use java-7-openjdk-amd64 and such. (BTW, we seem to pull Recommends; it's not clear whether it's a good default given these are usually not pulled when building .deb packages) Hence, I propose we: - change the ant plugin to pull the default-jdk package (on top of the ant package) -- this kind of feels like a workaround for the package not pulling the jdk by default which is either a bug or just a packaging opinion that "ant can be used for anything, not necessarily building java sources" - rename the jdk plugin to jre -- possibly ubuntu-jre or openjdk-jre, allowing for oracle-jre and similar, but I find the long names look ugly (- add an option to select the headless JRE) - differentiate between build and runtime envs But happy to read other opinions! Cheers, Launchpad Details: [#LP1477745](https://bugs.launchpad.net/bugs/1477745) Loïc Minier - 2015-07-23 16:49:43 -0300

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed after a maintainer said it appeared fixed and requested a reproducer; no resolving PR, commit, or release was identified, and LP1477745 was closed as unimplemented.
stealth/space-bunny-alpha — closed stale Closed in 2015 after a maintainer said it was thought fixed; no resolving PR, commit, or version was cited, and the linked Launchpad bug was closed without implementation.
qwen/qwen3.6-35b-a3b — — Runtime and build-time discrepancies between the ant and jdk plugins were resolved. The maintainer closed the issue as fixed, requesting reproduction steps if the problem persists.
qwen/qwen3.6-35b-a3b — — Snapcraft jdk and ant plugin runtime-build discrepancies were resolved. The issue was closed as fixed, with the maintainer requesting reproduction steps if the problem persists.
qwen/qwen3.6-35b-a3b — — Snapcraft resolved runtime and build-time discrepancies between the JDK and ANT plugins. Maintainers confirmed the issue is fixed, implemented proposed plugin behavior changes, and requested reproduction steps if problems persist.
qwen3.6-35b-a3b-mtp-q6 — — Closed as fixed. Maintainer resolved build-time discrepancies by proposing to rename the jdk plugin to jre and adjust ant plugin dependencies. Requested reopening with a test case if issues persist.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: launchpad#LP1477745 (confidence 95%)

    The issue explicitly links the same discrepancy to LP1477745, which was subsequently closed without implementation.

Related issues

Issue Project State Summary Similarity
#1477745 Runtime/build-time discrepancies with jdk and ant plugins snapcraft (launchpad) closed Migrated to canonical/snapcraft#15 and closed by sergiusens (2019) as handled by 3.x base support: ant gained base/build-env handling (#2370, #2453 jre defaults) and the jdk plugin was removed in merged PR #2376 (b556781ad); ant later switched to the ant snap by default (14d12bbb3).
71%