bulid runnable jar file with dependencies and main class
<build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>cn.dxbtech.test_path.Main</mainClass> </manifest> </archive> </configuration> <executions> <execution> <phase>package</phase> <id>run-assembly</id> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build>