0

I am trying to create a custom API based on an API tutorial on https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Startup_Project_Archetype

What I have done is just making a few changes in following 4 files:

  1. HelloProvider.java
  2. hello.yang
  3. HelloWorldImpl.java
  4. impl-blueprint.xml

I am able to compile the folder in impl ,but it failed when I return to the top level directory and build entire ‘hello’. Here is the Error message:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project hello-features: There are test failures.

And I follow the instruction:

[ERROR] Please refer to /home/oscarzhang/.m2/hello/features/target/surefire-reports for the individual test results.

but I really don't know what the report document says. There are too many information there.

I simply know if I execute this:

mvn clean install –DskipTests

it may work, nevertheless there still would be some drawbacks that a beginner couldn't realise. Although I put this way in the 2nd place, it is really kind of you to tell me the specific drawbacks to make it clear.

I really want to know what cause the error. I even doubt that the snapshot type I choose when I use maven to generate a startup archetype could make a difference.

Thanks for your help.

ychz
  • 533
  • 2
  • 7
  • 15
  • It seems that mvn clean install –DskipTests didn't work. I got this error:Unknown lifecycle phase "installPlease". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. – ychz May 04 '17 at 17:48

2 Answers2

0

add this plugins into pom file and try it

<plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.19.1</version>
    </plugin>
</plugins>
Anshul Sharma
  • 3,432
  • 1
  • 12
  • 17
0

This has nothing to do with opendaylight or maven-archetypes. You simply have to understand how surefire works, and what information it produces. You're going to have to actually read the files in the folder it refers to and determine what test failed. Alternatively, I would assume that some information about what test failed will be in the standard output from your build.

David M. Karr
  • 14,317
  • 20
  • 94
  • 199