mirror of https://github.com/apache/maven.git
[MNG-2054] make it0096 test the problem properly by going to enough depth. Rollback the "fix" for MNG-2130 as it didn't appear to be correct - it caused it0096, and it0099 passes anyway. I suspect there were other circumstances in the codebase causing 99 to fail at the time. You should not use a cached project for inheritence - it will accumulate inherited elements as was the case with MNG-2054.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@390133 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
32d8679253
commit
1c23ee16a4
|
@ -2,11 +2,11 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<groupId>org.apache.maven.it0096</groupId>
|
||||
<artifactId>maven-it0096-project-level2</artifactId>
|
||||
<artifactId>maven-it0096-project-level3</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>maven-it0096-project-level3</artifactId>
|
||||
<artifactId>maven-it0096-project-jar</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
|
@ -1005,22 +1005,10 @@ public class DefaultMavenProjectBuilder
|
|||
throw new ProjectBuildingException( projectId, "Missing version element from parent element" );
|
||||
}
|
||||
|
||||
String parentKey = createCacheKey( parentModel.getGroupId(), parentModel.getArtifactId(), parentModel.getVersion() );
|
||||
MavenProject parentProject = (MavenProject)projectCache.get( parentKey );
|
||||
|
||||
// the only way this will have a value is if we find the parent on disk...
|
||||
File parentDescriptor = null;
|
||||
|
||||
if ( parentProject != null )
|
||||
{
|
||||
model = parentProject.getOriginalModel();
|
||||
|
||||
parentDescriptor = parentProject.getFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
model = null;
|
||||
}
|
||||
model = null;
|
||||
|
||||
String parentRelativePath = parentModel.getRelativePath();
|
||||
|
||||
|
@ -1156,16 +1144,14 @@ public class DefaultMavenProjectBuilder
|
|||
{
|
||||
parentProjectDir = parentDescriptor.getParentFile();
|
||||
}
|
||||
|
||||
parentProject = assembleLineage( model, lineage, localRepository, parentProjectDir,
|
||||
MavenProject parent = assembleLineage( model, lineage, localRepository, parentProjectDir,
|
||||
parentSearchRepositories, aggregatedRemoteWagonRepositories,
|
||||
externalProfileManager, strict );
|
||||
parentProject.setFile( parentDescriptor );
|
||||
parent.setFile( parentDescriptor );
|
||||
|
||||
project.setParent( parentProject );
|
||||
project.setParent( parent );
|
||||
|
||||
project.setParentArtifact( parentArtifact );
|
||||
|
||||
}
|
||||
|
||||
return project;
|
||||
|
|
Loading…
Reference in New Issue