Perform some action when spec fails in Spock Framework

Let’s imagine that we need to perform a certain sequence of actions when a spec fails. If you just need to close some resources when spec fails – don’t reinvent the wheel and use an easy and correct method – @AutoCleanup annotation. I wrote about it in detail earlier: https://mchesnavsky.tech/closing-resources-in-spock-framework. Keep in mind that in […]

READ MORE

How to add files to META-INF with Maven

Suppose you need to add some_dir/your_file.txt to META-INF using Maven, so that the final path looks like this: To do this, you need to create a META-INF/some_dir folders in the src/main/resources directory, and put there your_file.txt file: Once compiled, Maven will move META-INF/some_dir/your_file.txt from resources to the right place without deleting the existing files in […]

READ MORE