gpt4 book ai didi

java - 运行 Jenkins 给出 "package org.junit does not exist"

转载 作者:搜寻专家 更新时间:2023-10-31 20:15:34 25 4
gpt4 key购买 nike

谁能帮我解决这个错误?

build-project:
[echo] AntProject: /root/.jenkins/jobs/Ant/workspace/build.xml
[javac] Compiling 2 source files to /root/.jenkins/jobs/Ant/workspace/bin
[javac] /root/.jenkins/jobs/Ant/workspace/src/com/moi/test/junit/MaClasseTest.java:3: package org.junit does not exist
[javac] import static org.junit.Assert.*;
[javac] ^
[javac] /root/.jenkins/jobs/Ant/workspace/src/com/moi/test/junit/MaClasseTest.java:5: package org.junit does not exist
[javac] import org.junit.Test;
[javac] ^
[javac] /root/.jenkins/jobs/Ant/workspace/src/com/moi/test/junit/MaClasseTest.java:9: cannot find symbol
[javac] symbol : class Test
[javac] location: class com.moi.test.junit.MaClasseTest
[javac] @Test
[javac] ^
[javac] /root/.jenkins/jobs/Ant/workspace/src/com/moi/test/junit/MaClasseTest.java:12: cannot find symbol
[javac] symbol : method assertTrue(boolean)
[javac] location: class com.moi.test.junit.MaClasseTest
[javac] assertTrue(MaClasse.additioner(2,2) == 4);
[javac] ^
[javac] 4 errors

BUILD FAILED /root/.jenkins/jobs/Ant/workspace/build.xml:35: Compile failed; see the compiler error output for details.

最佳答案

看来你忘了让 junit 库在你的 classparh 中可用

关于java - 运行 Jenkins 给出 "package org.junit does not exist",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6328529/

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