首页 > 其他分享 >maven 打包指定 mainclass

maven 打包指定 mainclass

时间:2022-11-20 21:14:33浏览次数:37  
标签:assembly 指定 maven GdalDemo mainclass 打包

pom文件添加

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>com.demo.test.GdalDemo</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>assembly</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

  

标签:assembly,指定,maven,GdalDemo,mainclass,打包
From: https://www.cnblogs.com/qukaige/p/16909526.html

相关文章