Remove dependency-reduced-pom.xml file when packaging Maven project

Explain the function of static keyword and final keyword in Java in detail>>>

The shade plug-in is generated during packaging and can be deleted at any time

If you do not want to generate it, the configuration is as follows:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-shade-plugin</artifactId>
   <configuration>
      <createDependencyReducedPom>false</createDependencyReducedPom>
   </configuration>
   <executions>
      <execution>
         <phase>package</phase>
         <goals>
            <goal>shade</goal>
         </goals>
         <configuration>
            <transformers>
               <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>a.b.c.Main</mainClass>
               </transformer>
            </transformers>
         </configuration>
      </execution>
   </executions>
</plugin>

Similar Posts: