gnodet opened a new issue, #12984:
URL: https://github.com/apache/maven/issues/12984
## Problem
When `mvnup` upgrades `maven-jar-plugin` to 3.5.0, projects with hyphenated
`artifactId` values get build failures:
```
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-jar-plugin:3.5.0:jar (default-jar)
on project integration-test: Error assembling JAR:
Invalid automatic module name:
'org.apache.geronimo.arthur.integration-test'
```
The jar-plugin 3.5.0 auto-generates `Automatic-Module-Name` from `groupId +
"." + artifactId`. When the artifactId contains hyphens (e.g.
`integration-test`, `no-cxf`, `winegrower-cepage-osgi-cdi`), the resulting
module name is invalid because Java module identifiers cannot contain hyphens.
## Affected projects (4)
| Project | artifactId | Generated module name |
|---------|-----------|----------------------|
| geronimo-arthur | `integration-test` |
`org.apache.geronimo.arthur.integration-test` |
| karaf-winegrower | `winegrower-cepage-osgi-cdi` |
`...winegrower-cepage-osgi-cdi` |
| openwebbeans-meecrowave | `no-cxf` | `...no-cxf` |
| atlas | (jar tool exit 1) | Similar hyphen issue |
## Possible fixes
**Option A (mvnup):** When upgrading jar-plugin to 3.5.0, check if any
module in the project has a hyphenated artifactId without an explicit
`Automatic-Module-Name` manifest entry. If so, either:
- Skip the jar-plugin upgrade for that project
- Add an `Automatic-Module-Name` with hyphens replaced by dots/underscores
**Option B (jar-plugin):** The jar-plugin itself could sanitize the
auto-generated module name (e.g. replace hyphens with dots), or skip
auto-generation when the result would be invalid, instead of failing the build.
## Context
Data from [maven4-testing](https://github.com/gnodet/maven4-testing) run
#13307 testing `maven-4.0.x` against all Apache projects.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]