apache / apache/polaris

Fix annoying "split package" build warnings

Open
#849 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
2.1k
Forks
522
Avg merge
1d 22h
Merged PRs (30d)
137

Description

### Is your feature request related to a problem? Please describe.

When building Polaris, we often see an annoying message printed many times to the console, e.g.:

```
Detected a split package usage which is considered a bad practice and should be avoided. Following packages were detected in multiple archives:
- "org.apache.polaris.service.quarkus.catalog.io" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.metrics" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.legacy" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.persistence" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.storage" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.config" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.tracing" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.logging" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.context" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.ratelimiter" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.auth" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
- "org.apache.polaris.service.quarkus.task" found in [org.apache.polaris:polaris-quarkus-service:1.0.0-incubating-SNAPSHOT]
```

I don't think we have truly split packages in Polaris. The above is likely a false positive. This can be seen by the number of conflicting artifacts: there is always only one artifact. This probably hints at 2 or more artifacts produced by the same module, having the same name. One possible culprit would be the artifacts created by the `distribution` plugin.

Related discussion: https://github.com/quarkusio/quarkus/issues/19030#issuecomment-888184047

### Describe the solution you'd like

No more annoying messages.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing a Polaris build and inspecting the build configuration around the distribution plugin and the artifacts it produces. Trace why multiple artifacts from the same module are reported as split packages; done means the false-positive warnings no longer appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.