2

I created a new JavaFX/OpenJFX project using the JavaFX template offered by IntelliJ IDEA 2023.2 RC. Using version 20 of both Java & JavaFX.

When running my app from the Maven panel within IntelliJ, choosing Plugins > javafx > javafx:run, after I quit the app I get these warnings in the console panel of IntelliJ:

[WARNING] [WARNING] Plugin validation issues were detected in 2 plugin(s) [WARNING] [WARNING] * org.openjfx:javafx-maven-plugin:0.0.8 [WARNING] * org.apache.maven.plugins:maven-resources-plugin:3.3.0 [WARNING] [WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE] [WARNING] 

Note that these warnings do not appear on the console until after quitting the execution of my app.

👉🏼 What is the meaning of these warnings? How to resolve them?

The first is the latest version. The second is nearly the latest, 3.3.0 versus the latest being 3.3.1. So I presume versioning is not the problem.

As suggested by the warnings, I tried defining that property within the POM. But doing so had no effect. I do not see any additional details in the console.

 <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.plugin.validation>VERBOSE</maven.plugin.validation> </properties> 

I found the existing Question, Plugin validation issues were detected in plugin(s). But none of the Answers seem relevant to my situation.

Web searching did not surface any helpful info.


I slightly modified the POM to look like this:

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>work.basil.voters</groupId> <artifactId>voters_wa</artifactId> <version>1.0-SNAPSHOT</version> <name>Voters WA</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.plugin.validation>VERBOSE</maven.plugin.validation> </properties> <dependencies> <dependency> <groupId>org.openjfx</groupId> <artifactId>javafx-controls</artifactId> <version>20</version> </dependency> <dependency> <groupId>org.openjfx</groupId> <artifactId>javafx-fxml</artifactId> <version>20</version> </dependency> <dependency> <groupId>org.controlsfx</groupId> <artifactId>controlsfx</artifactId> <version>11.1.2</version> </dependency> <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter --> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <version>5.10.0</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.11.0</version> <configuration> <source>20</source> <target>20</target> </configuration> </plugin> <plugin> <groupId>org.openjfx</groupId> <artifactId>javafx-maven-plugin</artifactId> <version>0.0.8</version> <executions> <execution> <!-- Default configuration for running with: mvn clean javafx:run --> <id>default-cli</id> <configuration> <mainClass>work.basil.voters.voters_wa/work.basil.voters.voters_wa.HelloApplication</mainClass> <launcher>app</launcher> <jlinkZipName>app</jlinkZipName> <jlinkImageName>app</jlinkImageName> <noManPages>true</noManPages> <stripDebug>true</stripDebug> <noHeaderFiles>true</noHeaderFiles> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> 
1
  • The property should be used in command line. For more details, please check the accepted answer here: stackoverflow.com/questions/76252691/… Commented Nov 5, 2023 at 21:10

2 Answers 2

3

Property maven.plugin.validation can not be set in project pom.xml it is used by Maven internally.

maven-resources-plugin was fixed in version 3.3.1

Please consult the Apache Maven documentation: https://maven.apache.org/guides/plugins/validation/index.html

Sign up to request clarification or add additional context in comments.

Comments

2

This was tricky for me to replicate. To do it, in addition to the instructions in the question:

  • I used Idea 2023.1.4 Ultimate Edition

  • changed my JAVA_HOME environment variable to point to the OpenJDK 20.0.2 installation.

    • the javafx-maven-plugin run command used the java version from JAVA_HOME which I originally had at 17, not that configured in Idea, so that gave class version mismatches as the Maven pom.xml provided requires to use only Java 20+.
  • changed the idea configuration to use the Maven version from the project maven wrapper rather than the inbuilt version from idea.

  • changed the Maven version in the project/.mvn/maven-wrapper.properties to:

    distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip 
    • versions older than 3.9 don't perform plugin validation and the default in my maven wrapper properties was a 3.8.x version.
  • Refreshed the maven project.

  • Right clicked on javafx:run in the maven panel.

  • Modified the Run configuration, set the run command to:

    -Dmaven.plugin.validation=verbose javafx:run -f pom.xml 
  • Ran the new configuration.

I received a warning in the output after completing the run:

[WARNING] * org.openjfx:javafx-maven-plugin:0.0.8 [WARNING] Plugin EXTERNAL issue(s): [WARNING] * Plugin mixes multiple Maven versions: [3.3.9, 3.6.0] [WARNING] * Plugin should declare Maven artifacts in `provided` scope. If the plugin already declares them in `provided` scope, update the maven-plugin-plugin to latest version. Artifacts found with wrong scope: [org.apache.maven:maven-core:3.6.0, org.apache.maven:maven-plugin-api:3.6.0] 

So it would appear to be a warning about an issue with javafx-maven-plugin:0.0.8 (that doesn't appear to affect its actual operation). Perhaps a bug or issue report could be filed for the plugin developers to request them to address the warning.

The warning regarding org.apache.maven.plugins:maven-resources-plugin:3.3.0 did not occur for me, as my setup was already using org.apache.maven.plugins:maven-resources-plugin:3.3.1, which is noted as fixed in Slawomir's answer.

For more info on plugin validation, as noted by Slawomir, see:

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.