Hi there,
thank you firstly for this great little helper tool :)
I recently ran Maven Plugin Validation on my projects, and it warned me that this plugin declares dependencies in the compile scope that should be in the provided scope instead. Here's the exact message I got:
[WARNING] * org.commonjava.maven.plugins:directory-maven-plugin:1.0
[WARNING] Plugin EXTERNAL issue(s):
[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.8.1, org.apache.maven:maven-plugin-api:3.8.1, org.apache.maven:maven-model:3.8.1]
If I understand this correctly, the best practice would be to declare dependencies like maven-core, maven-plugin-api or maven-model with <scope>provided</scope>.
Maven setup:
Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)
Maven home: C:\apache-maven-3.8.6-bin\apache-maven-3.8.6
Java version: 19.0.2, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-19.0.2.7-hotspot
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
To run the plugin validation yourself, you need a project that uses your plugin and then run mvn -Dmaven.plugin.validation=verbose package which will run a build and show all plugin validation errors at the end.
This is more of a warning rather than an actual error, so fixing it has a rather low priority, but I wanted to let you know nevertheless.
Cheers :)
Hi there,
thank you firstly for this great little helper tool :)
I recently ran Maven Plugin Validation on my projects, and it warned me that this plugin declares dependencies in the
compilescope that should be in theprovidedscope instead. Here's the exact message I got:If I understand this correctly, the best practice would be to declare dependencies like
maven-core,maven-plugin-apiormaven-modelwith<scope>provided</scope>.Maven setup:
To run the plugin validation yourself, you need a project that uses your plugin and then run
mvn -Dmaven.plugin.validation=verbose packagewhich will run a build and show all plugin validation errors at the end.This is more of a warning rather than an actual error, so fixing it has a rather low priority, but I wanted to let you know nevertheless.
Cheers :)