When ever I modify a JSON file in my resource folder, A task should invoke automatically

I am trying to check possibilities that, I have a set of JSON files in a directory src/test/resources/jsonfiles. Whenever there is change happens in jsonfiles directory, I need to trigger a task. Please let me know any possible ways to set listeners or custom plugins… etc

You could start a continuous build which executes a task with src/test/resources/jsonfiles as it’s task input