maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject how to resolve dependencies in plugins
Date Fri, 24 Sep 2010 13:18:46 GMT

in a maven plugin I like to resolve the dependencies of a project.

My current way to do so is:

for (Dependency dep: project.getModel().getDependencies()) {
    // factory is 
    Artifact artifact = factory.createArtifact(dependency.getGroupId(), dependency.getArtifactId(),
                    dependency.getVersion(), dependency.getScope(), dependency.getType());
    resolver.resolve(artifact, remoteRepos, local);
    // do something with artifact.getFile()

is there a more convinient way of doing so ? something like

Artifact artifact = factory.createArtifact(dep);
resolver.resolve(artifact, remoteRepos, local);

or similar ?




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message