[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 @@ private File find( MavenProject project, Artifact artifact )
else if ( !hasBeenPackaged( project ) )
{
// 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 ) )
{
@ -176,8 +175,7 @@ else if ( !hasBeenPackaged( project ) )
}
else
{
String type = artifact.getProperty( "type", "" );
if ( project.hasLifecyclePhase( "compile" ) && COMPILE_PHASE_TYPES.contains( type ) )
if ( project.hasLifecyclePhase( "compile" ) )
{
return new File( project.getBuild().getOutputDirectory() );
}
@ -221,7 +219,10 @@ private Artifact findMatchingArtifact( MavenProject project, Artifact requestedA
{
if ( attachedArtifactComparison( requestedArtifact, attachedArtifact ) )
{
return attachedArtifact;
if ( requestedRepositoryConflictId.equals( ArtifactIdUtils.toVersionlessId( attachedArtifact ) ) )
{
return attachedArtifact;
}
}
}