jshell-maven-plugin
jshell-maven-plugin copied to clipboard
Starts a JShell for each module
When I run mvn com.github.johnpoth:jshell-maven-plugin:1.1:run
in the root of my project, it starts a JShell for the first module. If I exit it starts one for the second, and so on.
I thought that I would have 1 JShell with all dependencies of my entire project.
Did I misunderstand how I'm suppose to use the plugin?
nxd@pcvlf3381:~/Projects/sparta$ mvn com.github.johnpoth:jshell-maven-plugin:1.1:run
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for be.vaph.sparta.services.actoren:actoren-remote:jar:20.4.0-SNAPSHOT
[WARNING] 'dependencies.dependency.version' for org.jetbrains:annotations:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 152, column 22
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Sparta [pom]
[INFO] Testing [pom]
[INFO] Testing - Common [jar]
[INFO] Architectuur [pom]
[INFO] Architectuur - Minimal [jar]
[INFO] Testing - Integration [jar]
[INFO] Architectuur - Common [jar]
[INFO] Architectuur - REST-client [jar]
...
[INFO] E-Loket - Web [jar]
[INFO] Angular clients [jar]
[INFO] REST Gateway [jar]
[INFO]
[INFO] ---------------------------< be.vaph:sparta >---------------------------
[INFO] Building Sparta 20.4.0-SNAPSHOT [1/154]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- jshell-maven-plugin:1.1:run (default-cli) @ sparta ---
File '/home/nxd/Projects/sparta/target/classes' for '--class-path' is not found.
File '/home/nxd/Projects/sparta/target/classes' for '--class-path' is not found.
[INFO]
[INFO] -----------------------< be.vaph.sparta:testing >-----------------------
[INFO] Building Testing 20.4.0-SNAPSHOT [2/154]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- jshell-maven-plugin:1.1:run (default-cli) @ testing ---
File '/home/nxd/Projects/sparta/testing/target/classes' for '--class-path' is not found.
File '/home/nxd/Projects/sparta/testing/target/classes' for '--class-path' is not found.
[INFO]
[INFO] ---------------< be.vaph.sparta.testing:testing-common >----------------
[INFO] Building Testing - Common 20.4.0-SNAPSHOT [3/154]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- jshell-maven-plugin:1.1:run (default-cli) @ testing-common ---
| Welcome to JShell -- Version 11.0.6
| For an introduction type: /help intro
jshell> /exit
| Goodbye
[INFO]
[INFO] --------------------< be.vaph.sparta:architectuur >---------------------
[INFO] Building Architectuur 20.4.0-SNAPSHOT [4/154]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- jshell-maven-plugin:1.1:run (default-cli) @ architectuur ---
File '/home/nxd/Projects/sparta/architectuur/target/classes' for '--class-path' is not found.
File '/home/nxd/Projects/sparta/architectuur/target/classes' for '--class-path' is not found.
[INFO]
[INFO] ----------< be.vaph.sparta.architectuur:architectuur-minimal >----------
[INFO] Building Architectuur - Minimal 20.4.0-SNAPSHOT [5/154]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- jshell-maven-plugin:1.1:run (default-cli) @ architectuur-minimal ---
| Welcome to JShell -- Version 11.0.6
| For an introduction type: /help intro
jshell>
Hi @NickDeGraeve ! So the plugin works by gathering all your Maven
module's dependencies
and start a Jshell
session with those dependencies in the classpath
. In that sense it's not made for parent projects although that might be a good idea for an enhancement? Right now you would need to run the plugin from a module that has all the dependencies you want or build the module yourself.
HTH!