Skip to content

siddhsql/maven-exec-jpms-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Complete example showing how Maven sucks. Objective: create a modularized application using Java Module System and be able to use service locator pattern to load a plugin at runtime.

Build

mvn install

Run

cd consumer
mvn exec:java -Dexec.mainClass=consumer/mycompany.consumer.App

Output:

[INFO] --- exec:3.1.0:java (default-cli) @ consumer ---
unable to load service provider

full log

Now run using java

java -p ./target/classes:../contract/target/classes:../provider/target/classes --module consumer/mycompany.consumer.App

Output:

Hello Sam

This is the correct output that maven exec plugin should have produced. 9 out of 10 times when you have a problem with Java the cause is not JDK, its Maven.

About

Maven Sucks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages