[MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3

This commit is contained in:
Karl Heinz Marbaise 2015-10-16 15:33:13 +02:00
parent 2a0fb4543f
commit 72e2478ec5
1 changed files with 5 additions and 4 deletions

View File

@ -165,7 +165,6 @@ class ReactorReader
else if ( !hasBeenPackaged( project ) ) else if ( !hasBeenPackaged( project ) )
{ {
// fallback to loose class files only if artifacts haven't been packaged yet // fallback to loose class files only if artifacts haven't been packaged yet
// and only for plain old jars. Not war files, not ear files, not anything else.
if ( isTestArtifact( artifact ) ) if ( isTestArtifact( artifact ) )
{ {
@ -176,8 +175,7 @@ class ReactorReader
} }
else else
{ {
String type = artifact.getProperty( "type", "" ); if ( project.hasLifecyclePhase( "compile" ) )
if ( project.hasLifecyclePhase( "compile" ) && COMPILE_PHASE_TYPES.contains( type ) )
{ {
return new File( project.getBuild().getOutputDirectory() ); return new File( project.getBuild().getOutputDirectory() );
} }
@ -221,7 +219,10 @@ class ReactorReader
{ {
if ( attachedArtifactComparison( requestedArtifact, attachedArtifact ) ) if ( attachedArtifactComparison( requestedArtifact, attachedArtifact ) )
{ {
return attachedArtifact; if ( requestedRepositoryConflictId.equals( ArtifactIdUtils.toVersionlessId( attachedArtifact ) ) )
{
return attachedArtifact;
}
} }
} }