public void execute()
            throws MojoExecutionException {

        //If -Drestrict.skip=true
        if (skipThisMojo) {
            return;
        }


        if (!buildDirectory.exists()) {
            getLog().warn("Directory " + buildDirectory + " does not exist, ignoring");
            return;
        }

        File report = new File(buildDirectory, "restrict-maven-plugin.txt");
        RestrictLogger restrictLogger = new RestrictLogger(report, getLog());
        long x = System.currentTimeMillis();
        try {

            restrictLogger.info("restrict-maven-plugin started!");



        /* Restriction from classes/packages (keys) and to classes (values)*/
            Map<WildcardMatcher, Set<WildcardMatcher>> restrictionsMap;

            if (restrictions == null || restrictions.length == 0) {
                restrictLogger.warn("RestrictMojo is set as a plugin but it is not configured properly!");
                return;
            } else {
                restrictionsMap = RestrictionConfigurationFactory.produceConfiguration(restrictions, restrictLogger,printDebugs);
            }


            Inspector inspector = new Inspector(restrictLogger, restrictionsMap,printDebugs);
            try {

                if (!onlyInspectFolder) {
                    Set<Artifact> artifacts = (Set<Artifact>) mavenProject.getDependencyArtifacts();
                    inspector.inspectArtifacts(artifacts);
                }
                inspector.inspectFolder(buildDirectory);

            } catch (Exception e) {
                throw new MojoExecutionException("Can not inspect all the artifacts", e);
            }


            inspector.breakIfError(continueOnError);
        } finally {
            restrictLogger.info("restrict-maven-plugin completed in approx. " + Math.ceil((System.currentTimeMillis() - x) / 1000.0) + " seconds.");
            restrictLogger.close();
        }

    }