Repository: maven
Updated Branches:
  refs/heads/master 7846f081a -> 6ae831c22


MNG-5951 MNG-6059 improved inheritance documentation

Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/6ae831c2
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/6ae831c2
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/6ae831c2

Branch: refs/heads/master
Commit: 6ae831c229300e35e4630026678b8e0c03f1fc96
Parents: 7846f08
Author: Hervé Boutemy <[email protected]>
Authored: Sat Sep 10 14:38:25 2016 +0200
Committer: Hervé Boutemy <[email protected]>
Committed: Sat Sep 10 14:38:25 2016 +0200

----------------------------------------------------------------------
 maven-model-builder/src/site/apt/index.apt | 40 ++++++++++++++++++++-----
 1 file changed, 32 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/6ae831c2/maven-model-builder/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/site/apt/index.apt 
b/maven-model-builder/src/site/apt/index.apt
index 80fb6a9..70ae999 100644
--- a/maven-model-builder/src/site/apt/index.apt
+++ b/maven-model-builder/src/site/apt/index.apt
@@ -63,15 +63,9 @@ Maven Model Builder
 
    ** dependency management import (for dependencies of type <<<pom>>> in the 
<<<\<dependencyManagement\>>>> section)
 
-   ** inheritance assembly: <<<InheritanceAssembler>>> 
({{{./apidocs/org/apache/maven/model/inheritance/InheritanceAssembler.html}javadoc}}),
-   with its <<<DefaultInheritanceAssembler>>> implementation
-   
({{{./xref/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.html}source}}).\
-   Notice that the 5 urls from the model (<<<project.url>>>, 
<<<project.scm.connection>>>, <<<project.scm.developerConnection>>>,
-   <<<project.scm.url>>> and <<<project.distributionManagement.site.url>>>) 
have a special treatment:
-   if not configured in child, the default value is parent's one with child 
artifact id appended,
-   or since Maven 3.4.0 <<<project.directory>>> POM property value if defined 
(when module directory name is not equal to artifact id)
+   ** inheritance assembly (see {{{./index.html#Inheritance_Assembly}below}})
 
-   ** model interpolation (see below)
+   ** model interpolation (see {{{./index.html#Model_Interpolation}below}})
 
    ** url normalization: <<<UrlNormalizer>>> 
({{{./apidocs/org/apache/maven/model/path/UrlNormalizer.html}javadoc}}),
    with its <<<DefaultUrlNormalizer>>> implementation
@@ -120,6 +114,36 @@ Maven Model Builder
  []
 
 
+* Inheritance Assembly
+
+  Inheritance Assembly consists in filling current model empty fields with 
values taken from parent model.
+  It is done in <<<InheritanceAssembler>>> 
({{{./apidocs/org/apache/maven/model/inheritance/InheritanceAssembler.html}javadoc}}),
+  with its <<<DefaultInheritanceAssembler>>> implementation
+  
({{{./xref/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.html}source}}).
+
+  By default, every model field is inherited as-is from parent, with a few 
exceptions that are intentionally not inherited:
+  <<<modelVersion>>>, <<<artifactId>>>, <<<profiles>>> (injected in phase 1) 
and <<<prerequisites>>>.
+
+  Notice that the 5 urls from the model (<<<project.url>>>, 
<<<project.scm.connection>>>, <<<project.scm.developerConnection>>>,
+  <<<project.scm.url>>> and <<<project.distributionManagement.site.url>>>) 
have a special inheritance handling:
+  
+  ** if not configured in current model, the inherited value is parent's one 
with current artifact id appended,
+
+  ** since Maven 3.4.0, if <<<project.directory>>> POM property value is 
defined, it is used instead of artifact id:
+  this permits default inheritance calculations when module directory name is 
not equal to artifact id. Notice that this
+  property is not inherited from a POM to its child: childs POM will use child 
artifact id if property is not
+  set,
+
+  ** since Maven 3.4.0, inheritance can avoid appending any path to parent 
value by setting model attribute value to
+  <<<false>>> for each url:
+  <<<project/@child.project.url.inherit.append.path>>>,
+  
<<<project/distributionManagement/site/@child.site.url.inherit.append.path>>>,
+  <<<project/scm/@child.scm.connection.inherit.append.path>>>,
+  <<<project/scm/@child.scm.developperConnection.inherit.append.path>>> and
+  <<<project/scm/@child.scm.url.inherit.append.path>>>.
+
+  []
+
 * Model Interpolation
 
   Model Interpolation consists in replacing <<<$\{...\}>>> with calculated 
value. It is done in <<<StringSearchModelInterpolator>>>

Reply via email to