Package org.apache.ivy.plugins.parser.m2

Examples of org.apache.ivy.plugins.parser.m2.PomModuleDescriptorBuilder


                getSettings(), ivyFile.toURL(), false);
            PomModuleDescriptorWriter.write(md,
                headerFile == null ? null : FileUtil.readEntirely(getHeaderFile()),
                mappings.isEmpty()
                    ? PomModuleDescriptorWriter.DEFAULT_MAPPING
                    : new ConfigurationScopeMapping(getMappingsMap()), pomFile);
        } catch (MalformedURLException e) {
            throw new BuildException("unable to convert given ivy file to url: " + ivyFile + ": "
                    + e, e);
        } catch (ParseException e) {
            log(e.getMessage(), Project.MSG_ERR);
View Full Code Here


                getSettings(), ivyFile.toURI().toURL(), false);
            PomModuleDescriptorWriter.write(md,
                headerFile == null ? null : FileUtil.readEntirely(getHeaderFile()),
                mappings.isEmpty()
                    ? PomModuleDescriptorWriter.DEFAULT_MAPPING
                    : new ConfigurationScopeMapping(getMappingsMap()), pomFile);
        } catch (MalformedURLException e) {
            throw new BuildException("unable to convert given ivy file to url: " + ivyFile + ": "
                    + e, e);
        } catch (ParseException e) {
            log(e.getMessage(), Project.MSG_ERR);
View Full Code Here

                getSettings(), ivyFile.toURL(), false);
            PomModuleDescriptorWriter.write(md,
                headerFile == null ? null : FileUtil.readEntirely(getHeaderFile()),
                mappings.isEmpty()
                    ? PomModuleDescriptorWriter.DEFAULT_MAPPING
                    : new ConfigurationScopeMapping(getMappingsMap()), pomFile);
        } catch (MalformedURLException e) {
            throw new BuildException("unable to convert given ivy file to url: " + ivyFile + ": "
                    + e, e);
        } catch (ParseException e) {
            log(e.getMessage(), Project.MSG_ERR);
View Full Code Here

                if (parentDescr != null) {
                    for (int i = 0; i < parentDescr.getDependencies().length; i++) {
                        DependencyDescriptor descriptor = parentDescr.getDependencies()[i];
                        if (descriptor instanceof PomDependencyDescriptor) {
                            PomDependencyData parentDep = ((PomDependencyDescriptor) descriptor)
                                    .getPomDependencyData();
                            PomDependencyData dep = domReader.new PomDependencyData(parentDep);
                            mdBuilder.addDependency(res, dep);
                        } else {
                            mdBuilder.addDependency(descriptor);
                        }
                    }
View Full Code Here

                if (parentDescr != null) {
                    for (int i = 0; i < parentDescr.getDependencies().length; i++) {
                        DependencyDescriptor descriptor = parentDescr.getDependencies()[i];
                        if (descriptor instanceof PomDependencyDescriptor) {
                            PomDependencyData parentDep = ((PomDependencyDescriptor) descriptor).getPomDependencyData();
                            PomDependencyData dep = domReader.new PomDependencyData(parentDep);
                            mdBuilder.addDependency(res, dep);
                        } else {
                            mdBuilder.addDependency(descriptor);
                        }
                    }
View Full Code Here

                if (parentDescr != null) {
                    for (int i = 0; i < parentDescr.getDependencies().length; i++) {
                        DependencyDescriptor descriptor = parentDescr.getDependencies()[i];
                        if (descriptor instanceof PomDependencyDescriptor) {
                            PomDependencyData parentDep = ((PomDependencyDescriptor) descriptor).getPomDependencyData();
                            PomDependencyData dep = domReader.new PomDependencyData(parentDep);
                            mdBuilder.addDependency(res, dep);
                        } else {
                            mdBuilder.addDependency(descriptor);
                        }
                    }
View Full Code Here

                    // add dependency management info from parent
                    List depMgt = PomModuleDescriptorBuilder.getDependencyManagements(parentDescr);
                    for (Iterator it = depMgt.iterator(); it.hasNext();) {
                        PomDependencyMgt dep = (PomDependencyMgt) it.next();
                        if (dep instanceof PomDependencyMgtElement) {
                            dep = domReader.new PomDependencyMgtElement(
                                    (PomDependencyMgtElement) dep);
                        }
                        mdBuilder.addDependencyMgt(dep);
                    }
View Full Code Here

                    // add dependency management info from parent
                    List depMgt = PomModuleDescriptorBuilder.getDependencyManagements(parentDescr);
                    for (Iterator it = depMgt.iterator(); it.hasNext();) {
                        PomDependencyMgt dep = (PomDependencyMgt) it.next();
                        if (dep instanceof PomDependencyMgtElement) {
                            dep = domReader.new PomDependencyMgtElement((PomDependencyMgtElement) dep);
                        }
                        mdBuilder.addDependencyMgt(dep);
                    }
                   
                    // add plugins from parent
View Full Code Here

                    // add dependency management info from parent
                    List depMgt = PomModuleDescriptorBuilder.getDependencyManagements(parentDescr);
                    for (Iterator it = depMgt.iterator(); it.hasNext();) {
                        PomDependencyMgt dep = (PomDependencyMgt) it.next();
                        if (dep instanceof PomDependencyMgtElement) {
                            dep = domReader.new PomDependencyMgtElement((PomDependencyMgtElement) dep);
                        }
                        mdBuilder.addDependencyMgt(dep);
                    }
                   
                    // add plugins from parent
View Full Code Here

                    + " from=" + ivyFile + " to=" + pomFile, e);
        }
    }

    private PomWriterOptions getPomWriterOptions() throws IOException {
        PomWriterOptions options = new PomWriterOptions();
        options.setConfs(splitConfs(conf)).setArtifactName(getArtifactName())
                .setArtifactPackaging(getArtifactPackaging()).setPrintIvyInfo(isPrintIvyInfo())
                .setDescription(getDescription()).setExtraDependencies(getDependencies())
                .setTemplate(getTemplateFile());

        if (!mappings.isEmpty()) {
            options.setMapping(new PomWriterOptions.ConfigurationScopeMapping(getMappingsMap()));
        }

        if (headerFile != null) {
            options.setLicenseHeader(FileUtil.readEntirely(getHeaderFile()));
        }

        return options;
    }
View Full Code Here

TOP

Related Classes of org.apache.ivy.plugins.parser.m2.PomModuleDescriptorBuilder

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.