[MNG-4269] [regression] Invocation of just installed plugin on its plugin project can fail with ComponentLookupException for mojo class

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@799680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-07-31 18:11:57 +00:00
parent 34bb79d551
commit f770dc82d6
1 changed files with 24 additions and 22 deletions

View File

@ -64,28 +64,30 @@ public class ReactorArtifactRepository
artifact.setResolved( true );
}
else
{
File classesDir;
if ( isTestArtifact( artifact ) )
{
classesDir = new File( project.getBuild().getTestOutputDirectory() );
}
else
{
classesDir = new File( project.getBuild().getOutputDirectory() );
}
if ( classesDir.isDirectory() )
{
artifact.setFile( classesDir );
artifact.setFromAuthoritativeRepository( true );
artifact.setResolved( true );
}
}
// TODO: The code below supports MNG-3043 & MNG-2871 but in its current form causes MNG-4269.
// We need to consider the state of the reactor before handing out directories.
// else
// {
// File classesDir;
//
// if ( isTestArtifact( artifact ) )
// {
// classesDir = new File( project.getBuild().getTestOutputDirectory() );
// }
// else
// {
// classesDir = new File( project.getBuild().getOutputDirectory() );
// }
//
// if ( classesDir.isDirectory() )
// {
// artifact.setFile( classesDir );
//
// artifact.setFromAuthoritativeRepository( true );
//
// artifact.setResolved( true );
// }
// }
}
}