Bundle dependency jars in TestNG Service loader

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bundle dependency jars in TestNG Service loader

Arun Kumaresan
Hi,

I recently read about implementing custom TestNG listeners using service loader.
I started using this feature but my custom testNG listeners have reference to other external dependency jars like rest-assured.

How do I bundle up those external dependency jars along with my jar that have custom testNG listeners.
NOTE: rest-assured in turn might be referring to few more dependency jarsĀ 

Here is folder structure

META-INF/service/org.testng.ITestNGListener
com/mycompany/MySuiteListener.class

But inside MySuiteListener.class I have reference to rest-assured.

Adding all those external dependency jars in the testng command line after -cp option might be cumbersome because I have to get list of all the dependency jars which usually maven/pom takes care of.

Appreciate any help on this.

Regards,
Arun Kumaresan.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.