mirror of https://github.com/apache/maven.git
o Added section on renaming pom.xml in maven-core.jar to pom-4.0.0.xml for future legacy needs
o Added section on minimum required element-set for a unique project pom.xml git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163085 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0f5fc8560b
commit
25ec60bbc6
|
@ -13,6 +13,8 @@ Inheritance in Maven
|
|||
* how parent poms are processed
|
||||
|
||||
* the order in which elements in the POM are overridden
|
||||
|
||||
* minimum element-set for a valid project pom
|
||||
|
||||
|
||||
Maven super model
|
||||
|
@ -45,4 +47,37 @@ Maven super model
|
|||
<version></version>
|
||||
</parent>
|
||||
</project>
|
||||
+-----+
|
||||
+-----+
|
||||
|
||||
Extending the POM in the future
|
||||
|
||||
In order to anticipate changes in the structure of the POM as new releases of
|
||||
maven occur, the maven inheritance model must be pinned against a particular
|
||||
modelVersion. This is required so that a change from modelVersion 4.0.0 to
|
||||
4.1.0 doesn't cause compatibility problems with users who have not upgraded
|
||||
their projects. It also allows for a certain amount of legacy support into the
|
||||
future. Therefore, we should rename this file from pom.xml in the maven-core
|
||||
jarfile to pom-4.0.0.xml (and successive revisions to the base pom made to
|
||||
accommodate changes in the model will be named accordingly - 4.0.1, 4.0.2, ...).
|
||||
|
||||
Minimum Element-Set for a Project POM
|
||||
|
||||
In order to furnish a basic set of information which we need to distinguish one
|
||||
project from another, maven requires a minimum set of elements to be specified
|
||||
in each project's pom.xml.
|
||||
|
||||
- [modelVersion] tells maven which version of the object model this project
|
||||
is compliant with (to support future legacy concerns)
|
||||
|
||||
- [artifactId] tells maven what the artifact name is for this particular
|
||||
project. Each project should have a distinct artifactId.
|
||||
|
||||
- [version] tells maven what release of this artifact we're trying to produce.
|
||||
The fact that a project has a distinct pom.xml should indicate a separate
|
||||
release cycle that is also distinct to that project, so a concrete version
|
||||
declaration is required.
|
||||
|
||||
- [name] tells maven what the user-friendly name of this project is. The name
|
||||
element is similar to artifactId in that it is a unique descriptor for
|
||||
this and only this project, and therefore should be concretely defined.
|
||||
|
Loading…
Reference in New Issue