[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 ); artifact.setResolved( true );
} }
else // 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.
File classesDir; // else
// {
if ( isTestArtifact( artifact ) ) // File classesDir;
{ //
classesDir = new File( project.getBuild().getTestOutputDirectory() ); // if ( isTestArtifact( artifact ) )
} // {
else // classesDir = new File( project.getBuild().getTestOutputDirectory() );
{ // }
classesDir = new File( project.getBuild().getOutputDirectory() ); // else
} // {
// classesDir = new File( project.getBuild().getOutputDirectory() );
if ( classesDir.isDirectory() ) // }
{ //
artifact.setFile( classesDir ); // if ( classesDir.isDirectory() )
// {
artifact.setFromAuthoritativeRepository( true ); // artifact.setFile( classesDir );
//
artifact.setResolved( true ); // artifact.setFromAuthoritativeRepository( true );
} //
} // artifact.setResolved( true );
// }
// }
} }
} }