<plugin>
    
    <groupId>org.apache.maven.plugins</groupId>
    
    <artifactId>maven-shade-plugin</artifactId>
    
    <version>3.0.0</version>
    
    <configuration>
    
    <createDependencyReducedPom>false</createDependencyReducedPom>
    
    </configuration>
    
    <executions>
    
    <execution>
    
    <id>package_shade_profile</id>
    
    <phase>package</phase>
    
    <goals>
    
    <goal>shade</goal>
    
    </goals>
    
    <configuration>
    
    <transformers>
    
    <transformer implementation=”org.apache.maven.plugins.shade.resource.ManifestResourceTransformer”>
    
    <mainClass>org.testng.TestNG</mainClass>
    
    </transformer>
    
    </transformers>
    
    </configuration>
    
    </execution>
    
    </executions>
    
    </plugin>
    
    </plugins>
   
运行时在target上层运行,运行时加入testng文件 例如java -jar target\test1.jar target\testng.xml
 
