You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Mark Struberg (Jira)" <ji...@apache.org> on 2019/12/22 11:53:00 UTC

[jira] [Assigned] (MSHADE-286) Artifacts to be included for shading are not consistently checked for existence

     [ https://issues.apache.org/jira/browse/MSHADE-286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg reassigned MSHADE-286:
------------------------------------

    Assignee: Mark Struberg

> 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
>            Assignee: Mark Struberg
>            Priority: Minor
>
> While looking at {{ShadeMojo.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
(v8.3.4#803005)