gpt4 book ai didi

Jenkins JMeter 项目中的 Maven 错误, "Error creating properties files for forking"

转载 作者:行者123 更新时间:2023-12-05 06:46:06 24 4
gpt4 key购买 nike

我有 Maven JMeter 项目,它使用“mvn verify”从我的主文件夹完美运行,但是当我尝试从 Jenkins 运行它时,我收到控制台的错误消息:

[workspace] $ mvn verify
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/var/lib/jenkins/jobs/PerformanceTests/workspace"): error=2, No such

file or directory"

如果我尝试从 Jenkins 尝试运行它的文件夹 (/var/lib/jenkins/jobs/PerformanceTests/workspace) 手动运行“mvn verify”,我收到错误消息:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project jmeter: Error creating properties files for forking; nested exception is java.io.IOException: No such file or directory -> [Help 1]

我的 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>perftest</groupId>
<artifactId>jmeter</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jmeter</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.8.1</version>
<configuration>
<testResultsTimestamp>false</testResultsTimestamp>
</configuration>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

同一 Jenkins 基本文件夹“/var/lib/jenkins/jobs”中的所有其他作业都工作正常。我还在 Jenkins 中使用 git 插件。

最佳答案

如果有人仍在为此苦苦挣扎 - 我能够通过将目录的所有者更改为当前用户名而不是 root 来解决它。

关于Jenkins JMeter 项目中的 Maven 错误, "Error creating properties files for forking",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18591411/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com