Maven Tests failing without specifying the "JDK18" profile

122 views
Skip to first unread message

Javier Gómez

unread,
Sep 22, 2015, 10:42:13 AM9/22/15
to Kill Bill users mailing-list
Hi guys,

Hope you are doing well!
I'm having a weird issue with Maven and would like to know if any of you is facing something similar with your KillBill plugins.

I've succesfully developed a new Java Plugin based on the killbill-plugin-framework.
The issue is that after adding a couple of Unit tests (using JUnit and Mockito) now Maven can't succesfully Build my project.

Before adding the Unit tests and all its dependencies I was able to run "mvn clean install" without any issue.
Now when I run it, during the "maven-surefire-plugin" goal I have the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.13:test (default-test) on project XXX-XXX-plugin: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.13:test failed: There was an error in the forked process
[ERROR] java.lang.RuntimeException: Unable to load category: fast

I've been researching and found out that this "fast" category is an specified "group" of tests of the KillBill Core.

Question is: why is Maven trying to run that group of Tests of the Core if I don't have them in my Plugin code?
Should I use TestNG instead of JUnit and always use the annotation @BeforeClass(groups = "fast") in my tests? (I've seen that in other Java plugins)

Another thing: telling Maven to use the profile "jdk18" solves the issue and the Build runs without problems.
That is:
mvn clean install -P jdk18

Should I always run Maven with the profile jdk18?
That could be an issue for me, because it fails when I try to build it from Travis for example.

Hope you can help me!

Thanks in advance.

Regards,

Javier.

stephane brossier

unread,
Sep 22, 2015, 12:03:44 PM9/22/15
to Javier Gómez, Kill Bill users mailing-list
Javier,


Is your plugin pom  using the our base pom? If so that may explain what you see since be default we are running fast tests (surefire plugin config).
Also, we don't usually use JUnit (nothing wrong with that), as all our tests rely on TestNG. You might want to either not use our base pom or redefine the surefire config in your plugin as needed.


Stéphane


--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To post to this group, send email to killbill...@googlegroups.com.
Visit this group at http://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/35e8a1f5-577f-4f4b-9562-c6d23636e812%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Javier Gómez

unread,
Sep 22, 2015, 2:42:35 PM9/22/15
to Kill Bill users mailing-list, javier.go...@gmail.com
Hi Stephane!

Thanks for your help.
We were finally able to fix this issue by overriding the maven-surefire-plugin configuration in our plugin pom.xml.

Thank you!!!

Best regards,

Javier.
Reply all
Reply to author
Forward
0 new messages