I've got a Maven project that contains (Selenium / Cucumber) test code, run through Maven. These tests create custom ExtentReports HTML reports, which are stored in target/extentreports. This HTML report is always created (unless the project does not compile, of course).
What I'd like to accomplish is that after test execution, the contents of this folder are archived into a zip file (and preferably moved to a different folder). This should happen even if the tests fail. So, essentially, I'm looking to add something that will run no matter whether the tests run through the 'test' goal fail.
Currently, I'm running my tests through
mvn clean test
which runs the Cucumber / Selenium tests using JUnit.
I've tried a number of approaches and combinations of Maven plugins (surefire, failsafe), but I haven't found the right solution yet.
I'm running these tests through Jenkins, so any post-build Jenkins solution is fine too. I'm not sure whether installing Jenkins plugins is desirable though (we're not managing Jenkins ourselves), so solutions that do not require this would be preferred.