'Build jar file after junit test pass

I want to build jar files when all test cases pass and when 1 test case fails then not build jar files. Please help me config I use java8,junit5,junit jupiter 5.8.2,junit platform 1.8.2



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source