rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
128 stars 20 forks source link

Initial Pass at module-info.java for most modules #106

Closed rvesse closed 2 years ago

rvesse commented 3 years ago

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:

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 573


Totals Coverage Status
Change from base Build 565: 0.0%
Covered Lines: 5922
Relevant Lines: 8256

💛 - Coveralls
rvesse commented 3 years ago

Waiting on a new Apache Commons CSV release that has Automatic-Module-Name properly set

rvesse commented 2 years ago

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: