mirror of https://github.com/apache/maven.git
o Fixed inheritance of <prerequisites>
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@783542 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
12bc6dad0e
commit
424b7ef1b0
|
@ -1512,6 +1512,14 @@ public class PomConstructionTest
|
|||
}
|
||||
}
|
||||
|
||||
/** MNG-3843 */
|
||||
public void testPrerequisitesAreNotInherited()
|
||||
throws Exception
|
||||
{
|
||||
PomTestWrapper pom = buildPom( "prerequisites-inheritance/child" );
|
||||
assertSame( null, pom.getValue( "prerequisites" ) );
|
||||
}
|
||||
|
||||
private void assertPathSuffixEquals( String expected, Object actual )
|
||||
{
|
||||
String a = actual.toString();
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<!--
|
||||
This minimalistic POM tests mere inheritance from its parent. The <prerequisites> should not be inherited.
|
||||
-->
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.maven.its.mng3843</groupId>
|
||||
<artifactId>parent-1</artifactId>
|
||||
<version>0.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>child-1</artifactId>
|
||||
</project>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.maven.its.mng3843</groupId>
|
||||
<artifactId>parent-1</artifactId>
|
||||
<version>0.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<prerequisites>
|
||||
<maven>2.0</maven>
|
||||
</prerequisites>
|
||||
</project>
|
|
@ -166,6 +166,12 @@ public class MavenModelMerger
|
|||
// neither inherited nor injected
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mergeModel_Prerequisites( Model target, Model source, boolean sourceDominant, Map<Object, Object> context )
|
||||
{
|
||||
// neither inherited nor injected
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mergeModelBase_Modules( ModelBase target, ModelBase source, boolean sourceDominant,
|
||||
Map<Object, Object> context )
|
||||
|
|
Loading…
Reference in New Issue