Search in sources :

Example 1 with Dependency

use of aQute.maven.api.IPom.Dependency in project bnd by bndtools.

the class RepoActions method addDependency.

private void addDependency(Archive archive, MavenScope scope) throws Exception {
    IPom pom = repo.storage.getPom(archive.revision);
    Map<Program, Dependency> dependencies = pom.getDependencies(scope, false);
    for (Dependency d : dependencies.values()) {
        BundleDescriptor add = repo.index.add(d.program.version(d.version).archive("jar", null));
        if (d.error != null)
            add.error = d.error;
    }
}
Also used : BundleDescriptor(aQute.bnd.repository.maven.provider.IndexFile.BundleDescriptor) Program(aQute.maven.api.Program) IPom(aQute.maven.api.IPom) Dependency(aQute.maven.api.IPom.Dependency)

Example 2 with Dependency

use of aQute.maven.api.IPom.Dependency in project bnd by bndtools.

the class Traverser method parsePom.

private void parsePom(POM pom, String parent) throws Exception {
    Map<Program, Dependency> dependencies = pom.getDependencies(EnumSet.of(MavenScope.compile, MavenScope.runtime), false);
    for (Dependency d : dependencies.values()) {
        d.bindToVersion(repo);
        Archive archive = d.getArchive();
        if (archive == null) {
            logger.debug("pom {} has bad dependency {}", pom.getRevision(), d);
        } else
            parse(archive, parent);
    }
}
Also used : Program(aQute.maven.api.Program) Archive(aQute.maven.api.Archive) Dependency(aQute.maven.api.IPom.Dependency)

Aggregations

Dependency (aQute.maven.api.IPom.Dependency)2 Program (aQute.maven.api.Program)2 BundleDescriptor (aQute.bnd.repository.maven.provider.IndexFile.BundleDescriptor)1 Archive (aQute.maven.api.Archive)1 IPom (aQute.maven.api.IPom)1