git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@326283 13f79535-47bb-0310-9956-ffa450edef68
192 lines
5.5 KiB
XML
192 lines
5.5 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
/*
|
|
* Copyright 2001-2005 The Apache Software Foundation.
|
|
*
|
|
* Licensed 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.
|
|
*/
|
|
-->
|
|
|
|
<document>
|
|
|
|
<properties>
|
|
<title>Validation</title>
|
|
</properties>
|
|
|
|
<body>
|
|
<section name="Validating your POM">
|
|
<p>
|
|
The <code>pom:validate</code> goal performs a validation of your
|
|
project descriptor (<code>project.xml</code>, pom) against an xsd
|
|
schema. The general form of a project descriptor can be found
|
|
on the main Maven
|
|
<a href="http://maven.apache.org/reference/project-descriptor.html">site</a>.
|
|
</p>
|
|
<subsection name="Required elements">
|
|
<p>
|
|
The validation routine works differently for stand-alone
|
|
poms and poms that extend other ones (child poms).
|
|
The following table shows which
|
|
top-level elements (<emph>i.e.</emph>, elements just below the
|
|
<code><project></code> root) are required in each case.
|
|
</p>
|
|
<table>
|
|
<tr>
|
|
<th>Element name</th>
|
|
<th>Required in stand-alone pom?</th>
|
|
<th>Required in child pom?</th>
|
|
</tr>
|
|
<tr>
|
|
<td><code><extend/></code></td>
|
|
<td>N/A</td><td>Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><pomVersion/></code></td>
|
|
<td>Yes</td><td>Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><id/></code></td>
|
|
<td>Yes</td><td>Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><groupId/></code></td>
|
|
<td>Yes</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><artifactId/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><name/></code></td>
|
|
<td>Yes</td><td>Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><currentVersion/></code></td>
|
|
<td>Yes</td><td>Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><description/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><shortDescription/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><url/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><logo/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><issueTrackingUrl/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><inceptionYear/></code></td>
|
|
<td>Yes</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><gumpRepositoryId/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><siteAddress/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><siteDirectory/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><distributionSite/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><distributionDirectory/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><mailingLists></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><developers></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><contributors></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><licenses></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><versions></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><branches></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><packageGroups></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><reports></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><repository></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><organization></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><properties></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><package/></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><build></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code><dependencies></code></td>
|
|
<td>No</td><td>No</td>
|
|
</tr>
|
|
</table>
|
|
</subsection>
|
|
<subsection name="Namespace">
|
|
<p>
|
|
It is recommended that you include a namespace declaration in your
|
|
project root:
|
|
</p>
|
|
<source><![CDATA[<project xmlns="http://maven.apache.org/POM/3.0.0">]]></source>
|
|
<p>
|
|
but this is currently not enforced by the validation routine.
|
|
</p>
|
|
</subsection>
|
|
</section>
|
|
</body>
|
|
</document>
|