Skip to content
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

nativeRunAgent task fails on modular project with Gradle 7.x #128

Open
abhinayagarwal opened this issue Sep 2, 2021 · 11 comments
Open

nativeRunAgent task fails on modular project with Gradle 7.x #128

abhinayagarwal opened this issue Sep 2, 2021 · 11 comments

Comments

@abhinayagarwal
Copy link
Collaborator

abhinayagarwal commented Sep 2, 2021

The plugin and Gradle both adds --module-path to the java command and the later over-writes the former causing the task to fail

@vgroenewold
Copy link

So this may be my issue as well then, the plugin fails for me with any version above 0.1.36, .37 being the one that added that task.

@vgroenewold
Copy link

vgroenewold commented Sep 28, 2021

So, not to be annoying, but is this plugin still under active development? Seems like the issue responses are not very active. The problem here is that I want to use JavaFX and GraalVM on a big project, as this is my first project with them it would be nice to know if that combination is a good one still. Is the Maven plugin working for anyone, if so I may then need to switch systems.

@mipastgt
Copy link

The current version of both plugins (Maven/Gradle) is 1.0.6. You still seem to use the old plugin or mixed up the version numbers.

@abhinayagarwal
Copy link
Collaborator Author

@vgroenewold Both Maven and Gradle plugin are under active development. The most recent release version v1.0.6 is just 8 days old.

@vgroenewold
Copy link

I also tried the new versions and they give this exact problem as well unfortunately. All versions after the version that added the nativeRunAgent task are failing for me. Now trying maven to see if that does not show this specific issue.

@vgroenewold
Copy link

So just switched to Maven and there the runagent works, still have a javafx config issue somewhere but no problems with applying the plugin.

@matintokyo
Copy link

I have the same issue, using gradle 7.2 and com.gluonhq.gluonfx-gradle-plugin' version '1.0.7'
nativeRunAgent fails with module "xx.yy.zz" not found.
nativeBuild runs without issue using the same build.gradle

@TjayGs
Copy link

TjayGs commented Oct 23, 2021

If i create a clean project and only adding id 'com.gluonhq.gluonfx-gradle-plugin' version '1.0.7' then i got following error message:

Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'NativeRunAgentTask'.
...
Caused by: org.gradle.api.GradleException: javafxplugin:configJavafxRun task not found.

i added the javafxplugin manually
id 'org.openjfx.javafxplugin' version '0.0.10'

after that my sync task was successful. I am not a gradle plugin developer, but i've found 'org.openjfx:javafx-plugin:0.0.10' in this repository. So my used version is the same version as here

@vgroenewold
Copy link

So it's an installation issue then? Can that not be addressed?

@ClementGre
Copy link

ClementGre commented Feb 6, 2022

I have the same issue, when running nativeRunAgent, I get:

Configure project :
Project : => 'fr.clementgre.pdf4teachers' Java module

Task :nativeRunAgent FAILED
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.swing not found, required by fr.clementgre.pdf4teachers

While nativeBuild do work.

@maxt
Copy link

maxt commented Jul 6, 2022

Same problem.
nativeBuild works, but nativeRunAgent doesn't.

So, I have:
javafx {
version = "18"
modules("javafx.controls", "javafx.fxml", "javafx.web")
}
in my build.gradle, but it looks like nativeRunAgent ignores it.

Haven't found any solution or workaround yet.
Plugin version is: com.gluonhq:gluonfx-gradle-plugin:1.0.14
Gradle version is: 7.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants