mirror of https://github.com/apache/maven.git
[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:
parent
34bb79d551
commit
f770dc82d6
|
@ -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 );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue