[英]How do I resolve the dependencies when using Maven to build git plugin for Jenkins?
I am trying to build and install the git plugin for Jenkins. 我正在尝试为Jenkins构建和安装git插件 。 Unfortunately, there aren't any instructions and I am new to Jenkins and Maven.
不幸的是,没有任何说明,我是詹金斯和Maven的新手。
I have found these instructions but when I get to this step mvn install
it fails on some dependencies. 我已经找到了这些说明,但是当我执行
mvn install
步骤mvn install
它在某些依赖项上失败了。 I've attempted many different ways to make Maven find the jars it's looking for, but without success. 我尝试了多种方法使Maven找到所需的罐子,但没有成功。 Here are the key output lines indicating the missing libraries:
以下是指示缺少库的关键输出行:
Running InjectedTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.369 sec <<< FAILURE!
initializationError(InjectedTest) Time elapsed: 0.017 sec <<< ERROR!
java.lang.UnsatisfiedLinkError: com.sun.jna.Native.open(Ljava/lang/String;)J
...
Running hudson.plugins.git.RevisionParameterActionTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.012 sec <<< FAILURE!
init ializationError(hudson.plugins.git.RevisionParameterActionTest) Time elapsed: 0 sec <<< ERROR!
java.lang.NoClassDefFoundError: org.jvnet.hudson.test.HudsonTestCase
I found the JNA jars here and downloaded them, but cannot get Maven to find them. 我在这里找到了JNA jar ,并下载了它们,但是无法让Maven找到它们。 How do I get Maven to find these jars?
我如何让Maven找到这些罐子?
The problem was that I had the openjdk installed. 问题是我安装了openjdk。 Once I installed the jdk from Oracle, and correctly ran
update-alternatives
, it ran the tests successfully. 一旦我从Oracle安装了jdk,并正确运行了
update-alternatives
,它就成功地运行了测试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.