MAVEN打包可执行jar包

Stella981
• 阅读 594
<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <!-- 这里设置main方法所在类 -->
                                    <mainClass>cn.zhys513.test.Test</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
点赞
收藏
评论区
推荐文章
Easter79 Easter79
2年前
springboot整合redisson分布式锁
一、通过maven引入redisson的jar包<dependency<groupIdorg.redisson</groupId<artifactIdredisson</artifactId<version3.6.5</version
Easter79 Easter79
2年前
springboot项目启动,停止,重启
参考博客https://www.cnblogs.com/chy/p/10460061.html打包插件,可以指定启动类<build<plugins<plugin<groupIdorg.springframework.boot</groupId<artifact
Easter79 Easter79
2年前
SpringBoot打包部署简单说明
SpringBoot项目打包部署1\.jar包部署添加一个插件<!打包插件<build<plugins<plugin<groupId
Stella981 Stella981
2年前
Maven配置Spring Boot项目打包,依赖包到lib目录、配置文件到conf目录
<build<plugins<plugin<groupIdorg.apache.maven.plugins</groupId<artifactIdmavenjarplugin</artifactId<configuration
Wesley13 Wesley13
2年前
Java使用Sftp实现对跨服务器上传、下载、打包、写入相关操作
1、Maven引入jar<dependency<groupIdcom.jcraft</groupId<artifactIdjsch</artifactId<version0.1.54</version</dependency2、Test类pac
Easter79 Easter79
2年前
Springmvc 发送邮件功能
1、引入相关jar包<dependency<groupIdorg.apache.velocity</groupId<artifactIdvelocity</artifactId<version1.7</version</dependency
Stella981 Stella981
2年前
Maven 打包可执行 jar 配置
<plugin<groupIdorg.apache.maven.plugins</groupId<artifactIdmavenshadeplugin</artifactId<versio
Stella981 Stella981
2年前
SpringBoot打包部署简单说明
SpringBoot项目打包部署1\.jar包部署添加一个插件<!打包插件<build<plugins<plugin<groupId
Stella981 Stella981
2年前
Eclipse创建Maven项目错误
在官网下在的Eclipse创建MAVEN项目出错,记录下来。在POM文件里加上,更新下<dependency<groupIdorg.apache.maven.plugins</groupId<artifactIdmavenresourcesplugin</artifactId
Stella981 Stella981
2年前
SpringBoot 部署到linux环境
第一部分:Springboot项目部署说明:工具使用的是IEDA第一:项目打包1.在pom文件中添加插件<build<plugins<plugin<groupId