Java Jenkins未能为我的Selenium项目编译Maven
我正试图在Maven上安排我的项目。它使用ApachePOI。该项目在我的笔记本电脑上运行良好,但在我们办公室的远程机器上的詹金斯上无法编译Maven。我面临的错误是:Java Jenkins未能为我的Selenium项目编译Maven,java,maven,selenium,jenkins,apache-poi,Java,Maven,Selenium,Jenkins,Apache Poi,我正试图在Maven上安排我的项目。它使用ApachePOI。该项目在我的笔记本电脑上运行良好,但在我们办公室的远程机器上的詹金斯上无法编译Maven。我面临的错误是: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile** (default-testCompile) on project GunAV-test-automation: Compilation f
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile** (default-testCompile) on project GunAV-test-automation: Compilation failure: Compilation failure:
[ERROR] /C:/Program Files (x86)/Jenkins/workspace/Mytest/-42/src/test/java/utilities/ReadExcel.java:[11,37] **package org.apache.poi.xssf.usermodel does not exist**
[ERROR] /C:/Program Files (x86)/Jenkins/workspace/Mytest/-42/src/test/java/utilities/ReadExcel.java:[12,37] package org.apache.poi.xssf.usermodel does not exist**
[ERROR] -> [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
如何修复此问题?修复编译错误
package org.apache.poi.xssf.usermodel does not exist
您应该添加一个maven依赖项:
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
org.apache.poi
包。修复编译错误
package org.apache.poi.xssf.usermodel does not exist
您应该添加一个maven依赖项:
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
org.apache.poi
包。POM文件中是否有org.apache.poi
依赖项?是的,它看起来像:org.apache.poi poi 4.1.1 POM文件中是否有org.apache.poi
依赖项?是的,它看起来像:org.apache.poi poi 4.1.1