public void execute()

in src/main/java/org/apache/easyant/tasks/LoadModule.java [98:157]


    public void execute() throws BuildException {
        if (buildModule != null && buildModule.exists()) {

            // make sure it's not a directory (this falls into the ultra
            // paranoid lets check everything category

            if (buildModule.isDirectory()) {
                throw new BuildException("What? buildModule: " + buildModule + " is a dir!");
            }

            IvyInfo info = new IvyInfo();
            info.setFile(buildModule);
            // Not sure we should bound IvyInfo to easyantIvyInstance
            info.setSettingsRef(IvyInstanceHelper.buildEasyAntIvyReference(getProject()));
            initTask(info).execute();
            getProject().setName(getProject().getProperty("ivy.module"));

            // load override buildFile before buildModule to allow target/extension-point
            // override
            File f = new File(buildModule.getParent(), EasyAntConstants.DEFAULT_OVERRIDE_BUILD_FILE);
            if (f.exists()) {
                log("Loading override build file : " + buildFile.getAbsolutePath());
                loadBuildFile(f);
            }

            log("Loading build module : " + buildModule.getAbsolutePath());
            loadBuildModule(buildModule);
        }

        if (buildFile != null && buildFile.exists()) {
            // make sure it's not a directory (this falls into the ultra
            // paranoid lets check everything category

            if (buildFile.isDirectory()) {
                throw new BuildException("What? buildFile: " + buildFile + " is a dir!");
            }

            log("Loading build file : " + buildFile.getAbsolutePath());
            loadBuildFile(buildFile);
        }

        String projectIvyInstanceProp = IvyInstanceHelper.getProjectIvyInstanceName(getProject());

        // create project ivy instance except if project ivy instance is linked
        // to easyant ivy instance
        if (!EasyAntMagicNames.EASYANT_IVY_INSTANCE.equals(projectIvyInstanceProp)) {
            configureProjectIvyinstance(projectIvyInstanceProp);
        }

        configureProjectOfflineResolver();

        if (shouldUseBuildRepository()) {
            configureBuildRepository();
        }

        if (getProject().getDefaultTarget() == null
                && getProject().getTargets().containsKey(EasyAntConstants.DEFAULT_TARGET)) {
            getProject().setDefault(EasyAntConstants.DEFAULT_TARGET);
        }
    }