0

This is the following error:

enter image description here

And these are the failed reports:

enter image description here

I'm completely new to maven so I'm not sure what any of this means

Community
  • 1
  • 1
klippy
  • 245
  • 3
  • 15
  • Do you have this error when skipping tests? mvn install -Dmaven.test.skip=true – pobu May 02 '19 at 10:26
  • 2
    The Maven Failsafe plugin is generally used for running integration tests. Is it possible that while you don't have any failing unit tests, you might be overlooking a failing integration test elsewhere in your project? – DaveyDaveDave May 02 '19 at 10:41
  • Some helpful info on the difference between unit test (surefire) and integration test (failsafe). Also possibly helpful integration tests are integraton tests because of the name pattern: \*IT, IT\*. https://stackoverflow.com/questions/28986005/what-is-the-difference-between-the-maven-surefire-and-maven-failsafe-plugins – Terry May 02 '19 at 15:26
  • @pobu No that command stops the error. But that seems wrong. Like there must be a reason for the test, right? – klippy May 02 '19 at 15:34

2 Answers2

1

To clarify, maven is saying that it failed to execute it's goal (which was verify in this case). If you aren't running any test suites, maven will always record a failure, because it is configured to fail a build when you don't have any tests to run.

There are configurations which will allow maven to build successfully with no tests that can be set in your pom.xml

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-failsafe-plugin</artifactId>
   <version>3.0.0-M3</version>
   <configuration>
       <failIfNoTests>false</failIfNoTests>
   </configuration>
</plugin>

With this adjustment, maven will still build when you don't specify any tests. You never specified in your original post what your tests (if you have any) look like, so it's impossible to see if this is what the error is, or something else.

Andrew
  • 247
  • 2
  • 10
0

You need to find a way to ignore the test cases. Adding the following maven plugin solves the issue.

<plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.11</version>
    <configuration>
      <testFailureIgnore>true</testFailureIgnore>
    </configuration>
</plugin>
PKS
  • 618
  • 1
  • 7
  • 19