jakartaee / jakartaee/mail-api

jakarta.mail-api is not a Multi Release JAR

Open
#660 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
285
Forks
109
Avg merge
15h 19m
Merged PRs (30d)
1

Description

**Describe the bug**
Latest jakarta.mail-api (`2.1.1`) includes 6 classes compiled to bytecode 53 and 148 classes to compiled to bytecode 52. All classes are found in the unversioned space which means enforcer rules for both [Maven](https://www.mojohaus.org/extra-enforcer-rules/enforceBytecodeVersion.html) and [Gradle](https://kordamp.org/enforcer-gradle-plugin/#_enforcebytecodeversion) will trigger and fail a build.

**To Reproduce**
Steps to reproduce the behavior:
1. Get [jarviz](https://github.com/kordamp/jarviz/releases)
```
$ jarviz bytecode show --gav jakarta.mail:jakarta.mail-api:2.1.1
Unversioned classes. Bytecode version: 52 total: 148
Unversioned classes. Bytecode version: 53 total: 6
```

If the `--details` flag is added you get the names of the 6 classes causing trouble

```
Unversioned classes. Bytecode version: 53 total: 6
jakarta.mail.search.package-info
jakarta.mail.util.package-info
jakarta.mail.event.package-info
jakarta.mail.internet.package-info
jakarta.mail.package-info
module-info
```

**Expected behavior**
These 6 classes should be inside `/META-INF/versions/9`. The JAR's manifest should have a manifest entry such as `Multi-Release: true`

https://docs.oracle.com/javase/10/docs/specs/jar/jar.html#multi-release-jar-files

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with jarviz against jakarta.mail:jakarta.mail-api:2.1.1 and inspect the build or packaging configuration that produces the JAR. Verify the six package-info classes and module-info are placed under META-INF/versions/9 and that the manifest declares Multi-Release: true.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.