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

javafx:compile doesnt exist #81

Closed
mortensen opened this issue Apr 21, 2020 · 13 comments · Fixed by #83
Closed

javafx:compile doesnt exist #81

mortensen opened this issue Apr 21, 2020 · 13 comments · Fixed by #83
Assignees

Comments

@mortensen
Copy link

Your documentation:
"mvn javafx:compile"

Console output:
Could not find goal 'compile' in plugin org.openjfx:javafx-maven-plugin:0.0.4 among available goals jlink, run -> [Help 1]

@JTMMartins
Copy link

same problem.

@mortensen
Copy link
Author

mortensen commented Apr 28, 2020

I solved this by using jlink. But I guess if you aren't yet using jigsaw module system you need compile?

@betanzos
Copy link
Contributor

mvn javafx:compile

Use mvn compile instead. The command javafx:compile was removed but documentation is outdated.

mvn clean javafx:jlink work fine.

@tiainen
Copy link
Contributor

tiainen commented Apr 28, 2020

Yes, thanks for pointing this out. We'll update the docs to reflect the latest changes.

@odbuser2
Copy link

odbuser2 commented May 6, 2020

Tripped me up to...

@dwhitla
Copy link

dwhitla commented May 18, 2020

mvn javafx:compile

Use mvn compile instead. The command javafx:compile was removed but documentation is outdated.

mvn clean javafx:jlink work fine.

This is broken too.

image

@betanzos
Copy link
Contributor

Right, above I put it well

Use mvn compile instead.

and below I did not.

This is the right command

mvn clean compile javafx:jlink

Next version fix this behavior, so compile command may be omitted

@dwhitla
Copy link

dwhitla commented May 18, 2020

This doesn't work either. JavaFXJLinkMojo.jlinkExecutable is not resolved against the current JRE. This results in errors like the following unless you hard code the path to jlink in your POM.

Caused by: java.io.IOException: Cannot run program "jlink" (in directory "/Users/dwhitla/dev/code/samples/java/HelloJFX"): error=2, No such file or directory

Specifically JavaFXBaseMojo.getExecutablePath() does not perform as expected (the comment explains why) - the plugin jumps straight to looking for $JAVA_HOME instead of consulting the toolchain properties or the currently executing JRE ...
image
image

@betanzos
Copy link
Contributor

I suggest you open another issue since this problem is not related (at first glance) with the project compilation.

@dwhitla
Copy link

dwhitla commented May 18, 2020

Yes. I think it is related to #50 as it has the same root cause. But that issue isn't getting any love it seems.

@betanzos
Copy link
Contributor

Yes. I think it is related to #50 as it has the same root cause.

It may be so. In any case, please share any configuration that you think is relevant.

But that issue isn't getting any love it seems.

I think so too. I am waiting for an answer to the question I asked about the desired behavior to try to fix it.

@dwhitla
Copy link

dwhitla commented May 18, 2020

Yes. I think it is related to #50 as it has the same root cause.

It may be so. In any case, please share any configuration that you think is relevant.

For the simplest possible intro I created an empty JavaFX project from the javafx-archetype-simple maven archetype. I would expect following the tutorial verbatim to just work.

But that issue isn't getting any love it seems.

I think so too. I am waiting for an answer to the question I asked about the desired behavior to try to fix it.

Is there enough info in my last comment on that issue? If not I could look at fixing it myself.

@liugangnhm
Copy link

Right, above I put it well

Use mvn compile instead.

and below I did not.

This is the right command

mvn clean compile javafx:jlink

Next version fix this behavior, so compile command may be omitted

this works for me!

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.

8 participants