JavaFX 11 snapshots in maven sonatype
Michael Paus
mp at jugs.org
Fri Jul 6 10:40:54 UTC 2018
Hi,
I tried the examples on my Mac with Maven and with a simple
mvn clean package exec:java
on the command line they all compiled and worked out of the box.
Great work! I used OpenJDK 11ea20 for this.
I have a few questions though:
1. I observed that maven downloaded all dependencies for all platforms
(mac,win,linux)
which does not seem to make much sense. Is this normal or could that be
prevented somehow?
2. How would the platform concept be extended once we have to also
distinguish between architectures?
(Linux on x86 vs. Linux on ARM for the Raspi for example)
3. How is this setup supposed to be used in an IDE like Eclipse. I tried
to import one of the example projects
into Eclipse and Eclipse ended up creating maven dependencies for all
platforms and not just the Mac.
This has the consequence that you cannot start an example directly in
Eclipse anymore because it then fails with:
Error: JavaFX runtime components are missing, and are required to
run this application
You can launch it via maven but I normally prefer to do it directly
which is no problem with a normal maven project.
Michael
Am 05.07.18 um 11:03 schrieb Johan Vos:
> A first batch of snapshots for the JavaFX 11 modules is now in the maven
> sonatype snapshot repository (see
> https://oss.sonatype.org/content/repositories/snapshots/org/openjfx/ although
> you probably don't want to work with these artifacts directly but use build
> tools like maven or gradle to do that)
>
> This is work based on the not-yet-merged PR#83:
> https://github.com/javafxports/openjdk-jfx/pull/83
>
> Basically, you need to specify which modules you need (transitive
> dependency management will be handled by maven as the modules contain a
> pom.xml with the same dependencies as the module-info.java), e.g.
>
>
> <dependency>
> <groupId>org.openjfx</groupId>
> <artifactId>javafx.controls</artifactId>
> <version>11.0.0-SNAPSHOT</version>
> </dependency>
>
>
> I have a few samples that show how you can use those artifacts in your
> maven project:
> https://github.com/johanvos/javafx11samples (note that this is a temporary
> repository)
> the topics/javafx3d directory contains a number of standalone samples that
> can be executed via
> mvn clean install exec:java
>
> Note that some of the samples create a build.gradle as well, but I never
> managed to get gradle working with the combination of classifiers and
> SNAPSHOT versions (it's actually the reason why I went back from gradle to
> maven in other projects -- e.g. dl4j related).
>
> If someone else can somehow fix the build.gradle, that would be great of
> course.
>
> Before PR#83 is merged, it would be nice to have a few reports from people
> using the snapshots.
>
> - Johan
More information about the openjfx-dev
mailing list