private void deleteOutputIfAlreadyExists()

in src/main/java/org/apache/maven/plugins/jmod/JModCreateMojo.java [332:343]


    private void deleteOutputIfAlreadyExists(File resultingJModFile) throws MojoFailureException {
        if (resultingJModFile.exists() && resultingJModFile.isFile()) {
            try {
                getLog().debug("Deleting the existing " + resultingJModFile.getAbsolutePath() + " file.");
                FileUtils.forceDelete(resultingJModFile);
            } catch (IOException e) {
                String message = "Failure during deleting of file " + resultingJModFile.getAbsolutePath();
                getLog().error(message);
                throw new MojoFailureException(message);
            }
        }
    }