Gili created MSHADE-380:
---------------------------
Summary: Improve FAQ for multiple runs of plugin
Key: MSHADE-380
URL: https://issues.apache.org/jira/browse/MSHADE-380
Project: Maven Shade Plugin
Issue Type: Improvement
Reporter: Gili
https://issues.apache.org/jira/browse/MSHADE-85 provides a vague recommendation
to alter the output name to avoid a second run of the plugin from using the
output of the first run as input. In practice this is a bad workaround because
if you do this then maven-install-plugin ends up installing the non-shaded JAR
file.
A much easier and cleaner solution is to set the <forceCreation> property of
the jar plugin as follows:
{code:java}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<forceCreation>true</forceCreation>
</configuration>
</execution>
</executions>
</plugin>
{code}
Please update the recommendations in the FAQ with the above suggestion. Please
include the full code snippet to avoid any misunderstanding.
Bigger picture, the default behavior is bad. All maven plugins work properly by
default across multiple runs. This plugin does not. What prevents you from
leaving the output as foobar-shaded.jar and somehow hinting to the
maven-install-plugin to use that as input instead? I don't know the exact
implementation details, but certainly the happy path should work out of the box
without users needing to jump through any hoops.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)