gnodet opened a new issue, #12304:
URL: https://github.com/apache/maven/issues/12304
## Description
Building `activemq-protobuf` with Maven from the `maven-4.0.x` branch fails
because Maven 4 rejects a dependency without an explicit `<version>` element,
even though the dependency is a reactor module.
Maven 3 accepted this pattern — the version was implicitly inherited from
the reactor. Maven 4 enforces explicit versions more strictly.
## Error
```
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR] The project
org.apache.activemq.protobuf:activemq-protobuf-test:1.2-SNAPSHOT
has 1 error
[ERROR] 'dependencies.dependency.version' for
groupId='org.apache.activemq.protobuf', artifactId='activemq-protobuf',
type='jar' is missing. @ line 38, column 5
```
## Analysis
The `activemq-protobuf-test` module depends on `activemq-protobuf` (a
sibling reactor module) without specifying a `<version>`. In Maven 3, the
reactor provided the version implicitly. Maven 4's stricter POM validation
rejects this.
Note: `mvnup apply` was run before the build (the log shows "Plugin upgrades
applied"), so this is not fixable by mvnup.
## Reproducer
```bash
git clone https://github.com/apache/activemq-protobuf.git
cd activemq-protobuf
mvn -B -e clean package -DskipTests
```
## Environment
- Maven: built from `maven-4.0.x` branch (bootstrapped with 4.0.0-rc-5)
- JDK: 17 (Temurin)
## Context
Found during [Maven 4 compatibility
testing](https://github.com/gnodet/maven4-testing/issues/20344).
_Claude Code on behalf of Guillaume Nodet_
--
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]