0

I have installed a fresh version of IntellIJ Idea (2018.1.2) and JDK 10.0.1. Maven 3.0 seems to come bundled with IntellIJ, but I have additionally downloaded and successfully installed it. In my pom file, there is a javafx dependency, and I am getting this:

enter image description here

Updating indices and reimporting doesn't help. What simple thing that will make it work am I too dumb to understand?

Kolya Ivankov
  • 129
  • 2
  • 11
  • Is javafx even on mavencentral? Has this pom ever worked? – luk2302 May 01 '18 at 17:41
  • JavaFX is not on mavencentral. It is part of JRE so you cannot find it on public repo. If this pom comes from a team project, I hope it works before. Also I suggest @Kolya is missing a private repository configuration. – lohnns May 01 '18 at 17:51

2 Answers2

1

This artifact is not on maven central. (see https://search.maven.org/#search%7Cga%7C1%7Ccom.oracle%20javafx)

Maybe you have to configure a repository in your maven configuration where you can find your missing artifacts.

lohnns
  • 173
  • 2
  • 8
  • You've got my problem. However, javafx plugin is also installed and enabled (double-chcecked). I was trying to comment the dependency out and build the project, but then I'm just told that several functions are not found. – Kolya Ivankov May 01 '18 at 18:11
  • And you cannot ask the other guys about their local maven configuration ? – lohnns May 01 '18 at 18:30
1

I think you are trying to use JavaFX as a Maven dependency. However, JavaFX is not available in a public Maven repository. JavaFX does not need to be hosted in a Maven repository as it is included as part of the underlying Java runtime.

pranay jain
  • 352
  • 1
  • 2
  • 15
  • 1
    I don't think we can change pom here. If I understand the question, Kolya is trying to install his IDE. It looks like I just get a team project and try to build it. Also if someone needs more information about JavaFX part of JRE, see https://stackoverflow.com/questions/19163076/javafx-latest-version-of-javafx-runtime – lohnns May 01 '18 at 17:49
  • @pranay jain Thanks, I have learned that javafx comes as a part of java, and therefore tried to exclude the dependency from pom and reimport. But my project still doesn't build. And it is indeed some other guys' project I am just trying to compile. – Kolya Ivankov May 01 '18 at 18:16
  • 1
    @KolyaIvankov: You can specify the path of JavaFX library on your local disk with the help of Maven. Refer the link https://stackoverflow.com/questions/19015731/javafx-project-doesnt-compile-with-maven?rq=1 or you can use maven JavaFX plugin as explained in link https://stackoverflow.com/questions/15278215/maven-project-with-javafx-with-jar-file-in-lib – pranay jain May 02 '18 at 04:20
  • @pranayjain well, maven plugin is on. I did specify the apecise path of jfxrt.jar, but it didn't help. I think I'll have to ask the guys who write the project then, for the case it it's an issue. Thanks! – Kolya Ivankov May 03 '18 at 07:18