apache / apache/maven-surefire

[SUREFIRE-1618] Configure module path with additional modules

Open
#2,124 1 comment 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

**[Sergey Gurev](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=marx.freedom)** opened **[SUREFIRE-1618](https://issues.apache.org/jira/browse/SUREFIRE-1618?redirect=false)** and commented

When surefire-maven-plugin runs tests with the JPMS it constructs module path only from modules required by compiled module (reading its descriptor from file target/classes/module-info.class). Other jars will be used in class path even they are modular (with module-info.class). 

It seems that plugin should include all modular jars to module path or there should be an option to configure module path.

For example:

 

```java

net.bytebuddy
net.bytebuddy.agent

```

 

Attached patch contains implementation of "additionalModules" configuration property.

 

---

**Affects:** 3.0.0-M3

**Attachments:**
- [additionalModules.patch](https://issues.apache.org/jira/secure/attachment/12953147/additionalModules.patch) (_7.76 kB_)

3 votes, 3 watchers

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the attached additionalModules.patch and the surefire-maven-plugin code that constructs the module path from target/classes/module-info.class. Trace how modular jars are currently classified, then verify that the proposed configuration includes the named modules on the module path without changing class-path handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.