public void execute()

in src/main/java/org/apache/tomcat/jakartaee/MigrationTask.java [95:130]


    public void execute() throws BuildException {
        // redirect the log messages to Ant
        Logger logger = Logger.getLogger(Migration.class.getCanonicalName());
        logger.setUseParentHandlers(false);
        for (Handler handler : logger.getHandlers()) {
            logger.removeHandler(handler);
        }
        logger.addHandler(new AntHandler(this));

        // check the parameters
        EESpecProfile profile = null;
        try {
            profile = EESpecProfiles.valueOf(this.profile.toUpperCase());
        } catch (IllegalArgumentException e) {
            throw new BuildException("Invalid profile specified: " + this.profile, getLocation()); // todo i18n
        }

        Migration migration = new Migration();
        migration.setSource(src);
        migration.setDestination(dest);
        migration.setEESpecProfile(profile);
        migration.setZipInMemory(zipInMemory);
        migration.setMatchExcludesAgainstPathName(matchExcludesAgainstPathName);
        if (this.excludes != null) {
            String[] excludes= this.excludes.split(",");
            for (String exclude : excludes) {
                migration.addExclude(exclude);
            }
        }

        try {
            migration.execute();
        } catch (IOException e) {
            throw new BuildException(e, getLocation());
        }
    }