apache / apache/maven-surefire

[SUREFIRE-2097] More configuration for surefire JPMS

Open
#2,775 3 comments 0 reactions 1 assignee Claimed by @olamy View on GitHub
enhancement priority:major
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

**[Olivier Lamy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=olamy)** opened **[SUREFIRE-2097](https://issues.apache.org/jira/browse/SUREFIRE-2097?redirect=false)** and commented

Currently surefire manages the build of module path and classpath graph with almost not configurable option.
Due to long time between M5 and M6 releases while in the meantime plexus-java has incorporated a lot changes (for compiler, javadoc), those release has created some backward incompatible changes which are affecting some users such:
- https://issues.apache.org/jira/browse/SUREFIRE-2057
- comments here https://github.com/eclipse/jetty.project/pull/8129

So we need few more options to be able to configure some of the assumptions which has been made and changed in plexus-java.
Because the current configuration is hardcoded:

```java
ResolvePathsRequest req = ResolvePathsRequest.ofStrings( testClasspath.getClassPath() )
.setIncludeAllProviders( true )
.setJdkHome( javaHome )
.setIncludeStatic( true )
.setModuleDescriptor( javaModuleDescriptor );
```

We must give users some options to override the black magic made by plexus-java.

Options to configure:
- force all test/provided scope to be in classpath or not
- do not add automatically providers to the module path
- a possible list per groupId/artifactId to force module path or classpath
- etc...

The idea here is too collect what users need.
Remember we will try to avoid too much complicated options :)

---

**Affects:** 3.0.0-M7

**Issue Links:**
- [MNG-7855](https://issues.apache.org/jira/browse/MNG-7855) Dependencies wrongly put on class-path rather than module-path

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.