Closed rvesse closed 2 years ago
Waiting on a new Apache Commons CSV release that has Automatic-Module-Name
properly set
With apache/commons-csv#191 fix I get past the module load error but run into a different JPMS related error:
Exception in thread "main" java.lang.IllegalArgumentException: Failed to locate resource /exit-codes.csv with any of the configured resource locators
at com.github.rvesse.airline.help.external@2.9.0-SNAPSHOT/com.github.rvesse.airline.help.external.factories.ExternalHelpFactory.parseTabular(ExternalHelpFactory.java:230)
at com.github.rvesse.airline.help.external@2.9.0-SNAPSHOT/com.github.rvesse.airline.help.external.factories.ExternalHelpFactory.createSection(ExternalHelpFactory.java:73)
at com.github.rvesse.airline@2.9.0-SNAPSHOT/com.github.rvesse.airline.help.sections.factories.HelpSectionRegistry.getHelpSection(HelpSectionRegistry.java:97)
at com.github.rvesse.airline@2.9.0-SNAPSHOT/com.github.rvesse.airline.model.MetadataLoader.loadHelpSections(MetadataLoader.java:508)
at com.github.rvesse.airline@2.9.0-SNAPSHOT/com.github.rvesse.airline.model.MetadataLoader.loadCommand(MetadataLoader.java:470)
at com.github.rvesse.airline@2.9.0-SNAPSHOT/com.github.rvesse.airline.model.MetadataLoader.loadCommand(MetadataLoader.java:435)
at com.github.rvesse.airline@2.9.0-SNAPSHOT/com.github.rvesse.airline.SingleCommand.<init>(SingleCommand.java:80)
at com.github.rvesse.airline@2.9.0-SNAPSHOT/com.github.rvesse.airline.SingleCommand.singleCommand(SingleCommand.java:49)
at com.github.rvesse.airline.examples@2.9.0-SNAPSHOT/com.github.rvesse.airline.examples.ExampleExecutor.executeSingleCommand(ExampleExecutor.java:44)
at com.github.rvesse.airline.examples@2.9.0-SNAPSHOT/com.github.rvesse.airline.examples.userguide.help.sections.ExternalHelp.main(ExternalHelp.java:58)
This is because with a JPMS application we can't use generic resource like /foo.txt
and load it directly. Should look at building a ResourceLocator
that leverages JRT URIs per JEP 220 to resolve this:
This is work towards addressing #105, it creates hand crafted
module-info.java
for all the modules where that makes sense.Things to be addressed:
requires
declarations e.g.java.base