简体   繁体   English

使用Maven为Jenkins构建git插件时,如何解决依赖关系?

[英]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找到这些罐子?

Are you building on a Linux system where the libjna is already installed ? 您是否在已安装libjna的Linux系统上构建?

If so, try building with 如果是这样,请尝试使用

mvn -DargLine="-Djna.nosys=true" install

Found here . 这里找到。

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.

相关问题 如何使用maven-scala插件解决依赖关系的“错误:错误的符号引用”? - How do I resolve “error: bad symbolic reference” for dependencies using maven-scala plugin? 我如何在使用Maven为Linux上的Jenkins编译cobertura-plugin时解决丢失的工件 - How do i resolve missing artifact while using maven to compile cobertura-plugin for Jenkins on linux 如何使用Artifactory插件和Credentials插件将Jenven的Maven工件部署到Artifactory时解决401失败? - How can I resolve a 401 failure when deploying a Maven artifact from Jenkins to Artifactory using the Artifactory Plugin and the Credentials Plugin? 使用Maven git将插件值描述为Jenkins构建文件名 - Using maven git describe plugin value as Jenkins build file name 如何解决Maven插件内部的Maven依赖关系? - How to resolve maven dependencies inside the maven plugin? 如何解决maven插件中所有模块的依赖关系? - How do you resolve dependencies across all modules in a maven plugin? sbt:如何解析使用Maven属性的Maven依赖项 - sbt: How do I resolve Maven dependencies that uses Maven properties 如何配置Jenkins使用Maven进行构建? - How do I configure Jenkins to build with Maven? 在使用Maven构建时,如何将Scala编译器设置为使用插件? - How do I set the Scala compiler to use a plugin when I build using Maven? 如何递归地解决Maven 2插件中的依赖项 - How to recursively resolve dependencies in a Maven 2 plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM