我正在运行Hadoop Mapreduce作业。我使用的xerces
和Hadoop发行版看起来不同。我想遮蔽我的xerces
。我该怎么做?
这样做:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>xerces:xercesImpl:jar:</exclude>
</excludes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.apache.xerces.impl.*</pattern>
<shadedPattern>org.shaded.xerces.impl.*</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
发出此错误。谷歌搜索没有多大帮助:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.4.1:shade (default) on project dsl-mapreduce: Error creating shaded jar: Error in ASM processing class com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class: 48188 -> [Help 1]
我没有在任何地方使用com/ibm/icu/impl
,icu
或icu4j
也不存在mvn dependency:tree
。
编辑:jar在Java 8上编译,Hadoop在Java 7上编译。