<build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>3.5.0</version> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>org.example.Main</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <!-- this is used for inheritance merges --> <phase>package</phase> <!-- bind to the packaging phase --> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
参考 https://maven.apache.org/plugins/maven-assembly-plugin/usage.html
标签:Main,assembly,java,plugin,maven,org,执行 From: https://www.cnblogs.com/zhangyy3/p/17384642.html