You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2018/03/04 12:30:15 UTC

[maven-help-plugin] 01/01: [MPH-132] Drop parameter medium

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MPH-132
in repository https://gitbox.apache.org/repos/asf/maven-help-plugin.git

commit 2ffb4b46ec39bb86172e8656b32272ebf9f2d401
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Mar 4 13:29:49 2018 +0100

    [MPH-132] Drop parameter medium
---
 .../apache/maven/plugins/help/DescribeMojo.java    | 40 ++++++----------------
 1 file changed, 10 insertions(+), 30 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java b/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
index 61ca458..610d8c1 100644
--- a/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
+++ b/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
@@ -91,37 +91,37 @@ public class DescribeMojo
      * For deprecated values
      */
     private static final String NO_REASON = "No reason given";
-    
+
     private static final Pattern EXPRESSION = Pattern.compile( "^\\$\\{([^}]+)\\}$" );
 
     // ----------------------------------------------------------------------
     // Mojo components
     // ----------------------------------------------------------------------
-    
+
     /**
      * Component used to get a plugin descriptor from a given plugin.
      */
     @Component
     private MavenPluginManagerHelper pluginManager;
-    
+
     /**
      * Component used to get a plugin by its prefix and get mojo descriptors.
      */
     @Component
     private MojoDescriptorCreator mojoDescriptorCreator;
-    
+
     /**
      * Component used to resolve the version for a plugin.
      */
     @Component
     private PluginVersionResolver pluginVersionResolver;
-    
+
     /**
      * The Maven default built-in lifecycles.
      */
     @Component
     private DefaultLifecycles defaultLifecycles;
-    
+
     /**
      * A map from each packaging to its lifecycle mapping.
      */
@@ -196,14 +196,6 @@ public class DescribeMojo
     private boolean detail;
 
     /**
-     * This flag specifies that a medium list of goal (Mojo) information should be given.
-     *
-     * @since 2.0.2
-     */
-    @org.apache.maven.plugins.annotations.Parameter( property = "medium", defaultValue = "true" )
-    private boolean medium;
-
-    /**
      * This flag specifies that a minimal list of goal (Mojo) information should be given.
      *
      * @since 2.1
@@ -285,10 +277,6 @@ public class DescribeMojo
             detail = Boolean.parseBoolean( full );
         }
 
-        if ( detail || minimal )
-        {
-            medium = false;
-        }
     }
 
     /**
@@ -497,7 +485,7 @@ public class DescribeMojo
             return;
         }
 
-        if ( ( detail || medium ) && !minimal )
+        if ( !minimal )
         {
             append( buffer, "This plugin has " + mojos.size() + " goal" + ( mojos.size() > 1 ? "s" : "" ) + ":", 0 );
             buffer.append( LS );
@@ -507,15 +495,7 @@ public class DescribeMojo
 
             for ( MojoDescriptor md : mojos )
             {
-                if ( detail )
-                {
-                    describeMojoGuts( md, buffer, true );
-                }
-                else
-                {
-                    describeMojoGuts( md, buffer, false );
-                }
-
+                describeMojoGuts( md, buffer, detail );
                 buffer.append( LS );
             }
         }
@@ -1003,7 +983,7 @@ public class DescribeMojo
     /**
      * Determines if this Mojo should be used as a report or not. This resolves the plugin project along with all of its
      * transitive dependencies to determine if the Java class of this goal implements <code>MavenReport</code>.
-     * 
+     *
      * @param md Mojo descriptor
      * @return Whether or not this goal should be used as a report.
      */
@@ -1040,7 +1020,7 @@ public class DescribeMojo
     /**
      * Transforms the given plugin descriptor into an artifact coordinate. It is formed by its GAV information, along
      * with the given type.
-     * 
+     *
      * @param pd Plugin descriptor.
      * @param type Extension for the coordinate.
      * @return Coordinate of an artifact having the same GAV as the given plugin descriptor, with the given type.

-- 
To stop receiving notification emails like this one, please contact
michaelo@apache.org.