我需要添加一个maven配置文件,在激活时,将一些规则插入到maven-阴影插件重新定位部分,因此我在配置文件中添加了一个属性:
<properties>
<cdh.hive.relocation>
<relocation>
<pattern>org.apache.hive</pattern>
<shadedPattern>org.my_project.apache.hive</shadedPattern>
</relocation>
</cdh.hive.relocation>
</properties>并使用${cdh.hive.relocation}将其插入插件配置中:
<relocations>
<relocation>
<pattern>com.mchange.v2.c3p0</pattern>
<shadedPattern>com.my_project.mchange.v2.c3p0</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.http</pattern>
<shadedPattern>org.my_project.apache.http</shadedPattern>
</relocation>
<relocation>
<pattern>org.json4s</pattern>
<shadedPattern>org.my_project.json4s</shadedPattern>
</relocation>
${cdh.hive.relocation}
</relocations>但是maven给出了以下错误:
错误构建无法读取1项目org.apache.maven.project.ProjectBuildingException: 1 ->帮助1->在处理POMs:致命的不可解析POM /home/peng/git-cloudera/5.10.2/datapassport/pom.xml:文本时遇到了一些问题,必须紧接着是END_TAG而不是START_TAG (位置: START_TAG seen ...\n . @ 137 : 23 ) @第137行,第23列
为什么不起作用?我该怎么做才能让它发挥作用?
发布于 2017-09-18 21:27:21
我觉得你做不到,你应该用配置文件
https://stackoverflow.com/questions/46288318
复制相似问题