You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/04/25 22:50:42 UTC

[GitHub] [maven] Dufgui opened a new pull request #470: Mng 6294

Dufgui opened a new pull request #470:
URL: https://github.com/apache/maven/pull/470


   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [ ] 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.
    - [ ] Each commit in the pull request should have a meaningful subject line and body.
    - [ ] Format the pull request title like `[MNG-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MNG-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the 
          commit message.
    - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will 
          be performed on your pull request automatically.
    - [ ] 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.
   
    - [ ] 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.

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



[GitHub] [maven] rfscholte commented on pull request #470: [MNG-6294] - Convert MavenPluginValidator into a JSR330 component

Posted by GitBox <gi...@apache.org>.
rfscholte commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-830844802


   By having an interface you start a contract, and I have my doubts about the method signature.
   Can we move both classes to the internal package (and maybe reduce the visibility to package private) until there is a MavenPluginValidator signature we can agree on?


-- 
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.

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



[GitHub] [maven] michael-o commented on pull request #470: [MNG-6294] - Convert MavenPluginValidator into a JSR330 component

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-830843378


   @rfscholte I'd like to merge this, as it looks fine to me. Regarding your concern: https://github.com/apache/maven/pull/134#issuecomment-518747033
   I do agree, but that is a different issue. The interface must be changed for a collector like in `DefaultModelValidator`, but I don't want to conflate two different things. So, if you don't object, I will run ITs and merge.


-- 
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.

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



[GitHub] [maven] Dufgui commented on pull request #470: [MNG-6294] - Convert MavenPluginValidator into a plexus component

Posted by GitBox <gi...@apache.org>.
Dufgui commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-830030964


   is it ok @michael-o ?


-- 
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.

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



[GitHub] [maven] michael-o commented on pull request #470: [MNG-6294] - Convert MavenPluginValidator into a JSR330 component

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-830840196


   Going through...


-- 
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.

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



[GitHub] [maven] michael-o commented on pull request #470: [MNG-6294] - Convert MavenPluginValidator into a JSR330 component

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-830847060


   @rf https://github.com/apache/maven/compare/master...MNG-6294 Is that what you had in mind?


-- 
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.

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



[GitHub] [maven] michael-o commented on pull request #470: [MNG-6294] - Convert MavenPluginValidator into a plexus component

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-830032516


   Its in my queue, I will try to process this weekend.


-- 
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.

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



[GitHub] [maven] Dufgui commented on pull request #470: Mng 6294

Posted by GitBox <gi...@apache.org>.
Dufgui commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-826711102


   yes but i don't know how to reuse it, if i am not the author. I rebase the code and do what is asked in the other PR


-- 
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.

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



[GitHub] [maven] Dufgui commented on pull request #470: Mng 6294

Posted by GitBox <gi...@apache.org>.
Dufgui commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-826712068


   https://github.com/apache/maven/pull/134


-- 
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.

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



[GitHub] [maven] michael-o edited a comment on pull request #470: [MNG-6294] - Convert MavenPluginValidator into a JSR330 component

Posted by GitBox <gi...@apache.org>.
michael-o edited a comment on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-830847060


   @rfscholte  https://github.com/apache/maven/compare/master...MNG-6294 Is that what you had in mind?


-- 
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.

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



[GitHub] [maven] Dufgui commented on pull request #470: [MNG-6294] - Convert MavenPluginValidator into a JSR330 component

Posted by GitBox <gi...@apache.org>.
Dufgui commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-830044946


   thanks


-- 
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.

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



[GitHub] [maven] asfgit closed pull request #470: [MNG-6294] - Convert MavenPluginValidator into a JSR330 component

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #470:
URL: https://github.com/apache/maven/pull/470


   


-- 
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.

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



[GitHub] [maven] Dufgui edited a comment on pull request #470: Mng 6294

Posted by GitBox <gi...@apache.org>.
Dufgui edited a comment on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-826711102


   yes but i don't know how to reuse it, if i am not the author. I rebase the code and do what is asked in the other PR. Is it possible?


-- 
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.

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



[GitHub] [maven] michael-o commented on pull request #470: Mng 6294

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-826605650


   Please note that there is already a PR for this issue...


-- 
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.

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



[GitHub] [maven] Dufgui commented on a change in pull request #470: Mng 6294

Posted by GitBox <gi...@apache.org>.
Dufgui commented on a change in pull request #470:
URL: https://github.com/apache/maven/pull/470#discussion_r620057883



##########
File path: maven-core/src/main/java/org/apache/maven/plugin/MavenPluginValidator.java
##########
@@ -19,63 +19,16 @@
  * under the License.
  */
 
-import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 
 /**
  * MavenPluginValidator
  */
-public class MavenPluginValidator
+public interface MavenPluginValidator
 {
-    private final Artifact pluginArtifact;
-
-    private List<String> errors = new ArrayList<>();
-
-    private boolean firstDescriptor = true;
-
-    public MavenPluginValidator( Artifact pluginArtifact )
-    {
-        this.pluginArtifact = pluginArtifact;
-    }
-
-    public void validate( PluginDescriptor pluginDescriptor )
-    {
-        /*
-         * NOTE: For plugins that depend on other plugin artifacts the plugin realm contains more than one plugin
-         * descriptor. However, only the first descriptor is of interest.
-         */
-        if ( !firstDescriptor )

Review comment:
       This code seems to be unused because before the MavenPluginValidator is created by each pluginDescriptor in DefaultMavenPluginManager: https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java#L246
   I don't think we need 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.

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



[GitHub] [maven] michael-o commented on a change in pull request #470: Mng 6294

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #470:
URL: https://github.com/apache/maven/pull/470#discussion_r619893688



##########
File path: maven-core/src/main/java/org/apache/maven/plugin/MavenPluginValidator.java
##########
@@ -19,63 +19,16 @@
  * under the License.
  */
 
-import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 
 /**
  * MavenPluginValidator
  */
-public class MavenPluginValidator
+public interface MavenPluginValidator
 {
-    private final Artifact pluginArtifact;
-
-    private List<String> errors = new ArrayList<>();
-
-    private boolean firstDescriptor = true;
-
-    public MavenPluginValidator( Artifact pluginArtifact )
-    {
-        this.pluginArtifact = pluginArtifact;
-    }
-
-    public void validate( PluginDescriptor pluginDescriptor )
-    {
-        /*
-         * NOTE: For plugins that depend on other plugin artifacts the plugin realm contains more than one plugin
-         * descriptor. However, only the first descriptor is of interest.
-         */
-        if ( !firstDescriptor )

Review comment:
       How is this solved after removal?




-- 
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.

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



[GitHub] [maven] michael-o commented on pull request #470: [MNG-6294] - Convert MavenPluginValidator into a JSR330 component

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #470:
URL: https://github.com/apache/maven/pull/470#issuecomment-830844920


   > 
   > 
   > By having an interface you start a contract, and I have my doubts about the method signature.
   > Can we move both classes to the internal package (and maybe reduce the visibility to package private) until there is a MavenPluginValidator signature we can agree on?
   
   I guess so. Let me try that.


-- 
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.

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



[GitHub] [maven] michael-o commented on a change in pull request #470: Mng 6294

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #470:
URL: https://github.com/apache/maven/pull/470#discussion_r619893688



##########
File path: maven-core/src/main/java/org/apache/maven/plugin/MavenPluginValidator.java
##########
@@ -19,63 +19,16 @@
  * under the License.
  */
 
-import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 
 /**
  * MavenPluginValidator
  */
-public class MavenPluginValidator
+public interface MavenPluginValidator
 {
-    private final Artifact pluginArtifact;
-
-    private List<String> errors = new ArrayList<>();
-
-    private boolean firstDescriptor = true;
-
-    public MavenPluginValidator( Artifact pluginArtifact )
-    {
-        this.pluginArtifact = pluginArtifact;
-    }
-
-    public void validate( PluginDescriptor pluginDescriptor )
-    {
-        /*
-         * NOTE: For plugins that depend on other plugin artifacts the plugin realm contains more than one plugin
-         * descriptor. However, only the first descriptor is of interest.
-         */
-        if ( !firstDescriptor )

Review comment:
       How is this solved after removal?




-- 
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.

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