Peter De Maeyer created MSHADE-286:
--------------------------------------

             Summary: Artifacts to be included for shading are not consistently 
checked for existence
                 Key: MSHADE-286
                 URL: https://issues.apache.org/jira/browse/MSHADE-286
             Project: Maven Shade Plugin
          Issue Type: Improvement
    Affects Versions: 3.1.0
            Reporter: Peter De Maeyer


While looking at {{ShaderMojo.execute}}, I noticed that the artifacts to be 
included for shading are not consistently checked for existence.

For example, on line 404, the main artifact file is _not_ checked for existence:
{code:java}
artifacts.add( project.getArtifact().getFile() );{code}
But immediately below, the sources artifact file _is_ checked for existence:
{code:java}
if ( createSourcesJar )
{
    File file = shadedSourcesArtifactFile();
    if ( file.isFile() )
    {
        sourceArtifacts.add( file );
    }
}
{code}
Maybe there is a reason for this, but it seems inconsistent - it seems like a 
good idea to always check for existence before adding a file. I suppose the 
impact of this is very low - it's merely an optimization to omit non-existent 
files.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to