小编Lun*_*lli的帖子

Maven 在 jenkins 上不起作用(但它通过 eclipse 和命令行运行)

我有一些 CI 测试,都是在 maven 中进行的。当我在本地(Windows 10)的 eclipse 中运行它们时,以及当我通过 ec2 linux 服务器中的命令行运行它们时,构建成功。

只有当我从 Jenkins 构建相同的项目时,才会出现以下错误:

Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project invalidlogin: Error while storing the mojo status: /var/lib/jenkins/workspace/project/invalidlogin/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst (Permission denied) -> [Help 1]

我使用 PhantomJS 作为浏览器。

如何让它从詹金斯工作?

  • 我使用 chmod 更新了权限,但仍然得到相同的结果。
  • 为什么这会通过控制台而不是通过 jenkins 运行?

这是我的 pom

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>InvalidLoginV1</groupId>
  <artifactId>invalidlogin</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>invalidcredentials</name>
  <description>invalidcredentials</description>

  <properties>
<suiteXmlFile>src/main/resources/testng.xml</suiteXmlFile>

</properties> 

<dependencies>
<dependency>
  <groupId>org.testng</groupId>
  <artifactId>testng</artifactId>
  <version>6.8</version>
  <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-server</artifactId>
    <version>2.34.0</version>
    <scope>test</scope> …
Run Code Online (Sandbox Code Playgroud)

java maven jenkins

3
推荐指数
1
解决办法
4771
查看次数

标签 统计

java ×1

jenkins ×1

maven ×1