[MNG-8473] Site fixes (#2010)

Maven4 site cleanup: make all new modules generating models also document them, expose them all and redirect all links to new documentation.

Lifecycle is the only thing missing, as it is generated on the fly, there is no more source to "point at"...

---

https://issues.apache.org/jira/browse/MNG-8473
This commit is contained in:
Tamas Cservenak 2025-01-08 23:14:18 +01:00 committed by GitHub
parent 7546361a0d
commit 71c662fa4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 167 additions and 198 deletions

View File

@ -65,8 +65,10 @@
<id>modello</id>
<goals>
<goal>velocity</goal>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
</plugin>

View File

@ -42,40 +42,28 @@ under the License.
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<configuration>
<velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
<version>1.2.0</version>
<models>
<model>src/main/mdo/metadata.mdo</model>
</models>
<templates>
<template>model.vm</template>
</templates>
<params>
<param>packageModelV4=org.apache.maven.api.metadata</param>
</params>
</configuration>
<executions>
<execution>
<id>plugin</id>
<id>modello</id>
<goals>
<goal>velocity</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
<version>1.2.0</version>
<models>
<model>src/main/mdo/metadata.mdo</model>
</models>
<templates>
<template>model.vm</template>
</templates>
<params>
<param>packageModelV4=org.apache.maven.api.metadata</param>
</params>
</configuration>
</execution>
<execution>
<id>plugin-doc</id>
<goals>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<version>1.2.0</version>
<models>
<model>src/main/mdo/metadata.mdo</model>
</models>
</configuration>
<phase>generate-sources</phase>
</execution>
</executions>
</plugin>

View File

@ -47,26 +47,29 @@ under the License.
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<configuration>
<version>4.1.0</version>
<velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
<models>
<model>src/main/mdo/maven.mdo</model>
</models>
<templates>
<template>model.vm</template>
</templates>
<params>
<param>packageModelV4=org.apache.maven.api.model</param>
<param>isMavenModel=true</param>
</params>
</configuration>
<executions>
<execution>
<id>velocity</id>
<id>modello</id>
<goals>
<goal>velocity</goal>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<configuration>
<version>4.1.0</version>
<velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
<models>
<model>src/main/mdo/maven.mdo</model>
</models>
<templates>
<template>model.vm</template>
</templates>
<params>
<param>packageModelV4=org.apache.maven.api.model</param>
<param>isMavenModel=true</param>
</params>
</configuration>
<phase>generate-sources</phase>
</execution>
</executions>
</plugin>

View File

@ -53,9 +53,11 @@ under the License.
<artifactId>modello-maven-plugin</artifactId>
<executions>
<execution>
<id>plugin</id>
<id>modello-plugin</id>
<goals>
<goal>velocity</goal>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
@ -73,23 +75,11 @@ under the License.
</configuration>
</execution>
<execution>
<id>plugin-doc</id>
<goals>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<version>2.0.0</version>
<models>
<model>src/main/mdo/plugin.mdo</model>
</models>
</configuration>
</execution>
<execution>
<id>lifecycle</id>
<id>modello-lifecycle</id>
<goals>
<goal>velocity</goal>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
@ -106,20 +96,6 @@ under the License.
</params>
</configuration>
</execution>
<execution>
<id>lifecycle-doc</id>
<goals>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<version>1.0.0</version>
<models>
<model>src/main/mdo/lifecycle.mdo</model>
</models>
</configuration>
</execution>
</executions>
</plugin>
<plugin>

View File

@ -53,41 +53,30 @@ under the License.
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<configuration>
<version>2.0.0</version>
<velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
<models>
<model>src/main/mdo/settings.mdo</model>
</models>
<templates>
<template>model.vm</template>
</templates>
<params>
<param>packageModelV4=org.apache.maven.api.settings</param>
<param>locationTracking=true</param>
<param>generateLocationClasses=true</param>
</params>
</configuration>
<executions>
<execution>
<id>velocity</id>
<id>modello</id>
<goals>
<goal>velocity</goal>
</goals>
<configuration>
<version>2.0.0</version>
<velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
<models>
<model>src/main/mdo/settings.mdo</model>
</models>
<templates>
<template>model.vm</template>
</templates>
<params>
<param>packageModelV4=org.apache.maven.api.settings</param>
<param>locationTracking=true</param>
<param>generateLocationClasses=true</param>
</params>
</configuration>
</execution>
<execution>
<id>modello-site-docs</id>
<goals>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<version>2.0.0</version>
<models>
<model>src/main/mdo/settings.mdo</model>
</models>
</configuration>
</execution>
</executions>
</plugin>

View File

@ -46,27 +46,30 @@ under the License.
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<configuration>
<version>1.2.0</version>
<velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
<models>
<model>src/main/mdo/toolchains.mdo</model>
</models>
<templates>
<template>model.vm</template>
</templates>
<params>
<param>packageModelV4=org.apache.maven.api.toolchain</param>
<param>locationTracking=true</param>
<param>generateLocationClasses=true</param>
</params>
</configuration>
<executions>
<execution>
<id>velocity</id>
<id>modello</id>
<goals>
<goal>velocity</goal>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<configuration>
<version>1.2.0</version>
<velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir>
<models>
<model>src/main/mdo/toolchains.mdo</model>
</models>
<templates>
<template>model.vm</template>
</templates>
<params>
<param>packageModelV4=org.apache.maven.api.toolchain</param>
<param>locationTracking=true</param>
<param>generateLocationClasses=true</param>
</params>
</configuration>
<phase>generate-resources</phase>
</execution>
</executions>
</plugin>

View File

@ -49,27 +49,6 @@
<project.directory>api</project.directory>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<executions>
<execution>
<id>modello-site-docs</id>
<goals>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>reporting</id>

View File

@ -95,20 +95,6 @@ under the License.
</params>
</configuration>
<executions>
<execution>
<id>modello-site-docs</id>
<goals>
<goal>xdoc</goal>
</goals>
<phase>pre-site</phase>
</execution>
<execution>
<id>modello-schema</id>
<goals>
<goal>xsd</goal>
</goals>
<phase>generate-resources</phase>
</execution>
<execution>
<id>model-v3</id>
<goals>

View File

@ -215,31 +215,6 @@ under the License.
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
<configuration>
<version>1.1.0</version>
<!-- This is a required attribute and is intentionally left empty -->
<models />
</configuration>
<executions>
<execution>
<!-- This step is required to generate xdoc, and does not generate java code -->
<id>modello-site-doc</id>
<goals>
<goal>xdoc</goal>
</goals>
<phase>pre-site</phase>
<configuration>
<version>1.0.0</version>
<models>
<model>src/main/mdo/extension.mdo</model>
</models>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>

View File

@ -358,11 +358,13 @@ public class DefaultLifecycleRegistry implements LifecycleRegistry {
@Override
public Collection<Phase> phases() {
// START SNIPPET: clean
return List.of(phase(
Phase.CLEAN,
plugin(
MAVEN_PLUGINS + "maven-clean-plugin:" + MAVEN_CLEAN_PLUGIN_VERSION + ":clean",
Phase.CLEAN)));
// END SNIPPET: clean
}
@Override
@ -379,6 +381,7 @@ public class DefaultLifecycleRegistry implements LifecycleRegistry {
@Override
public Collection<Phase> phases() {
// START SNIPPET: default
return List.of(phase(
ALL,
phase(VALIDATE, phase(INITIALIZE)),
@ -410,6 +413,7 @@ public class DefaultLifecycleRegistry implements LifecycleRegistry {
phase(INTEGRATION_TEST)),
phase(INSTALL, after(PACKAGE)),
phase(DEPLOY, after(PACKAGE))));
// END SNIPPET: default
}
@Override
@ -468,12 +472,14 @@ public class DefaultLifecycleRegistry implements LifecycleRegistry {
@Override
public Collection<Phase> phases() {
// START SNIPPET: site
return List.of(
phase(PHASE_SITE, plugin(MAVEN_SITE_PLUGIN + "site", PHASE_SITE)),
phase(
PHASE_SITE_DEPLOY,
after(PHASE_SITE),
plugin(MAVEN_SITE_PLUGIN + "deploy", PHASE_SITE_DEPLOY)));
// END SNIPPET: site
}
@Override

View File

@ -25,7 +25,7 @@
Lifecycles Reference
Maven defines 4 lifecycles in {{{./apidocs/org/apache/maven/lifecycle/providers/package-summary.html}<<<org.apache.maven.lifecycle.providers>>>}} package:
Maven defines 3 lifecycles in {{{./apidocs/org/apache/maven/lifecycle/providers/package-summary.html}<<<org.apache.maven.lifecycle.providers>>>}} package:
%{toc|fromDepth=2}
@ -34,22 +34,16 @@ Lifecycles Reference
<<<default>>> lifecycle is defined only with phases, <<without>> any associated plugin binding:
plugins bindings for this lifecycle are {{{./default-bindings.html}defined separately for each packaging}}:
%{snippet|id=default|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/DefaultLifecycleProvider.java}
%{snippet|id=default|file=${project.basedir}/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java}
* <<<clean>>> Lifecycle
<<<clean>>> lifecycle phases are defined with their plugins bindings:
%{snippet|id=clean|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/CleanLifecycleProvider.java}
%{snippet|id=clean|file=${project.basedir}/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java}
* <<<site>>> Lifecycle
<<<site>>> lifecycle phases are defined with their plugins bindings:
%{snippet|id=site|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/SiteLifecycleProvider.java}
* <<<wrapper>>> Lifecycle
<<<wrapper>>> lifecycle phases are defined with their plugins bindings:
%{snippet|id=wrapper|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/WrapperLifecycleProvider.java}
%{snippet|id=site|file=${project.basedir}/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java}

View File

@ -0,0 +1,74 @@
~~ 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.
---
Default Dependency Types
---
Hervé Boutemy
---
2024-12-27
---
Default Dependency Types Reference
Defined in <<<DefaultTypeProvider>>>
({{{./apidocs/org/apache/maven/internal/impl/resolver/type/DefaultTypeProvider.html}javadoc}},
{{{./xref/org/apache/maven/internal/impl/resolver/type/DefaultTypeProvider.html}source}}):
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
|| type || classifier || extension || language || path types || includesDependencies ||
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
|| Maven || || || || || ||
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<pom>>> | | <= type> | none | | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<bom>>> * | | <<<pom>>> | none | | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<maven-plugin>>> | | <<<jar>>> | java | classes | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
|| Java || || || || || ||
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<jar>>> | | <= type> | java | classes, modules | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<java-source>>> | <<<sources>>> | <<<jar>>> | java | | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<javadoc>>> | <<<javadoc>>> | <<<jar>>> | java | classes | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<test-jar>>> | <<<tests>>> | <<<jar>>> | java | classes, patch module | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<modular-jar>>> * | <<<tests>>> | <<<jar>>> | java | modules | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<classpath-jar>>> * | <<<tests>>> | <<<jar>>> | java | classes | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<fatjar>>> * | <<<tests>>> | <<<jar>>> | java | classes | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
|| Java/Jakarta EE || || || || || ||
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<ejb>>> | | <<<jar>>> | java | classes | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<ejb-client>>> | <<<client>>> | <<<jar>>> | java | classes | |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<war>>> | | <= type> | java | | <<<true>>> |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<ear>>> | | <= type> | java | | <<<true>>> |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<rar>>> | | <= type> | java | | <<<true>>> |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
| <<<par>>> * | | <= type> | java | | <<<true>>> |
*-----------------------+---------------+------------+-----------+-----------------------+-----------------------+
* = new in Maven 4

10
pom.xml
View File

@ -709,16 +709,6 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.</licenseText>
</configuration>
<executions>
<execution>
<id>modello-site-docs</id>
<goals>
<goal>xdoc</goal>
<goal>xsd</goal>
</goals>
<phase>pre-site</phase>
</execution>
</executions>
</plugin>
<!-- enforce backwards compatibility -->
<plugin>

View File

@ -47,9 +47,13 @@ under the License.
</menu>
<menu inherit="bottom" name="Descriptors Reference">
<item name="POM" href="./maven-model/maven.html"/>
<item name="Settings" href="./maven-settings/settings.html"/>
<item name="Toolchains" href="./maven-core/toolchains.html"/>
<item name="POM" href="./api/maven-api-model/maven.html"/>
<item name="Settings" href="./api/maven-api-settings/settings.html"/>
<item name="Toolchains" href="./api/maven-api-toolchain/toolchains.html"/>
<item name="Core Extensions" href="./api/maven-api-cli/core-extensions.html"/>
<item name="Repository Metadata" href="./api/maven-api-metadata/repository-metadata.html"/>
<item name="Plugin Descriptor" href="./api/maven-api-plugin/plugin.html"/>
<item name="Lifecycle Descriptor" href="./api/maven-api-plugin/lifecycle.html"/>
</menu>
<menu inherit="bottom" name="Reference">