部署后,我在远程存储库中获得了工件,但是在构建“无法解析POM”中仍然出现错误
您能帮我做错什么吗?这是一个非常基本的Maven项目,我试图从GitHub提取代码并尝试在Nexus存储库中构建和部署jar文件。自从我们在运行工作后就将代码部署在关系中以来,但是在Jenkins中仍然出现错误。
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.560 s
[INFO] Finished at: 2018-07-11T08:02:36Z
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/lib/jenkins/workspace/Demo_maven/helloworld/pom.xml to com.indmax.app/helloworld/3.1-SNAPSHOT/helloworld-3.1-SNAPSHOT.pom
[JENKINS] Archiving /var/lib/jenkins/workspace/Demo_maven/helloworld/target/helloworld-3.1-SNAPSHOT.jar to com.indmax.app/helloworld/3.1-SNAPSHOT/helloworld-3.1-SNAPSHOT.jar
/var/lib/jenkins/workspace/Demo_maven/helloworld/pom.xml is not inside /var/lib/jenkins/workspace/Demo_maven/var/lib/jenkins/workspace/Demo_maven/helloworld/; will archive in a separate pass
/var/lib/jenkins/workspace/Demo_maven/helloworld/target/helloworld-3.1-SNAPSHOT.jar is not inside /var/lib/jenkins/workspace/Demo_maven/var/lib/jenkins/workspace/Demo_maven/helloworld/; will archive in a separate pass
ERROR: Failed to parse POMs
java.nio.file.NoSuchFileException: /var/lib/jenkins/workspace/Demo_maven/var/lib/jenkins/workspace/Demo_maven/helloworld/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:1991)
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)
实际上,我在Maven插件中尝试使用错误的命令。
mvn clean deploy
mvn命令的问题。逻辑是我们正在maven插件中执行命令,前缀使构建失败。因此,我想通了,它可以与
一起使用clean deploy
谢谢!