all tests pass. but getting Maven build failure

410 views
Skip to first unread message

Styris

unread,
Apr 21, 2016, 4:23:26 PM4/21/16
to Cukes
I just ran some selenium/appium tests using mvn test and all the tests were executed and all were passed. However at the end of the test I got an unexpected build failure message that put me off. And it will confuse other stakeholders too when they look at it. Here is what I got:

[ERROR] Failed to execute goal net.masterthought:maven-cucumber-reporting:2.0.0:generate (execution) on project IOS_Automation: Error Found: BUILD FAILED - Check Report For Details -> [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.



I am pasting my POM.xml file here so that someone could please look and advise on whats wrong:

<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>Sanity</groupId>

  <artifactId>IOS_Automation</artifactId>

  <version>0.0.1-SNAPSHOT</version>

  <packaging>jar</packaging>


  <name>iOSSmokeTest</name>

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

 

    

<properties>

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

    <java.version>1.8</java.version>

    <junit.version>4.12</junit.version>

    <cucumber.version>1.2.4</cucumber.version>

    <maven.compiler.version>3.3</maven.compiler.version>

    <maven.cucumber.reporting.version>2.0.0</maven.cucumber.reporting.version>

    <cucumber.reporting.version>2.2.0</cucumber.reporting.version>

    <!-- if run from jenkins -->

<jenkins.buildnr>199</jenkins.buildnr>

        <maven-failsafe-plugin.version>2.18.1</maven-failsafe-plugin.version>

</properties>


<dependencies>

    <dependency>

  <groupId>junit</groupId>

  <artifactId>junit</artifactId>

  <version>4.12</version>

    </dependency>

    <dependency>

  <groupId>info.cukes</groupId>

  <artifactId>cucumber-core</artifactId>

  <version>1.2.4</version>

    </dependency>

    <dependency>

  <groupId>info.cukes</groupId>

  <artifactId>cucumber-java</artifactId>

  <version>1.2.4</version>

    </dependency>

    <dependency>

  <groupId>info.cukes</groupId>

  <artifactId>cucumber-junit</artifactId>

  <version>1.2.4</version>

    </dependency>

    <dependency>

  <groupId>info.cukes</groupId>

  <artifactId>cucumber-html</artifactId>

  <version>0.2.3</version>

    </dependency> 

    <dependency>

  <groupId>info.cukes</groupId>

  <artifactId>cucumber-jvm-deps</artifactId>

  <version>1.0.5</version>

    </dependency>

<!--     <dependency>

  <groupId>info.cukes</groupId>

  <artifactId>cucumber-testng</artifactId>

  <version>1.2.4</version>

    </dependency> -->

    <dependency>

  <groupId>info.cukes</groupId>

  <artifactId>gherkin</artifactId>

  <version>2.12.2</version>

    </dependency>

    <dependency>

  <groupId>org.hamcrest</groupId>

  <artifactId>hamcrest-all</artifactId>

  <version>1.3</version>

    </dependency>

    <dependency>

  <groupId>org.seleniumhq.selenium</groupId>

  <artifactId>selenium-java</artifactId>

  <version>2.48.2</version>

    </dependency>

    <dependency>

  <groupId>org.seleniumhq.selenium</groupId>

  <artifactId>selenium-server</artifactId>

  <version>2.48.2</version>

    </dependency>

    <dependency>

  <groupId>org.seleniumhq.selenium</groupId>

  <artifactId>selenium-remote-driver</artifactId>

  <version>2.48.2</version>

    </dependency>

    <dependency>

  <groupId>io.appium</groupId>

  <artifactId>java-client</artifactId>

  <version>3.3.0</version>

    </dependency>

    <dependency>

  <groupId>com.github.psorobka</groupId>

  <artifactId>appium-maven-plugin</artifactId>

  <version>1.1.0</version>

    </dependency>

    <dependency>

  <groupId>org.apache.maven.plugin-tools</groupId>

  <artifactId>maven-plugin-annotations</artifactId>

  <version>3.4</version>

    </dependency>

    <dependency>

  <groupId>org.testng</groupId>

  <artifactId>testng</artifactId>

  <version>6.9.8</version>

    </dependency>

    <dependency>

  <groupId>org.apache.maven.surefire</groupId>

  <artifactId>surefire-api</artifactId>

  <version>2.19.1</version>

    </dependency>  

   <dependency>

      <groupId>net.masterthought</groupId>

      <artifactId>cucumber-reporting</artifactId>

      <version>2.2.0</version>

    </dependency>

    <dependency>

<groupId>org.seleniumhq.selenium</groupId>

<artifactId>selenium-firefox-driver</artifactId>

<version>2.48.2</version>

</dependency>

  </dependencies>

  

  <build>

        <plugins>

            <plugin>

            <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-compiler-plugin</artifactId>

                <version>3.5.1</version>

                <configuration>

                    <source>1.8</source>

                    <target>1.8</target> 

                    <encoding>UTF-8</encoding>

                </configuration>

            </plugin>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-surefire-plugin</artifactId>

                <version>2.19.1</version>

                <configuration>

                    <testFailureIgnore>true</testFailureIgnore>

                    <workingDirectory>${basedir}</workingDirectory>

                </configuration>

            </plugin>

            <plugin>

                <groupId>net.masterthought</groupId>

<artifactId>maven-cucumber-reporting</artifactId>

<version>2.0.0</version>

                <executions>

                    <execution>

                        <id>execution</id>

                        <phase>test</phase>

                    <goals>

                            <goal>generate</goal>

                        </goals>

                        <configuration>

                            <projectName>iOS Automation</projectName>

                            <outputDirectory>${project.build.directory}/cucumber-html-reports</outputDirectory>

                            <cucumberOutput>target/cucumber-report.json</cucumberOutput>

                            <enableFlashCharts>true</enableFlashCharts>

                        </configuration>

                    </execution>

                </executions>

            </plugin>  

        </plugins>

    </build>

</project>



THANKS.

Styris

unread,
Apr 21, 2016, 9:29:20 PM4/21/16
to Cukes
Also another error that I get is:
Could not parse build number: ${${build.number}}.

java.lang.NumberFormatException: For input string: "${${build.number}}"
...
Reply all
Reply to author
Forward
0 new messages