idea从新建一个maven项目到打包成可运行jar包全流程

时间:2025-04-02 09:26:56
<build> <plugins> <plugin> <groupId></groupId> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <archive> <manifest> <!-- 填写你的main方法所在的主类--> <mainClass> </mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </execution> </executions> </plugin> </plugins> </build>