首页 > 其他分享 >How to configure Apache's Shade

How to configure Apache's Shade

时间:2022-12-17 18:35:22浏览次数:43  
标签:configure shade two How Shade Apache

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.4.1</version>
            <executions>
                <execution>
                    <id>one</id>
                    <phase>package</phase>
                    //从哪个阶段开始
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <transformers>
                            <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                <mainClass>org.Tools.cnBlog.Main</mainClass>
                                //这里是放置你的主类的地方,程序会从他开始执行
                            </transformer>
                        </transformers>
                    </configuration>
                </execution>
                <execution>
                    <id>two</id>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

manifest

美 [ˈmænɪˌfest]

英 [ˈmænɪfest]

  • v.表明;显现;使人注意到
  • adj.明显的;显而易见的
  • n.旅客名单
  • 网络清单;舱单;显示
mvn plugin:goal@two

这个的意思是启用第二个execution。

标签:configure,shade,two,How,Shade,Apache
From: https://www.cnblogs.com/qiantaosama/p/16989320.html

相关文章