3

I tried to create a JavaFX maven project following the official doc (chapter IntelliJ with maven, non modular project). I replaced as outlined the archtype artififact id as : javafx-archetype-simple but when I try to create a project using the archtype, I still get the following error :

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.1:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.openjfx:maven-archetype-quickstart:0.0.1)

Any clue of what I did wrong ?

Ombrelin
  • 547
  • 1
  • 8
  • 27
  • There are a lot of different steps in the doc. Which route did you take? – SedJ601 May 17 '20 at 04:12
  • Yes sorry, I edited to indicate what chapter I took – Ombrelin May 17 '20 at 08:32
  • Look at https://repo1.maven.org/maven2/org/openjfx/javafx-maven-archetypes/0.0.1/. There is no JAR in the repository. How did you import it? – dan1st May 17 '20 at 08:34
  • I added the coordinates in IntelliJ archetypes menu – Ombrelin May 17 '20 at 08:36
  • 2
    You missed the part that says `Select the archetype artifactId, between javafx-archetype-fxml or javafx-archetype-simple, based on the use of FXML or not in your project.` – José Pereda May 17 '20 at 11:14
  • @JoséPereda Thank you for your answer it was indeed the case, I updated my post according to your advice but it still doesn't work. – Ombrelin May 17 '20 at 14:51
  • You can even try version 0.0.5, it should be available: https://repo1.maven.org/maven2/org/openjfx/javafx-archetype-simple/0.0.5/ (even 0.0.1 should work). – José Pereda May 17 '20 at 14:58

1 Answers1

1

After spending a lot of time on this, I realized that I wasn't indicating "javafx-version" in the properties tab.

I set that property to 12 and it worked for me. Here's a pic.

screenshot of the menu

Also, as @JosePereda noted, make sure to choose the correct archetypeArtifactId

Kidus Tekeste
  • 651
  • 2
  • 10
  • 28
Danny.m
  • 26
  • 2