pom中解决冲突后,上传至集群,偶尔成功,偶尔jar包冲突,原因:集群是jvm的类加载器是随机加载的,所以将pom中打包的时候对相关jar包进行重命名,问题解决
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>com.google.protobuf</pattern>
<shadedPattern>org.apache.flink.shaded.rename.com.google.protobuf</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>