os-maven-plugin icon indicating copy to clipboard operation
os-maven-plugin copied to clipboard

Extract detector into it's own artifact

Open aalmiray opened this issue 3 years ago • 1 comments

First off, I love this plugin! I use its detector API in non-maven scenarios:

  • In enforcer-gradle-plugin as an implementation of the RequireOs rule https://github.com/kordamp/enforcer-gradle-plugin/blob/master/core/enforcer-rules/src/main/groovy/enforcer/rules/RequireOS.groovy#L172
  • In the Kordamp profiles-gradle-plugin to find out if a profile may be activated by OS properties https://github.com/kordamp/kordamp-gradle-plugins/blob/8ef612c3fd023e9847d22af578c038258e4af92e/plugins/profiles-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/profiles/internal/ActivationOs.groovy#L169
  • In Layrry to find out OS classifiers required by JavaFX artifacts https://github.com/moditect/layrry/blob/74410ed967ac46d194387deed0cd96de4d50f2c9/layrry-config/src/main/java/org/moditect/layrry/config/LayersConfigLoader.java#L178

It'd be great if the Detector API (Detector, providers, and exception) were to be found in its own artifact. That way other non-maven consumers can use it as is, without having to exclude Maven dependencies. The os-maven-plugin project would have to migrate to a multi-project build so that the plugin consumes the library and releases stay in sync.

An additional benefit would be to transform the library into a full module. No worries, it can stay in Java 8 if the https://github.com/moditect/moditect plugin is used to generate the module descriptor.

I can contribute patches 😄

aalmiray avatar Mar 02 '21 10:03 aalmiray

Any thoughts on this? Would contribute a PR if given the green light 😅

aalmiray avatar Feb 17 '23 18:02 aalmiray