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

Peter De Maeyer updated MSHADE-286:
-----------------------------------
    Description: 
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}

Apparently, it's a conscious choice to fail when the main artifact does not 
exist.

  was:
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}

The line above


> 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}
> Apparently, it's a conscious choice to fail when the main artifact does not 
> exist.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to