You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "hgschmie (via GitHub)" <gi...@apache.org> on 2023/05/19 19:30:12 UTC

[GitHub] [maven] hgschmie opened a new pull request, #1116: [MNG-7787] Introduce new options for plugin validation report

hgschmie opened a new pull request, #1116:
URL: https://github.com/apache/maven/pull/1116

   - Make the default not emit any warnings.
   - replace the current default behavior with "SUMMARY"
   
   This restores the old pre-3.9.0 behavior re: deprecation warnings
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
    - [X] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed
          for the change (usually before you start working on it).  Trivial changes like typos do not
          require a JIRA issue. Your pull request should address just this issue, without
          pulling in other changes.
    - [X] Each commit in the pull request should have a meaningful subject line and body.
    - [X] Format the pull request title like `[MNG-XXX] SUMMARY`,
          where you replace `MNG-XXX` and `SUMMARY` with the appropriate JIRA issue.
    - [X] Also format the first line of the commit message like `[MNG-XXX] SUMMARY`.
          Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
    - [X] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [X] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will
          be performed on your pull request automatically.
    - [X] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [X] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] rmannibucau commented on pull request #1116: [MNG-7787] Introduce new options for plugin validation report

Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1556127323

   @slawekjaranowski a misconfiguration should be reported indeed, but the point is: why at each run? it is a static analyzis thing and should either be done at request (help:validate-project for ex) and then forgotten cause if user intend this usage (some deprecation have no replacement and are intended to be used temporarly). So for me we address a very good usage but with a wrong solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] hgschmie commented on pull request #1116: [MNG-7787] Introduce new options for plugin validation report

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1556327009

   @slawekjaranowski This is all about warnings being actionable.
   
   this is what the Jdbi build tells me right now:
   
   ```
   [WARNING] Plugin validation issues were detected in 11 plugin(s)
   [WARNING]
   [WARNING]  * org.apache.maven.plugins:maven-source-plugin:3.2.1
   [WARNING]   Declared at location(s):
   [WARNING]    * org.basepom:basepom-foundation:54-SNAPSHOT (/Users/henning/.m2/repository/org/basepom/basepom-foundation/54-SNAPSHOT/basepom-foundation-54-SNAPSHOT.pom) @ line 865
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin should declare these Maven artifacts in `provided` scope: [org.apache.maven:maven-settings-builder:3.0, org.apache.maven:maven-repository-metadata:3.0, org.apache.maven:maven-artifact:3.0, org.apache.maven:maven-plugin-api:3.0, org.apache.maven:maven-settings:3.0, org.apache.maven:maven-aether-p
   rovider:3.0, org.apache.maven:maven-model:3.0, org.apache.maven:maven-core:3.0, org.apache.maven:maven-model-builder:3.0]
   [WARNING]
   [WARNING]  * io.github.git-commit-id:git-commit-id-maven-plugin:5.0.0
   [WARNING]   Declared at location(s):
   [WARNING]    * org.basepom:basepom-foundation:54-SNAPSHOT (/Users/henning/.m2/repository/org/basepom/basepom-foundation/54-SNAPSHOT/basepom-foundation-54-SNAPSHOT.pom) @ line 812
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin should declare these Maven artifacts in `provided` scope: [org.apache.maven:maven-aether-provider:3.1.0-alpha-1, org.apache.maven:maven-settings:3.1.0-alpha-1, org.apache.maven:maven-settings-builder:3.1.0-alpha-1, org.apache.maven:maven-core:3.1.0-alpha-1, org.apache.maven:maven-model-builder:3
   .1.0-alpha-1, org.apache.maven:maven-model:3.1.0-alpha-1, org.apache.maven:maven-artifact:3.1.0-alpha-1, org.apache.maven:maven-repository-metadata:3.1.0-alpha-1, org.apache.maven:maven-plugin-api:3.1.0-alpha-1]
   [WARNING]
   [WARNING]  * org.jacoco:jacoco-maven-plugin:0.8.10
   [WARNING]   Declared at location(s):
   [WARNING]    * org.basepom:basepom-foundation:54-SNAPSHOT (/Users/henning/.m2/repository/org/basepom/basepom-foundation/54-SNAPSHOT/basepom-foundation-54-SNAPSHOT.pom) @ line 1013
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (pom.xml)
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (target/new-pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin is a Maven 2.x plugin, which will be not supported in Maven 4.x
   [WARNING]    * Plugin mixes multiple Maven versions: [3.0, 2.0.2]
   [WARNING]    * Plugin should declare these Maven artifacts in `provided` scope: [org.apache.maven:maven-repository-metadata:3.0, org.apache.maven:maven-artifact:3.0]
   [WARNING]    * Plugin depends on plexus-container-default, which is EOL
   [WARNING]
   [WARNING]  * com.hubspot.maven.plugins:dependency-scope-maven-plugin:0.10
   [WARNING]   Declared at location(s):
   [WARNING]    * org.basepom:basepom-foundation:54-SNAPSHOT (/Users/henning/.m2/repository/org/basepom/basepom-foundation/54-SNAPSHOT/basepom-foundation-54-SNAPSHOT.pom) @ line 943
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (target/new-pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin should declare these Maven artifacts in `provided` scope: [org.apache.maven:maven-core:3.3.3, org.apache.maven:maven-model-builder:3.3.3, org.apache.maven:maven-plugin-api:3.3.3, org.apache.maven:maven-model:3.3.3, org.apache.maven:maven-builder-support:3.3.3, org.apache.maven:maven-settings:3.3.3, org.apache.maven:maven-aether-provider:3.3.3, org.apache.maven:maven-settings-builder:3.3.3, org.apache.maven:maven-repository-metadata:3.3.3, org.apache.maven:maven-artifact:3.3.3]
   [WARNING]
   [WARNING]  * org.apache.maven.plugins:maven-dependency-plugin:3.5.0
   [WARNING]   Declared at location(s):
   [WARNING]    * org.basepom:basepom-foundation:54-SNAPSHOT (/Users/henning/.m2/repository/org/basepom/basepom-foundation/54-SNAPSHOT/basepom-foundation-54-SNAPSHOT.pom) @ line 899
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (target/new-pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin depends on plexus-container-default, which is EOL
   [WARNING]   Mojo issue(s):
   [WARNING]    * Mojo dependency:analyze-only (org.apache.maven.plugins.dependency.analyze.AnalyzeOnlyMojo)
   [WARNING]      - Implements `Contextualizable` interface from Plexus Container, which is EOL.
   [WARNING]
   [WARNING]  * org.basepom.maven:property-helper-maven-plugin:3.0
   [WARNING]   Declared at location(s):
   [WARNING]    * org.basepom:basepom-foundation:54-SNAPSHOT (/Users/henning/.m2/repository/org/basepom/basepom-foundation/54-SNAPSHOT/basepom-foundation-54-SNAPSHOT.pom) @ line 786
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin depends on plexus-container-default, which is EOL
   [WARNING]   Mojo issue(s):
   [WARNING]    * Mojo property-helper:get (org.basepom.mojo.propertyhelper.GetPropertiesMojo)
   [WARNING]      - Implements `Contextualizable` interface from Plexus Container, which is EOL.
   [WARNING]
   [WARNING]  * com.github.spotbugs:spotbugs-maven-plugin:4.7.3.4
   [WARNING]   Declared at location(s):
   [WARNING]    * org.basepom:basepom-foundation:54-SNAPSHOT (/Users/henning/.m2/repository/org/basepom/basepom-foundation/54-SNAPSHOT/basepom-foundation-54-SNAPSHOT.pom) @ line 971
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (target/new-pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin depends on plexus-container-default, which is EOL
   [WARNING]
   [WARNING]  * org.apache.maven.plugins:maven-invoker-plugin:3.5.1
   [WARNING]   Declared at location(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (pom.xml) @ line 166
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (target/new-pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin depends on plexus-container-default, which is EOL
   [WARNING]
   [WARNING]  * org.antlr:antlr4-maven-plugin:4.12.0
   [WARNING]   Declared at location(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (pom.xml) @ line 133
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin should declare these Maven artifacts in `provided` scope: [org.apache.maven:maven-artifact:3.8.5, org.apache.maven:maven-repository-metadata:3.8.5, org.apache.maven:maven-settings-builder:3.8.5, org.apache.maven:maven-resolver-provider:3.8.5, org.apache.maven:maven-model-builder:3.8.5, org.apach
   e.maven:maven-core:3.8.5, org.apache.maven:maven-plugin-api:3.8.5, org.apache.maven:maven-model:3.8.5, org.apache.maven:maven-builder-support:3.8.5, org.apache.maven:maven-settings:3.8.5]
   [WARNING]
   [WARNING]  * org.apache.maven.plugins:maven-pmd-plugin:3.20.0
   [WARNING]   Declared at location(s):
   [WARNING]    * org.basepom:basepom-foundation:54-SNAPSHOT (/Users/henning/.m2/repository/org/basepom/basepom-foundation/54-SNAPSHOT/basepom-foundation-54-SNAPSHOT.pom) @ line 985
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (target/new-pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin depends on plexus-container-default, which is EOL
   [WARNING]   Mojo issue(s):
   [WARNING]    * Mojo pmd:pmd (org.apache.maven.plugins.pmd.PmdReport)
   [WARNING]      - Parameter 'localRepository' uses deprecated parameter expression '${localRepository}': ArtifactRepository type is deprecated and its use in Mojos should be avoided.
   [WARNING]
   [WARNING]  * org.apache.maven.plugins:maven-javadoc-plugin:3.5.0
   [WARNING]   Declared at location(s):
   [WARNING]    * org.basepom:basepom-foundation:54-SNAPSHOT (/Users/henning/.m2/repository/org/basepom/basepom-foundation/54-SNAPSHOT/basepom-foundation-54-SNAPSHOT.pom) @ line 851
   [WARNING]   Used in module(s):
   [WARNING]    * org.jdbi:jdbi3-core:3.38.3-SNAPSHOT (pom.xml)
   [WARNING]   Plugin issue(s):
   [WARNING]    * Plugin depends on plexus-container-default, which is EOL
   ```
   
   Of those:
   - 5x "should declare dependencies in 'provided' scope" - nothing I can do as an end user
   - 1x "Is a Maven 2.0 plugin"/"mixes multiple maven versions" - nothing I can do
   - 7x "Plugin depends on plexus-container-default, which is EOL" - nothing I can do
   - 2x "Implements `Contextualizable` interface from Plexus Container, which is EOL" - nothing I can do
   - 1x "deprecated parameter expression '${localRepository}'" - nothing I can do
   
   So my build, which throws *zero* warnings using maven 3.8.x suddenly starts to list 16 scary sounding warnings in 11 plugins. And not a single one is actually actionable besides "upgrade the plugin" or "report as a problem to the plugin author"
   
   If this were "you use <foo> in your pom.xml, which is deprecated", then that is an actionable warning and I am sure there would be zero pushback from anyone. In fact we already do that today (ironically in a different place) with problems with the pom (e.g. double-declared dependencies). Shouldn't that be part of the validator as well?
   
   I think @rmannibucau is correct. This is static analysis of the build and highlighting problems. Users may want to run those (I know that I want) and then choose to address them or free to ignore them. 
   
   But *forcing* them on the user without any option to opt out (adding a flag that users need to add explicitly in the next maven release does not count because it is technically not backwards compatible (adding the setting to a pom will cause warnings/errors with e.g. maven 3.9.2)) is a really bad idea. It is the equivalent of surfacing "internal server error" in an application to an end user. They can not do anything but "refresh the browser and hope".
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] cstamas commented on pull request #1116: [MNG-7787] Introduce new options for plugin validation report

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1573333189

   I think all this has been addressed and is merged (both maven-3.9.x and master). If you agree @hgschmie pls close this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] hgschmie commented on pull request #1116: [MNG-7787] Introduce new options for plugin validation report

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1555302832

   I very much disagree with your "my way or the highway" approach. There is a lot of criticism with the approach to "the purpose". Of course, you can just ram your approach through and hope for the best. It will not work, as the changes *will* break older builds that people do not update and you cause continuing pain for developers. People will be stuck on 3.9 forever because "it is the last version that supports that unmaintained foo plugin that I need for my build and can not move off" and grind their teeth. The answer will be "we move off maven", not "we fix that plugin". 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] slawekjaranowski commented on pull request #1116: [MNG-7787] Introduce new options for plugin validation report

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1556115743

   -1 for me for
   
   As I wrote on ML - we have two group of issues 
   - wrong using of plugin, like deprecated, not existed parameters 
   - and wrong implementation of inside plugin
   
   We should not hide problems which user should fix in theirs projects.
   
   I can agree to less talkative about wrong plugin implementations - but I think that is useful.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MNG-7787] Introduce new options for plugin validation report [maven]

Posted by "hgschmie (via GitHub)" <gi...@apache.org>.
hgschmie closed pull request #1116: [MNG-7787] Introduce new options for plugin validation report
URL: https://github.com/apache/maven/pull/1116


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] cstamas commented on pull request #1116: [MNG-7787] Introduce new options for plugin validation report

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1555194878

   -1 since, as nicely said on ML, it "defies the purpose".
   
   Stick to 3.8.x, if this is no go for you for any reason. 
   
   Goal is to fix issues all way down the pipe (like use of broken maven-plugin-plugin), and yes, not all core plugins are fixed, yet. Give us a bit more time, or hop in, never enough help in this area.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MNG-7787] Introduce new options for plugin validation report [maven]

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1830689106

   Issue is closed https://issues.apache.org/jira/browse/MNG-7787
   @hgschmie - I hope this PR can also be closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] rmannibucau commented on pull request #1116: [MNG-7787] Introduce new options for plugin validation report

Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1555335416

   Lets drop this code and mive it to help plugin
   Promise to be an issue in core happent so this impl failed, let's assume it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] rmannibucau commented on pull request #1116: [MNG-7787] Introduce new options for plugin validation report

Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1556116622

   @slawekjaranowski basic user interaction rule is to not show anything user dont care or cant do anything to fix it so it is fully inacurrate as of today, we'd better helo plugin dev with a live checker (ci/cd) and users with help plugin. Doing it at build time with maven does not reach original goal nor is relzvant since new versions will await user adoption (too late by design).
   Let s provide the right tool and not bother users (n) instead lf dev (1).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] slawekjaranowski commented on pull request #1116: [MNG-7787] Introduce new options for plugin validation report

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1116:
URL: https://github.com/apache/maven/pull/1116#issuecomment-1556124874

   @rmannibucau - I agree if user can not do anything with some of issue such warning should be minimized
   
   But do you also want to hide eg when user use parameter of plugin which is not exist? 
   In such case user can and should do something.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org