Package org.apache.easyant.tasks

Examples of org.apache.easyant.tasks.AbstractImport


            eaReport.setResolveReport(report);
            eaReport.setModuleDescriptor(report.getModuleDescriptor());

            Project project = buildProject(null);

            AbstractImport abstractImport = new AbstractImport() {
                @Override
                public void execute() throws BuildException {
                    Path path = createModulePath(moduleRevisionId);
                    File antFile = null;
                    for (int j = 0; j < report.getConfigurationReport(getMainConf()).getAllArtifactsReports().length; j++) {
                        ArtifactDownloadReport artifact = report.getConfigurationReport(getMainConf())
                                .getAllArtifactsReports()[j];

                        if ("ant".equals(artifact.getType())) {
                            antFile = artifact.getLocalFile();
                        } else if ("jar".equals(artifact.getType())) {
                            path.createPathElement().setLocation(artifact.getLocalFile());
                        } else {
                            handleOtherResourceFile(moduleRevisionId, artifact.getName(), artifact.getExt(),
                                    artifact.getLocalFile());
                        }
                    }
                    if (antFile != null && antFile.exists()) {
                        ProjectHelper.configureProject(getProject(), antFile);
                    }
                }
            };

            abstractImport.setProject(project);
            // location ?
            abstractImport.execute();

            analyseProject(project, eaReport, conf);
        } catch (Exception e) {
            throw new Exception("An error occured while fetching plugin informations : " + e.getMessage(), e);
        } finally {
View Full Code Here

TOP

Related Classes of org.apache.easyant.tasks.AbstractImport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.