Skip to content

Commit 452c8f1

Browse files
dependabot[bot]slawekjaranowski
andauthoredFeb 8, 2025··
Bump org.codehaus.plexus:plexus from 19 to 20 (#203)
* Bump org.codehaus.plexus:plexus from 19 to 20 Bumps [org.codehaus.plexus:plexus](https://github.com/codehaus-plexus/plexus-pom) from 19 to 20. - [Release notes](https://github.com/codehaus-plexus/plexus-pom/releases) - [Commits](https://github.com/codehaus-plexus/plexus-pom/commits) --- updated-dependencies: - dependency-name: org.codehaus.plexus:plexus dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Apply format for MD --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Slawomir Jaranowski <[email protected]>
1 parent 77283f3 commit 452c8f1

File tree

4 files changed

+35
-31
lines changed

4 files changed

+35
-31
lines changed
 

‎README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Plexus Language
2+
23
![Build Status](https://github.com/codehaus-plexus/plexus-languages/workflows/GitHub%20CI/badge.svg)
34
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/codehaus-plexus/plexus-languages/maven.yml?branch=master)
45
[![Reproducible Builds](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/jvm-repo-rebuild/reproducible-central/master/content/org/codehaus/plexus/plexus-languages/badge.json)](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/codehaus/plexus/plexus-languages/README.md)
56

67
Plexus Languages:
78

8-
* [![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-languages.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.codehaus.plexus/plexus-languages)
9+
* [![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-languages.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.codehaus.plexus/plexus-languages)
910

1011
Plexus Java:
1112

12-
* [![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-java.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.codehaus.plexus/plexus-java)
13+
* [![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-java.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.codehaus.plexus/plexus-java)
14+

‎plexus-java/src/site/markdown/locationmanager.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The plexus-java library is created to have a solution for common activities, so this business logic doesn't have to be maintained at multiple places. The first provided feature was the `LocationManager` to analyze module desciptors and to decide which jars should end up on the modulepath and which on the classpath. The name was based on the [javax.tools.JavaFileManager.Location]. (https://docs.oracle.com/javase/10/docs/api/javax/tools/JavaFileManager.Location.html)
22

3-
The library requires Java 8 to run, but contains optimized code for Java 9. By requiring Java 8 it was much easier to embed this library in several other projects.
3+
The library requires Java 8 to run, but contains optimized code for Java 9. By requiring Java 8 it was much easier to embed this library in several other projects.
44

55
This jar is a multi release jar (aka MRJAR), because it contains 2 implementations for the `BinaryModuleInfoParser`. If the Java runtime is 9 or above, the `java.lang.module.ModuleDescriptor` is used to read the `module-info.class`. If the runtime is Java 8, then ASM is used to read the module descriptor.
66

@@ -18,13 +18,13 @@ There are 3 ways to create a `ResolvePathsRequest`:
1818

1919
- `ResolvePathsRequest.ofStrings(Collection<String>)`
2020

21-
As argument you pass all the archives and/or outputDirectories specified to build the project.
21+
As argument you pass all the archives and/or outputDirectories specified to build the project.
2222

2323
Additional methods are:
2424

2525
- `setAdditionalModules`, in case the consumer wants to use `--add-modules`
2626

27-
- `setIncludeAllProviders`, in general would only be used at runtime, not during compile or test. In case `uses` is used, all modules with matching `provides` are added as well.
27+
- `setIncludeAllProviders`, in general would only be used at runtime, not during compile or test. In case `uses` is used, all modules with matching `provides` are added as well.
2828

2929
- `setJdkHome`, should point to Java 9 or above in case the runtime of this library is Java 8
3030

@@ -37,9 +37,9 @@ If there's a `mainModuleDescriptor`, extract a `JavaModuleDescriptor` of it. Thi
3737
All pathElements of `ResolvePathsRequest.ofT` are transformed to Path instances. For every element the name will be resolved in the following order:
3838

3939
1. Module descriptor: verify if the jar or the directory contains `module-info.class`. If so, the its descriptor is transformed to a `JavaModuleDescriptor`, where its ModuleNameSource is marked as `ModuleNameSource.MODULEDESCRIPTOR`
40-
41-
2. Manifest: verify if the jar or directory has a `META-INF/MANIFEST.MF` and if it contains the `Automatic-Module-Name` attribute. If so, an automatic `JavaModuleDescriptor` is created, where its ModuleNameSource is marked as `ModuleNameSource.MANIFEST`.
42-
40+
41+
2. Manifest: verify if the jar or directory has a `META-INF/MANIFEST.MF` and if it contains the `Automatic-Module-Name` attribute. If so, an automatic `JavaModuleDescriptor` is created, where its ModuleNameSource is marked as `ModuleNameSource.MANIFEST`.
42+
4343
3. Filename: try to extract the module name based on the filename. If the filename could be transformed to a module name (which is not always the case), an automatic `JavaModuleDescriptor` is created, where its ModuleNameSource is marked as `ModuleNameSource.FILENAME`.
4444

4545
When there's an `IOException` with one of the pathElements, the exception is stored in the `ResolvePathsResult.pathExceptions` so the consumer can handle them separately.
@@ -48,7 +48,7 @@ The result are a couple of Maps:
4848

4949
* module name to `ModuleNameSource`
5050

51-
* module name to `JavaModuleDescriptor`
51+
* module name to `JavaModuleDescriptor`
5252

5353
# Phase 2: Resolve
5454

@@ -57,6 +57,7 @@ This contains recursive code and ensures that required modules are only evaluate
5757
All these pathElements must be placed on the modulepath, all other pathElements will be marked for the classPath.
5858

5959
# Result
60+
6061
All results will be stored in a `ResolvePathsResult`.
6162

6263
- `getClasspathElements()`, ordered collection of all pathElements that don't belong to the modulepath
@@ -68,3 +69,4 @@ All results will be stored in a `ResolvePathsResult`.
6869
- `getPathElements()`, ordered map of the pathElements with their module descriptor
6970

7071
- `getPathExceptions()`, map of pathElements containing only the elements that faced an exception.
72+
+21-21
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# LocationManager.resolvePaths
32

43
In order to use this class you must setup a `ResolvePathsRequest`, which requires a list of all the jars and output directories and the main module descriptor.
@@ -7,33 +6,34 @@ You start by using `ResolvePathsRequest.ofXXX`, where XXX is either Files, Paths
76

87
The `ResolvePathRequest` also contains:
98

10-
* mainModuleDescriptor: the path or file of the main module descriptor, can either be `module-info.java` or `module-info.class`
11-
12-
* additionalModules: the modules that will be addedusing `-add-modules`
13-
14-
* jdkHome: in case you need to use a different JDK to extract the name from the modules. Can be interesting if the runtime is still Java 7.
9+
* mainModuleDescriptor: the path or file of the main module descriptor, can either be `module-info.java` or `module-info.class`
10+
11+
* additionalModules: the modules that will be addedusing `-add-modules`
12+
13+
* jdkHome: in case you need to use a different JDK to extract the name from the modules. Can be interesting if the runtime is still Java 7.
1514

1615
The `ResolvePathsResult` contains:
1716

18-
* mainModuleDescriptor: the module descriptor of the passed descriptor file.
19-
20-
* pathElements: as a map in the same order as provided by the request. Every entry has a matching moduledescriptor when available.
21-
22-
* classpathElements: all the pathElements which should end up on the classpath.
23-
24-
* modulepathElements: all the pathElements which should end up on the modulepath. Per entry you get the source of the modulename which is either the moduledescriptor, the manifestfile of the filename. This information can be used to warn users in case they use automatic modules, which module names are not reliable yet.
25-
26-
* pathExceptions: pathElements with their exception while trying to resolve it. Only pathElements with an exception are listed.
27-
17+
* mainModuleDescriptor: the module descriptor of the passed descriptor file.
18+
19+
* pathElements: as a map in the same order as provided by the request. Every entry has a matching moduledescriptor when available.
20+
21+
* classpathElements: all the pathElements which should end up on the classpath.
22+
23+
* modulepathElements: all the pathElements which should end up on the modulepath. Per entry you get the source of the modulename which is either the moduledescriptor, the manifestfile of the filename. This information can be used to warn users in case they use automatic modules, which module names are not reliable yet.
24+
25+
* pathExceptions: pathElements with their exception while trying to resolve it. Only pathElements with an exception are listed.
26+
2827
# JavaVersion
2928

3029
This is a String based, lazy-parsing implementation of a Java Version which can be used to compare versions. It's goal is to support to support the following patterns:
3130

32-
* [JEP 223: New Version-String Scheme](https://openjdk.java.net/jeps/223)
33-
* [JEP 322: Time-Based Release Versioning](https://openjdk.java.net/jeps/322)
31+
* [JEP 223: New Version-String Scheme](https://openjdk.java.net/jeps/223)
32+
* [JEP 322: Time-Based Release Versioning](https://openjdk.java.net/jeps/322)
3433

3534
Additional features:
3635

37-
* `JavaVersion.JAVA_SPECIFICATION_VERSION` represents `System.getProperty( "java.specification.version" )`
38-
39-
* `JavaVersion.JAVA_VERSION` represents `System.getProperty( "java.version" )`
36+
* `JavaVersion.JAVA_SPECIFICATION_VERSION` represents `System.getProperty( "java.specification.version" )`
37+
38+
* `JavaVersion.JAVA_VERSION` represents `System.getProperty( "java.version" )`
39+

‎pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.codehaus.plexus</groupId>
77
<artifactId>plexus</artifactId>
8-
<version>19</version>
8+
<version>20</version>
99
</parent>
1010

1111
<artifactId>plexus-languages</artifactId>

0 commit comments

Comments
 (0)
Please sign in to comment.