← Back to issue list

Java plugin should not copy all jar files

View original Github issue

Metadata

Project
craft-parts
Number
#893
Type
issue
State
open
Author
vpa1977
Labels
Created
Updated
Closed

Current evaluation

Java plugins (ant/maven/gradle) copy every jar from the build dir into the image, including test dependencies. Maintainers discussed an opt-in fix and a 26.04 breaking change; last activity was a documentation suggestion, no implementation yet.

Suggested action: keep open

Reason: Maintainers actively triaged this in Nov 2024 (lengau, tigarmo) and agreed on an opt-in approach with a planned 26.04 breaking change, but no PR or code change has landed since. The last comment (2024-11-27) proposes adding maven/ant documentation about the stage keyword/dist command, so the issue is still a live, scoped design task rather than stale or irrelevant.

Impact: 55 Quick Win: 13.75 Staleness: 70 Complexity: 75 Confidence: 70 Support Request: 5

Issue body

### What needs to get done Java plugin copies all jar files found in the build output. This includes test dependencies which should not be present in the resulting image. Java plugin is unable to distinguish between test and runtime dependencies as it is build-system specific. We need to design a way to determine the test dependencies,. ### Why it needs to get done By default Java plugin deploys all the jar files including test dependencies.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 55
Quick Win: 13.75
Staleness: 70
Complexity: 75
Confidence: 70
Support Request: 5
keep open Java plugins (ant/maven/gradle) copy every jar from the build dir into the image, including test dependencies. Maintainers discussed an opt-in fix and a 26.04 breaking change; last activity was a documentation suggestion, no implementation yet.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 85
Confidence: 80
Support Request: 10
keep open Java plugin copies test dependencies alongside runtime jars. Maintainers discussed opt-in fixes and breaking changes for 26.04, but implementation stalled. Currently inactive and unlabelled.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 75
Confidence: 70
Support Request: 10
needs triage Java plugin copies test dependencies into images. Contributors discuss architectural changes, opt-in flags, and documentation workarounds. Currently under discussion with no maintainer labels or assigned action.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 70
Confidence: 75
Support Request: 10
close stale Java plugin copies all JARs, including test dependencies, into images. Requires build-system-specific filtering. Contributors propose opt-in behavior now, a 26.04 breaking change, and updated documentation. Awaiting implementation design.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.