pom文件添加上这段
<build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <appendAssemblyId>false</appendAssemblyId> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>com.buba.kafka.stream.Application</mainClass> <!--修改这里面为main的权限定类名--> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>assembly</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
就会在项目的根目录下的target目录里生成jar包
标签:assembly,jar,maven,根目录,false,main From: https://www.cnblogs.com/shenyixin/p/18348906