You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nigel Magnay <ni...@gmail.com> on 2008/01/22 17:32:43 UTC

mojo bug when not in a reactor ?

Hi

I use the standard bit of code to get all the transitively-resolved
artifacts from a project :

Artifact art2 = .... some artifact in the repository ...
resolver.resolve(art2, remoteRepositories, localRepository);
MavenProject pomProject = mavenProjectBuilder.buildFromRepository(
art2, remoteRepositories, localRepository );
		
Set artifacts = pomProject.createArtifacts( artifactFactory, null, null);
ArtifactFilter filter = null;
		
ArtifactResolutionResult arr = resolver.resolveTransitively(artifacts,
art2, localRepository, remoteRepositories, artifactMetadataSource,
filter);
Set resartifacts = arr.getArtifacts();


This is good - BUT - I get different results in the resartifacts set
if I'm running in the reactor to when I'm not (!)

If I run in the reactor, some of the transitive dependencies have
already been seen by maven. So if I print out all the dependencies, I
get some entries
like this:

Artifact: active project artifact:
	artifact = com.blah.modules:blah-services:jar:1.0-SNAPSHOT:compile;
	project: org.apache.maven.project.MavenProject@eff715c4

In this project (com.blah...), there are <exclude> nodes specified.
They seem obeyed in this instance

When I run out-of-reactor, I (of course) don't get an 'active project
artifact', just a plain one.

*However*. It seems that the excludes haven't been honoured (or, they
haven't been honoured correctly).

Is there any oddity around how resolution in these instances are
supposed to operate?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org