Skip to content

Commit 4df4bee

Browse files
brett-smithremkop
authored andcommitted
Fixes #2418.
* Removed dependency artifacts `org.jline:jline` * Added dependency artifacts `org.jline:jline-reader` and `org.jline:jline-console` (`jline-builtins`, `jline-native`, `jline-terminal` and `jline-style` are added transitively) * Removed `org.jline` module dependency in module-info. * Added `org.jline.reader` and `org.jline.console` module dependneices to module-info * Updated README.md with JPMS info.
1 parent c6333b2 commit 4df4bee

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

dependencies.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ ext {
4343
springbootstarter : "org.springframework.boot:spring-boot-starter:$springBootVersion",
4444
springbootannproc : "org.springframework.boot:spring-boot-configuration-processor:$springBootVersion",
4545
springboottest : "org.springframework.boot:spring-boot-starter-test:$springBootVersion",
46-
jline3 : "org.jline:jline:$jline3Version",
46+
jline3reader : "org.jline:jline-reader:$jline3Version",
47+
jline3console : "org.jline:jline-console:$jline3Version",
4748
jline2 : "jline:jline:$jline2Version",
4849
ivy : "org.apache.ivy:ivy:$ivyVersion",
4950
compileTesting : "com.google.testing.compile:compile-testing:$compileTestingVersion",

picocli-shell-jline3/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ The following versions of `jline` and `picocli-shell-jline3` are compatible:
5959

6060
Note: JLine v3.17.1 is not compatible as it is affected by [this bug](https://github.com/jline/jline3/issues/640).
6161

62+
## JPMS Compatibility
63+
64+
Prior to version 4.8.0, using this library in a fully modular application was only possible if you also used the JLine3 bundle module `org.jline`, which is provided by the `org.jline:jline` artifact. If for any reason you were using the individual JLine modules, then this library would be unable to find the `org.jline` module.
65+
66+
As from version 4.8.0, the reverse is true. If you wish to use this library with a fully modular application, you must use JLines individual component artifacts and cannot use the bundle. Now, `picocli-shell-jline3` depends on the artifacts `org.jline:jline-reader` and `org.jline:jline-console` which provides the `org.jline.reader` and `org.jline.consolle` JPMS modules, will all other dependencies transitvely resolved.
67+
68+
For most people, this change will have little obvious effect. You will still be using `requires transitive info.picocli.shell.jline3` in your `module-info.java`, and you still only need to add `picocli-shell-jline3` to your project. You will only be affected if your application as a whole uses other parts of JLine or 3rd party extensions to it.
69+
6270
See [examples for the older versions](https://github.com/remkop/picocli/wiki/JLine-3-Examples).
6371

6472
## Demo

picocli-shell-jline3/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ java {
1414

1515
dependencies {
1616
api rootProject
17-
api supportDependencies.jline3
17+
api supportDependencies.jline3reader
18+
api supportDependencies.jline3console
1819
}
1920

2021
apply plugin: 'org.beryx.jar' // for compiling module-info on Java 8

picocli-shell-jline3/src/main/java9/module-info.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
*/
3333
module info.picocli.shell.jline3 {
3434
requires info.picocli;
35-
requires org.jline;
35+
requires transitive org.jline.reader;
36+
requires transitive org.jline.console;
3637

3738
exports picocli.shell.jline3;
3839
}

0 commit comments

Comments
 (0)