moditect / layrry

A Runner and API for Layered Java Applications
Apache License 2.0
335 stars 33 forks source link

Are artifact classifiers supported? #30

Closed aalmiray closed 4 years ago

aalmiray commented 4 years ago

Launching a JavaFX application may require platform specific artifacts. OpenJFX ships artifacts with a classifier, whose short notation would be in the form g:a:v:c, such as org.openjfx:javafx-base:11:mac.

Currently configuring a module like that results in

WARNING: Failed downloading org/openjfx/javafx-base/mac/javafx-base-mac.11 from https://repo1.maven.org/maven2/
gunnarmorling commented 4 years ago

Have you tried "org.openjfx:javafx-base:jar:mac:14.0.1"? This worked when I played around with JavaFx some time ago.

aalmiray commented 4 years ago

Ah, so groupId:artifactId:type:classifier:version instead? Yeah, that works.

I wish type could be omitted however given that classifiers are not supposed to be that common then I guess we'll have to keep it as is.

This format should be in the documentation just in case, wouldn't you agree?

gunnarmorling commented 4 years ago

This format should be in the documentation just in case, wouldn't you agree?

Yes, definitely. To give some background, Layrry is the result of a few weekends/evenings work so far, hence there's many less-than-ideal issues like that :)

aalmiray commented 4 years ago

Oh yeah, totally understand, Layrry is growing organically 😄

aalmiray commented 4 years ago

We may need to add limited expression evaluation capabilities as in the case for JavaFx you need to define a classifier but you would not want to fix the value in the file to keep it portable, that is,

org.openjfx:javafx-base:jar:${detected.os}:11

The alternative is to write a config file for each target platform.

aalmiray commented 4 years ago

Closing in favor of #38