Author: vsiveton
Date: Wed Jan 9 12:10:25 2008
New Revision: 610540
URL: http://svn.apache.org/viewvc?rev=610540&view=rev
Log:
MNG-2769: Use of POM namespace is confused and confusing in both the code and
the documentation
o fixed doc as suggested
Modified:
maven/site/trunk/src/site/apt/pom.apt
Modified: maven/site/trunk/src/site/apt/pom.apt
URL:
http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/pom.apt?rev=610540&r1=610539&r2=610540&view=diff
==============================================================================
--- maven/site/trunk/src/site/apt/pom.apt (original)
+++ maven/site/trunk/src/site/apt/pom.apt Wed Jan 9 12:10:25 2008
@@ -3,7 +3,7 @@
-----
Eric Redmond
-----
- 3 September 2006
+ January 2008
-----
POM Reference
@@ -120,7 +120,10 @@
contains 4.0.0. That is currently the only supported POM version for Maven
2, and is always required.
+--------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- The Basics -->
@@ -174,8 +177,12 @@
<<<build.xml>>> file, where tasks are almost always dependant on the lines
executed before it.
+--------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<groupId>org.codehaus.mojo</groupId>
<artifactId>my-project</artifactId>
<version>1.0</version>
@@ -227,7 +234,10 @@
<<<jar>>>. We could make it into a <<<war>>> by declaring a different
packaging:
+-----------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<packaging>war</packaging>
...
@@ -268,7 +278,10 @@
allowing your list to focus solely on the dependencies your project requires.
+-----------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<dependencies>
<dependency>
@@ -360,7 +373,10 @@
wish to use it or its dependencies, then we would add it as an
<<<exclusion>>>.
+-----------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<dependencies>
<dependency>
@@ -392,8 +408,12 @@
extra step in making project inheritance explicit to the project object
model.
+-----------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<groupId>org.codehaus.mojo</groupId>
<artifactId>my-parent</artifactId>
<version>2.0</version>
@@ -424,14 +444,19 @@
[]
+-----------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.codehaus.mojo</groupId>
<artifactId>my-parent</artifactId>
<version>2.0</version>
<relativePath>../my-parent</relativePath>
</parent>
+
<artifactId>my-project</artifactId>
</project>
+-----------------------------+
@@ -586,11 +611,16 @@
directories to those projects.
+-----------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<groupId>org.codehaus.mojo</groupId>
<artifactId>my-parent</artifactId>
<version>2.0</version>
+
<modules>
<module>my-project<module>
</modules>
@@ -651,7 +681,11 @@
<Note: These different> <<<build>>> <elements may be denoted "project build"
and "profile build".>
+-----------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+ ...
<!-- "Project Build" contains more elements than just the BaseBuild set -->
<build>...</build>
@@ -719,7 +753,10 @@
to bundle the resource correctly, you would specify resources similar to the
following:
+------------------------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
<build>
...
<resources>
@@ -778,7 +815,10 @@
*** {Plugins}
+------------------------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
<build>
...
<plugins>
@@ -838,7 +878,10 @@
You would get an <<<execution>>> like this:
+------------------------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<build>
<plugins>
@@ -900,7 +943,11 @@
[]
+------------------------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+ ...
<build>
...
<pluginManagement>
@@ -935,7 +982,11 @@
So rather than the above mess included in every child <<<pom.xml>>>, only
the following is required:
+------------------------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+ ...
<build>
...
<plugins>
@@ -962,7 +1013,11 @@
for the POM as a whole. Since they do not exist in profile builds, these
cannot be altered by profiles.
+------------------------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+ ...
<build>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<scriptSourceDirectory>${basedir}/src/main/scripts</scriptSourceDirectory>
@@ -988,7 +1043,11 @@
are excellent for specifying one out of multiple implementations of a common
plugin interface.
+------------------------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+ ...
<build>
...
<extensions>
@@ -1023,7 +1082,10 @@
also be suppressed in the following, more verbose, way, which effectively
turns off project-info reports.
+------------------------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<reporting>
<plugins>
@@ -1056,7 +1118,10 @@
children, and set <<<inherited>>> to true. The <<<reportSet>>> would
resemble the following:
+------------------------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<reporting>
<plugins>
@@ -1144,7 +1209,10 @@
where the most basic information is set.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<organization>
<name>Codehaus Mojo</name>
@@ -1164,7 +1232,10 @@
should not be contacted about the project, they need not be listed here.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<developers>
<developer>
@@ -1215,7 +1286,10 @@
than developers.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<contributors>
<contributor>
@@ -1248,7 +1322,10 @@
something, its primarily used for generating project documentation.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<issueManagement>
<system>Bugzilla</system>
@@ -1271,7 +1348,10 @@
<<<sendOnFailure>>>, and not <<<sendOnSuccess>>> or <<<sendOnWarning>>>.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<ciManagement>
<system>continuum</system>
@@ -1297,7 +1377,10 @@
Most mailing lists are for developers and users.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<mailingLists>
<mailingList>
@@ -1334,7 +1417,10 @@
(it does, doesn't it?) then here is where you would place that information
into the POM.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<scm>
<connection>scm:svn:http://127.0.0.1/svn/my-project</connection>
@@ -1373,7 +1459,10 @@
A publicly browsable repository. For example, via ViewCVS.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<prerequisites>
<maven>2.0.4</maven>
@@ -1405,7 +1494,10 @@
is the Codehaus snapshots repo.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<repositories>
<repository>
@@ -1472,7 +1564,10 @@
and supporting files generated throughout the build process. Starting with
the last elements first:
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<distributionManagement>
...
@@ -1517,7 +1612,10 @@
The repository elements will be used for snapshot distribution if the
snapshotRepository is not defined.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<distributionManagement>
<repository>
@@ -1562,7 +1660,10 @@
how to deploy the projects site and documentation.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<distributionManagement>
...
@@ -1584,7 +1685,10 @@
** {Relocation}
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<distributionManagement>
...
@@ -1617,7 +1721,10 @@
the JDK version used. The elements of profiles are as follows:
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<profiles>
<profile>
@@ -1642,7 +1749,10 @@
basic POM only under certain circumstances. Those circumstances are
specified via an <<<activation>>> element.
+-------------------------+
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
...
<profiles>
<profile>