当我尝试使用Jenkins执行Maven项目时,出现以下错误。
我一直都在遇到编译错误。这些测试既不能像Maven一样在Eclipse中运行,也不能像詹金斯那样运行。我也更新了我的Jenkins编译器插件。
我知道这个问题已经问过几次了。我已经尝试了他们的建议,但仍然没有用。请指教。谢谢。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project daily-installer: Compilation failure -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[JENKINS] Archiving /nvme/eclipse-workspace/Sample/story-master/pom.xml to com.yellowfin.installer/daily-installer/0.0.1-SNAPSHOT/daily-installer-0.0.1-SNAPSHOT.pom
/nvme/eclipse-workspace/Sample/story-master/pom.xml is not inside /var/lib/jenkins/workspace/RegressionStory/nvme/eclipse-workspace/Sample/story-master/; will archive in a separate pass
ERROR: Failed to parse POMs
java.nio.file.NoSuchFileException: /var/lib/jenkins/workspace/RegressionStory/nvme/eclipse-workspace/Sample/story-master/pom.xml
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.Files.newByteChannel(Files.java:361)
at java.nio.file.Files.newByteChannel(Files.java:407)
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
at java.nio.file.Files.newInputStream(Files.java:152)
at hudson.FilePath.read(FilePath.java:1973)
at jenkins.plugins.maveninfo.extractor.properties.PomPropertiesFinder.findProperties(PomPropertiesFinder.java:50)
at jenkins.plugins.maveninfo.extractor.MavenInfoExtractor.extract(MavenInfoExtractor.java:58)
at jenkins.plugins.maveninfo.extractor.MavenInfoEnvironment.tearDown(MavenInfoEnvironment.java:42)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:908)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1815)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
channel stopped
Finished: FAILURE
答案 0 :(得分:0)
签出源代码时,pom.xml的位置将相对于项目文件夹。 pom.xml在项目的根目录中。所以,
请提供pom.xml
而不是
/nvme/eclipse-workspace/Sample/story-master/pom.xml
让我知道它是否对您不起作用。