Jenkins为POM文件pom.xml指定了-f /-file命令行参数不存在“”“

时间:2018-12-25 11:58:15

标签: maven jenkins github continuous-integration testng

实际上,我正在将我的TestNG和保证测试与jenkins集成在一起,当我进行构建时,所有东西都很好地集成了,以下是我在控制台中出现的问题:

在工作空间C:\ Users \ True Meridian.jenkins \ workspace \ ApiAutomation中构建

  

C:\ Program Files \ Git \ bin \ git.exe rev-parse --is-inside-work-tree#timeout = 10   从远程Git存储库中获取更改   C:\ Program Files \ Git \ bin \ git.exe配置remote.origin.url https://github.com/Usmanch760/PlayPalApi.git#timeout = 10   从https://github.com/Usmanch760/PlayPalApi.git获取上游更改   C:\ Program Files \ Git \ bin \ git.exe --version#超时= 10   C:\ Program Files \ Git \ bin \ git.exe提取--tags --progress https://github.com/Usmanch760/PlayPalApi.git + refs / heads / :refs / remotes / origin / #超时= 30   C:\ Program Files \ Git \ bin \ git.exe rev-parse“ refs / remotes / origin / master ^ {commit}”#超时= 10   C:\ Program Files \ Git \ bin \ git.exe rev-parse“ refs / remotes / origin / origin / master ^ {commit}”#超时= 10   检出修订版1831aa5e76106af1bf98cb25aa31ae46f360e5df(参考/远程处理/来源/主数据)   C:\ Program Files \ Git \ bin \ git.exe配置core.sparsecheckout#timeout = 10   C:\ Program Files \ Git \ bin \ git.exe检出-f 1831aa5e76106af1bf98cb25aa31ae46f360e5df   提交消息:“ Pom更新了TestNg.xml”   C:\ Program Files \ Git \ bin \ git.exe rev-list --no-walk 1831aa5e76106af1bf98cb25aa31ae46f360e5df#超时= 10   将https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip解压到Jenkins上的C:\ Users \ True Meridian.jenkins \ tools \ hudson.tasks.Maven_MavenInstallation \ MAVEN_HOME   [ApiAutomation] $ cmd.exe / C'“” C:\ Users \ True Meridian.jenkins \ tools \ hudson.tasks.Maven_MavenInstallation \ MAVEN_HOME \ bin \ mvn.cmd“'-f pom.xml干净安装并退出%% ERRORLEVEL %%“   POM文件pom.xml指定-f /-file命令行参数不存在   构建步骤“调用顶级Maven目标”将构建标记为失败   TestNG报告处理:START   使用以下模式在工作区中查找TestNG结果报告:** / testng-results.xml   在此生成开始之前,testng-results.xml被最后一次修改。忽略它。   正在保存报告...   找到匹配的文件,但未找到任何TestNG结果。   完成:失败

注意:testNG测试对我的日食工作正常

这是我的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>com.Test.automation</groupId>
  <artifactId>PlayPalApi</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>PlayPalApi</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>





        <!-- https://mvnrepository.com/artifact/io.rest-assured/rest-assured -->
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.2.0</version>
         <!--   <scope>compile</scope> -->
        </dependency>


        <!-- https://mvnrepository.com/artifact/com.jayway.restassured/rest-assured -->
<dependency>
    <groupId>com.jayway.restassured</groupId>
    <artifactId>rest-assured</artifactId>
    <version>2.9.0</version>
    <scope>compile</scope>
</dependency>


        <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.testng/testng -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.10</version>
            <!-- <scope>test</scope> -->
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.json/json -->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20170516</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.relevantcodes/extentreports -->
        <dependency>
            <groupId>com.relevantcodes</groupId>
            <artifactId>extentreports</artifactId>
            <version>2.41.2</version>
        </dependency>

          </dependencies>


        <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>

                    <!-- Old design where we can hard code TestNG suite in pom.xml -->
                     <suiteXmlFiles>
                        <suiteXmlFile>testng.xml</suiteXmlFile>

                    </suiteXmlFiles> 

                </configuration>
            </plugin>
        </plugins>
    </build>







</project>

任何帮助都将非常感谢。

0 个答案:

没有答案