robinst / autolink-java

Java library to extract links (URLs, email addresses) from plain text; fast, small and smart
MIT License
207 stars 40 forks source link

Add jlink-compatible Java9/Jigsaw module-info #39

Closed miasma closed 1 year ago

miasma commented 1 year ago

The commonmark-ext-autolink extension in https://github.com/commonmark/commonmark-java depends on this library. I quickly studied the classes and it seems that internal.Scanner is the only class that might be needed outside this module, but then again, the LinkExtractor doesn't seem to be designed to be extended. My suggestion is just to provide a simple module-info.java along the lines of:

module org.nibor.autolink {
    exports org.nibor.autolink;
}

For building and deployment multi-release jars, I've seen Maven projects use maven-jar-plugin or biz.aQute.bnd.bnd-maven-plugin.