Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plexus-java/src/site/markdown/locationmanager.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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)
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).

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.

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.
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 the hand-written `ModuleInfoClassParser` is used to read the module descriptor.

When extracting the the automatic module name based the of the file, it is a little bit more complex. The result must be precise, so the only way to solve this is by calling Java 9 code, either from the runtime or by calling Java 9 explicitly when provided via `ResolvePathsRequest.setJdkHome`.

Expand Down
2 changes: 1 addition & 1 deletion plexus-java/src/site/markdown/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The `ResolvePathRequest` also contains:

* additionalModules: the modules that will be addedusing `-add-modules`

* 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.
* 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 8.

The `ResolvePathsResult` contains:

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<connection>scm:git:https://github.com/codehaus-plexus/plexus-languages.git</connection>
<developerConnection>scm:git:https://github.com/codehaus-plexus/plexus-languages.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/codehaus-plexus/plexus-languages/tree/plexus-languages</url>
<url>https://github.com/codehaus-plexus/plexus-languages</url>
</scm>
<issueManagement>
<system>github</system>
Expand Down
Loading