-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update samples to use javafx 21, gradle 8.5, gradle-plugin 0.1.0, maven-plugin 0.0.8 #73
update samples to use javafx 21, gradle 8.5, gradle-plugin 0.1.0, maven-plugin 0.0.8 #73
Conversation
You might want to add the My findings on Eclipse 4.29: Eclipse - Gradle - Modular
eclipse {
classpath {
file {
whenMerged {
entries.findAll { it.properties.kind.equals('lib') }.each {
it.entryAttributes['module'] = 'true'
}
}
}
}
} Doesn't seem to do anything. Is it useful with more types of dependencies?
(with or without the code in point 1). According to https://stackoverflow.com/questions/53295226/eclipse-cannot-find-module-even-the-module-path-is-explicitly-provided, this should have been solved.
Eclipse - Gradle - Non-Modular
I think that that's supposed to happen, and should be fine after adding the VM arguments. Eclipse - ModularThe <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JavaFX11"> The user might not have such a user library defined and it's also not clear what to do with the jmods that were requested to be downloaded in the instructions, This is preventing compilation. Eclipse - Non-ModularWorks fine, but the Eclipse - Maven - Modular
Otherwise, runs fine both from Maven and from Eclipse. Eclipse - Maven - Non-ModularThis project uniquely contains test source files that don't compile because there's no JUnit dependency. Otherwise runs fine from Maven. From Eclipse it runs fine after adding the VM arguments. Might want to mention that in the instructions. |
Eclipse - Gradle - Modular
This was added as a part of #4. @jperedadnr can you check?
@jperedadnr ?
jlink task is not handled by javafx plugin. It is added via org.beryx.jlink plugin. I tried v3.0.1, it gives the same warning. Eclipse - Gradle - Non-Modular
Yes. This should also start running once we run gradle task Eclipse - Modular
Even without this entry the compilation will fail until the JavaFX SDK is not added to the module-path. Eclipse - Maven - Modular
good idea
Check #76
Can this be a non-version value? Eclipse - Maven - Non-Modular
will add the test dependencies in a different PR
good idea |
I found the issue. Running |
Eclipse - Modular
I don't see instructions to do so. The instructions say to download the jmods, not the sdk (as they do for non-modular projects). Eclipse - Maven - Modular
This should be auto-generated from the pom. The problem is that the pom is wrong: <maven.compiler.release>11</maven.compiler.release> This is used as the java version, not the maven compiler version. It's tied to the |
It was never tend to be used as the maven-compiler plugin version. One can define the |
Then why the need for <configuration>
<release>${maven.compiler.release}</release>
</configuration> for In any case, |
It's redundant piece of code. Ideally, it should be defined only at one place. |
A lot of the problems in these projects have to do with inconsistencies and the need for manual handling. I assume similar issues exist for the other IDE's and CL. As a future grand plan, I suggest that these projects be assembled automatically from prepared components:
Keeping 1 copy of each of these components makes it easier to maintain when versions need to be updated. A script can take them and create the projects with the right combinations. |
Keeping a common source is definitely a good idea. We will have to brain storm on how can we keep the source of the project and the final projects separate so as to not confuse the users. |
60b2e2d
to
455eecb
Compare
Looks good for the Eclipse projects. There's still a warning on the pom of Maven Modular: <plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>${javafx.maven.plugin.version}</version>
<configuration>
<release>${maven.compiler.release}</release> // warning: Invalid plugin configuration: release
<jlinkImageName>hellofx</jlinkImageName>
<launcher>launcher</launcher>
<mainClass>hellofx/org.openjfx.hellofx.App</mainClass>
</configuration>
</plugin> |
looks like an unwanted configuration. removed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
@jperedadnr In my comment #73 (comment), point 1 for the Eclipse Modular Gradle project shows some code that I don't see making a difference. Maybe it's needed if there are other types of dependencies? Is it still needed? |
@nlisker That was added with this PR #4 some time ago... I take that the Eclipse IDE at that moment didn't handle the modular dependencies properly. This StackOverflow post from that time might clarify it better: https://stackoverflow.com/questions/53295226/eclipse-cannot-find-module-even-the-module-path-is-explicitly-provided It seems that once the IDE issues were fixed, we updated the docs (no more warnings about it), but it might be that the code you are referring was never removed... It would be good to remove it if it is no longer needed, of course. |
I ran the project both after "Refresh Gradle project" and after running |
If you have tested it, I'm okay removing it. @abhinayagarwal can you go ahead and remove
from https://github.com/openjfx/samples/blob/master/IDE/Eclipse/Modular/Gradle/hellofx/build.gradle#L19 ? |
Done 👍 |
This looks good from the Eclipse point of view. Some followups can be:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Anything holding this from being merged? |
Also, makes the readme more generic by skipping version information