Jenkins没有找到手动安装的jar到存储库(Jenkins Not finding the Manually installed jars to repository)

编程入门 行业动态 更新时间:2024-10-27 22:20:25
Jenkins没有找到手动安装的jar到存储库(Jenkins Not finding the Manually installed jars to repository)

我正在尝试设置一个jenkin来在ubantu机器上构建maven android项目

Android SDK : android-sdk_r23.0.2-linux.tgz OS : ubantu Maven home: /usr/share/maven3 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre

使用android SDK部署程序安装了android依赖项

如果我在命令行项目构建成功运行“mvn clean install”,但是如果我尝试使用jenkin作业,那么它会失败,因为它无法找到手动安装的jar。

jenkin用户匿名

试过以下仍然面临同样的问题:

我遇到了一个问题,我通过以下链接添加了一个新用户https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-12-04-andand -centos -6-

以root身份添加新用户的步骤:

sudo adduser jenkinadmin sudo /usr/sbin/visudo

编辑如下文件在用户权限规范下添加用户名和root权限将授予他们sudo权限。

- #用户权限规范

root ALL=(ALL:ALL) ALL jenkinadmin ALL=(ALL:ALL) ALL

按'cntrl x'退出文件,然后按'Y'保存

并将/ etc / default / jenkins文件JENKINS_USER更新为上面创建的新用户。 然后发出

chown -R jenkinadmin /var/log/jenkins chown -R jenkinadmin /var/lib/jenkins chown -R jenkinadmin /var/run/jenkins chown -R jenkinadmin /var/cache/jenkins

然后重新启动Jenkins jenkins并使用ps命令检查用户是否已更改/etc/init.d/jenkins restart ps -ef | grep jenkins

我可以看到jenkin正在盯着同一个新用户,但我仍然得到相同的mave repo错误。

现在用以下命令sudo / usr / sbin / visudo编辑sudouser之后,我总是提示这个错误

“jenkinadmin不在sudoers文件中。此事件将被报告”

我也使用sudo apt-get install maven安装了maven,然后安装了maven

root@myBox:/etc# mvn -v Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T12:37:52-05:00) Maven home: /usr/share/maven3 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.13.0-32-generic", arch: "amd64", family: "unix"

I'm trying to setup a jenkin to build the maven android project on ubantu machine

Android SDK : android-sdk_r23.0.2-linux.tgz OS : ubantu Maven home: /usr/share/maven3 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre

Installed the android dependency using the android SDK deployer

If i run the "mvn clean install" on command line project build successfully, but if i tried with a jenkin job it's failing because it's not able to find the manually installed jars.

jenkin user anonymous

Tried the following still facing the same issue:

I ran into a problem, I added a new user by following this link https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-12-04-and-centos-6

Steps to add a new user as root:

sudo adduser jenkinadmin sudo /usr/sbin/visudo

Edit the file as below Adding the user’s name and the same permissions as root under the the user privilege specification will grant them the sudo privileges.

--#User privilege specification

root ALL=(ALL:ALL) ALL jenkinadmin ALL=(ALL:ALL) ALL

Press ‘cntrl x’ to exit the file and then ‘Y’ to save it

and update the /etc/default/jenkins file JENKINS_USER to new user created above. then issue the

chown -R jenkinadmin /var/log/jenkins chown -R jenkinadmin /var/lib/jenkins chown -R jenkinadmin /var/run/jenkins chown -R jenkinadmin /var/cache/jenkins

Then restarted the Jenkins jenkins and check the user has changed using a ps command /etc/init.d/jenkins restart ps -ef | grep jenkins

I can see the jenkin is staring with the same new user, but still im getting the same mave repo error.

also after editing the sudouser with the below command sudo /usr/sbin/visudo now I'm alsways prompt with this error

"jenkinadmin is not in the sudoers file. This incident will be reported"

Also I've installed the maven using the sudo apt-get install maven and this install the maven on

root@myBox:/etc# mvn -v Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T12:37:52-05:00) Maven home: /usr/share/maven3 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.13.0-32-generic", arch: "amd64", family: "unix"

更多推荐

本文发布于:2023-08-07 20:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465676.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:没有找到   finding   jar   Jenkins   jars

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!