You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by James Chamberlain <ja...@gmail.com> on 2007/11/29 18:55:15 UTC
Is there a way to determine which repository resolved artifact?
I am writing a small utility that uses the Maven Embedder to resolve
transitive project dependencies and track things like licenses. I have
it working where it can resolve the dependencies, but I don't see a
way to know which of the repositories actually resolved the
dependency. Is there a way to get that information? Below is a snippet
of code that is being used:
MavenEmbedder maven = new MavenEmbedder();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
maven.setClassLoader( cl );
maven.setLogger( new MavenEmbedderConsoleLogger() );
maven.start();
Artifact artifact = maven.createArtifact("junit", "junit", "4.4", "", "pom");
maven.resolve(artifact, remoteRepositories, localRepository);
Model model = maven.readModel(artifact.getFile());
Thanks,
James
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org