michael-o commented on pull request #76:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/76#issuecomment-661065330


   OK, went through the code, here it is:
   ```
               if ( theOutputScope && artifact.isOptional() )
               {
                   messageBuilder.a( " (optional) " );
               }
   
               // dependencies:collect won't download jars
               if ( artifact.getFile() != null )
               {
                   ModuleDescriptor moduleDescriptor = getModuleDescriptor( 
artifact.getFile() );
                   if ( moduleDescriptor != null )
                   {
                       messageBuilder.project( " -- module " + 
moduleDescriptor.name );
   
                       if ( moduleDescriptor.automatic )
                       {
                           if ( "MANIFEST".equals( 
moduleDescriptor.moduleNameSource ) )
                           {
                               messageBuilder.strong( " [auto]" );
                           }
                           else
                           {
                               messageBuilder.warning( " (auto)" );
                           }
                       }
                   }
               }
               artifactStringList.add( messageBuilder.toString() + 
System.lineSeparator() );
   ```
   
   Let's dissect and discuss:
   1. If it is not optional, we don't have a problem.
   2. If it is optional and "artifact.getFile() == null" or "moduleDescriptor 
== null" we'll see the trailing space. Since we'd have, in a positive case: 
"(optional)<SPACE><SPACE>-- module...". Why not simply remove the space from 
the optional? @rfscholte @hboutemy Any objections? Is my analysis correct?


----------------------------------------------------------------
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:
[email protected]


Reply via email to