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强制跳过测试