0

Ive been trying to set up JavaFX with Maven nearly the whole day.

Although it seems to be working (I could run the demo and there were no errors), I am still puzzled as to why I cant find the "org.openjfx:..." Archetypes in the "new Project window"

enter image description here

even thought the files exist inside my local Maven repository.

enter image description here

I am using Maven 3.6.3 and Intellij 2021.2.2

Görkem
  • 1
  • 4
  • Please add code and data as text ([using code formatting](//stackoverflow.com/editing-help#code)), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and [many more reasons](//meta.stackoverflow.com/a/285557). Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data. – cigien Sep 27 '21 at 18:58
  • ok, I will remove the picture with the code. Thanks for the advice – Görkem Sep 27 '21 at 19:02
  • Removing the image is only part of it. Much more important is that you add the relevant information as formatted text. Take some time to read the links I shared, and edit your question accordingly. Also, make sure to read [ask] if you haven't done so already. – cigien Sep 27 '21 at 19:05
  • I'll keep code formatting in my mind for future Questions. But except for that the only problem I can see is that I did not tell what my Maven, Intellij and other component versions are. – Görkem Sep 27 '21 at 19:09
  • I think, by default, [intellij only knows about its internal present maven archetypes, not custom maven archetypes](https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009667139/comments/360002485460). You could try [the maven archetype catalogs plugin for intellij](https://plugins.jetbrains.com/plugin/7965-maven-archetype-catalogs?_ga=2.7505457.224375986.1632760355-660839124.1632428660) which allows you to use custom archetype catalogs. I have never used it. Or you could construct the artefacts from the command line. Or perhaps easier, import the projects from a github link – jewelsea Sep 28 '21 at 00:21
  • That's basically what I did. I first tried to add the archetype via the "new Project" window. After that didn't work, i fetched the files directly via GitHub link. And finally I added the correct groupId, artifactId and version inside my pom.xml file, which got it to work. But still it doesn't show up on "new Project", so for future projects I would have to fetch the file every time which I would like to avoid if possible. – Görkem Sep 28 '21 at 12:07
  • I did not try it but I think the archetype catalog plug-in I linked, if correctly configured, would allow to create projects based on the openjfx archetypes directly from the ide rather than via the command line as documented in the readme files [root](https://github.com/openjfx/javafx-maven-archetypes) and [sample](https://github.com/openjfx/javafx-maven-archetypes/tree/master/javafx-archetype-fxml) for the archetypes. If it were me I wouldn’t use archetypes for a new project, I would use the idea [new JavaFX project wizard](https://www.jetbrains.com/help/idea/javafx.html) – jewelsea Sep 28 '21 at 15:13
  • Thank you for the Info, creating a JavaFX project results in exactly what I had wanted from the beginning. – Görkem Sep 28 '21 at 15:35

0 Answers0