mirror of https://github.com/apache/maven.git
[MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3
This commit is contained in:
parent
2a0fb4543f
commit
72e2478ec5
|
@ -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() );
|
||||||
}
|
}
|
||||||
|
@ -220,10 +218,13 @@ class ReactorReader
|
||||||
for ( Artifact attachedArtifact : RepositoryUtils.toArtifacts( project.getAttachedArtifacts() ) )
|
for ( Artifact attachedArtifact : RepositoryUtils.toArtifacts( project.getAttachedArtifacts() ) )
|
||||||
{
|
{
|
||||||
if ( attachedArtifactComparison( requestedArtifact, attachedArtifact ) )
|
if ( attachedArtifactComparison( requestedArtifact, attachedArtifact ) )
|
||||||
|
{
|
||||||
|
if ( requestedRepositoryConflictId.equals( ArtifactIdUtils.toVersionlessId( attachedArtifact ) ) )
|
||||||
{
|
{
|
||||||
return attachedArtifact;
|
return attachedArtifact;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue