您的位置:首页 > 其它

maven for package--system error solution

2016-01-01 17:47 811 查看
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强制跳过测试

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: