maven for package--system error solution

Some Maven artifacts try to depend on exact system paths. Most usually this dependency is either on com.sun:tools or sun.jdk:jconsole. Dependencies with system scope cause issues with our tooling and requires generators so they are not supported.
Easiest way to solve this for above two dependencies is by removing and adding back the dependency without <scope> or <systemPath> nodes:
%pom_remove_dep com.sun:tools
%pom_add_dep com.sun:tools
[ERROR] Failed to execute goal
org.fedoraproject.xmvn:xmvn-mojo:1.2.0:install (default-cli) on project
pom: Some reactor artifacts have dependencies with scope "system". Such
dependencies are not supported by XMvn installer. You should either
remove any dependencies with scope "system" before the build or not run
XMvn instaler. -> [Help 1]


maven build两种方式:%mvn_build也可以mvn-rpmbuild \ -Dproject.build.sourceEncoding=UTF \ install \(这种方法可以用上面的systemPath,前一种不行)
在pom.xml中需要引入本地的jar时可以加如下,增加红色部分两行:
<dependencies>
      <dependency>
          <groupId>org.eclipse.osgi</groupId>
          <artifactId>org.eclipse.osgi</artifactId>
          <version>3.6.0.v20100517</version>
<scope>system</scope>
          <systemPath>/usr/share/java/org.eclipse.osgi-3.6.0.v20100517.jar</systemPath>
      </dependency>
  </dependencies>
另:%mvn_build -f强制跳过测试


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值