我创建了一个Maven项目来运行自动化脚本。当我尝试从CMD或Eclipse中运行时,我看到下面的日志记录,但是该项目未在执行。请告诉我问题出在哪里。还要找到我项目的pom.xml
我正在使用Java和Selenium来运行自动化脚本,并创建了与Jenkins集成的Maven项目。
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< Epic2Maven:Epic2Maven >-----------------------
[INFO] Building Epic2KSA 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.jenkins-ci.plugins.workflow:workflow-step-
api:jar:1.15
is missing, no dependency information available
[WARNING] The POM for org.kohsuke:groovy-sandbox:jar:1.10 is missing, no
dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
Epic2Maven
---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Epic2Maven --
-
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @
Epic2Maven ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources,
i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @
Epic2Mven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Epic2Maven ---
[INFO] ----------------------------------------------------------------------
--
[INFO] BUILD SUCCESS
[INFO] ----------------------------------------------------------------------
--
[INFO] Total time: 1.529 s
[INFO] Finished at: 2018-07-23T11:29:13+04:00
[INFO] ----------------------------------------------------------------------
--
Pom.XML
<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>Epic2Maven</groupId>
<artifactId>Epic2Maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Epic2KSA</name>
<description>Epic2Maven</description>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope> </dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>3.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vimalselvam</groupId>
<artifactId>cucumber-extentsreport</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.23</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>bson</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>ojdbc14</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.3.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>scm-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
<version>1.0-beta-2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<version>1.0-beta-2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
</project>
新日志
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< Epic2Maven:Epic2Maven >------------------------
[INFO] Building Epic2KSA 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Epic2Maven
---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ Epic2Maven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Ep
ic2Maven ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Epic2Ma
ven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ Epic2Maven ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.711 s
[INFO] Finished at: 2018-07-23T14:17:33+04:00
答案 0 :(得分:0)
您的jenkins和groovy的jar未下载到您的 C:\ Users \ username.m2 \ repository \ org文件夹 这就是为什么您收到此错误的原因 您的
workflow-step-api-1.15.jar
jar应该存在于
C:\Users\username\.m2\repository\org\jenkins-ci\plugins\workflow
文件夹
和
groovy-sandbox-1.10.jar
应存在于
C:\Users\username\.m2\repository\org\kohsuke
文件夹
尝试使用其他一些Maven版本来解决这些依赖关系,或者手动下载这些jar并将其放置在上述文件夹结构中。
希望对您有帮助。