From c7e92b7226abe8bbad2cddb02e61e1074f26d52b Mon Sep 17 00:00:00 2001 From: Tamas Cservenak <tamas@cservenak.net> Date: Mon, 23 Dec 2024 15:48:01 +0100 Subject: [PATCH 1/2] Restore some links Some links like settings, toolchains and lifecycles were broken. --- api/maven-api-cli/pom.xml | 2 + api/maven-api-metadata/pom.xml | 42 ++++------ api/maven-api-model/pom.xml | 33 ++++---- api/maven-api-plugin/pom.xml | 34 ++------ api/maven-api-settings/pom.xml | 43 ++++------ api/maven-api-toolchain/pom.xml | 35 ++++---- api/pom.xml | 21 ----- compat/maven-model/pom.xml | 14 ---- impl/maven-core/pom.xml | 25 ------ .../maven-core/src/site/apt/lifecycles.apt.vm | 80 ++++++++++++++++--- .../src/site/apt/dependency-types.apt | 74 +++++++++++++++++ pom.xml | 10 --- src/site/site.xml | 10 ++- 13 files changed, 226 insertions(+), 197 deletions(-) create mode 100644 impl/maven-impl/src/site/apt/dependency-types.apt diff --git a/api/maven-api-cli/pom.xml b/api/maven-api-cli/pom.xml index 00f2015a75e7..e9b0c620f59c 100644 --- a/api/maven-api-cli/pom.xml +++ b/api/maven-api-cli/pom.xml @@ -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> diff --git a/api/maven-api-metadata/pom.xml b/api/maven-api-metadata/pom.xml index c7886d5d9a4f..1932115753e6 100644 --- a/api/maven-api-metadata/pom.xml +++ b/api/maven-api-metadata/pom.xml @@ -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> diff --git a/api/maven-api-model/pom.xml b/api/maven-api-model/pom.xml index de1951415ed0..11023a08abf4 100644 --- a/api/maven-api-model/pom.xml +++ b/api/maven-api-model/pom.xml @@ -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> diff --git a/api/maven-api-plugin/pom.xml b/api/maven-api-plugin/pom.xml index c74e187bfac7..b811cedee1a7 100644 --- a/api/maven-api-plugin/pom.xml +++ b/api/maven-api-plugin/pom.xml @@ -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,24 +75,12 @@ under the License. </configuration> </execution> <execution> - <id>plugin-doc</id> + <id>modello-lifecycle</id> <goals> + <goal>velocity</goal> <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> - <goals> - <goal>velocity</goal> - </goals> <phase>generate-sources</phase> <configuration> <velocityBasedir>${project.basedir}/../../src/mdo</velocityBasedir> @@ -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> diff --git a/api/maven-api-settings/pom.xml b/api/maven-api-settings/pom.xml index 4e8b6291f212..cb6298b4251e 100644 --- a/api/maven-api-settings/pom.xml +++ b/api/maven-api-settings/pom.xml @@ -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> diff --git a/api/maven-api-toolchain/pom.xml b/api/maven-api-toolchain/pom.xml index 663148bb1353..105d2973b0e7 100644 --- a/api/maven-api-toolchain/pom.xml +++ b/api/maven-api-toolchain/pom.xml @@ -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> diff --git a/api/pom.xml b/api/pom.xml index 28585d8d0e71..4cf4549a1846 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -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> diff --git a/compat/maven-model/pom.xml b/compat/maven-model/pom.xml index 27f9af731a65..2935494b678f 100644 --- a/compat/maven-model/pom.xml +++ b/compat/maven-model/pom.xml @@ -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> diff --git a/impl/maven-core/pom.xml b/impl/maven-core/pom.xml index 5a919513eb62..75f59d090efb 100644 --- a/impl/maven-core/pom.xml +++ b/impl/maven-core/pom.xml @@ -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> diff --git a/impl/maven-core/src/site/apt/lifecycles.apt.vm b/impl/maven-core/src/site/apt/lifecycles.apt.vm index 5fa8d9ee0d0c..edcdfc8b1178 100644 --- a/impl/maven-core/src/site/apt/lifecycles.apt.vm +++ b/impl/maven-core/src/site/apt/lifecycles.apt.vm @@ -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,82 @@ 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} +*-------------------------------+---------------------------------------------------------------------------------------+ +|| Phase || Description +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<validate>>> | validate the project is correct and all necessary information is available. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<initialize>>> | initialize build state, e.g. set properties or create directories. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<generate-sources>>> | generate any source code for inclusion in compilation. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<process-sources>>> | process the source code, for example to filter any values. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<generate-resources>>> | generate resources for inclusion in the package. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<process-resources>>> | copy and process the resources into the destination directory, ready for packaging. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<compile>>> | compile the source code of the project. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<process-classes>>> | post-process the generated files from compilation, for example to do bytecode enhancement on Java classes. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<generate-test-sources>>> | generate any test source code for inclusion in compilation. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<process-test-sources>>> | process the test source code, for example to filter any values. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<generate-test-resources>>> | create resources for testing. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<process-test-resources>>> | copy and process the resources into the test destination directory. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<test-compile>>> | compile the test source code into the test destination directory +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<process-test-classes>>> | post-process the generated files from test compilation, for example to do bytecode enhancement on Java classes. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<test>>> | run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<prepare-package>>> | perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<package>>> | take the compiled code and package it in its distributable format, such as a JAR. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<pre-integration-test>>> | perform actions required before integration tests are executed. This may involve things such as setting up the required environment. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<integration-test>>> | process and deploy the package if necessary into an environment where integration tests can be run. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<post-integration-test>>> | perform actions required after integration tests have been executed. This may including cleaning up the environment. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<verify>>> | run any checks to verify the package is valid and meets quality criteria. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<install>>> | install the package into the local repository, for use as a dependency in other projects locally. +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<deploy>>> | done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects. +*-------------------------------+--------------------------------------------------------------------------------------+ * <<<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} +*-------------------------------+---------------------------------------------------------------------------------------+ +|| Phase || Description +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<pre-clean>>> | execute processes needed prior to the actual project cleaning +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<clean>>> | remove all files generated by the previous build +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<post-clean>>> | execute processes needed to finalize the project cleaning +*-------------------------------+--------------------------------------------------------------------------------------+ * <<<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} +*-------------------------------+---------------------------------------------------------------------------------------+ +|| Phase || Description +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<pre-site>>> | execute processes needed prior to the actual project site generation +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<site>>> | generate the project's site documentation +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<post-site>>> | execute processes needed to finalize the site generation, and to prepare for site deployment +*-------------------------------+--------------------------------------------------------------------------------------+ +| <<<site-deploy>>> | deploy the generated site documentation to the specified web server +*-------------------------------+--------------------------------------------------------------------------------------+ diff --git a/impl/maven-impl/src/site/apt/dependency-types.apt b/impl/maven-impl/src/site/apt/dependency-types.apt new file mode 100644 index 000000000000..10bb5f02a06a --- /dev/null +++ b/impl/maven-impl/src/site/apt/dependency-types.apt @@ -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 \ No newline at end of file diff --git a/pom.xml b/pom.xml index c1806ff2989e..de984a9199f0 100644 --- a/pom.xml +++ b/pom.xml @@ -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> diff --git a/src/site/site.xml b/src/site/site.xml index 2d6435fb8b0e..7a2e94d68ee3 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -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"> From b6ea2f2397ea5ccfa716f8a70592e973fc56f27d Mon Sep 17 00:00:00 2001 From: Tamas Cservenak <tamas@cservenak.net> Date: Wed, 8 Jan 2025 21:51:03 +0100 Subject: [PATCH 2/2] Redirect page back to sources --- .../impl/DefaultLifecycleRegistry.java | 6 ++ .../maven-core/src/site/apt/lifecycles.apt.vm | 72 +------------------ 2 files changed, 9 insertions(+), 69 deletions(-) diff --git a/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java b/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java index 0bc9b9b86d31..859821ceac0f 100644 --- a/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java +++ b/impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java @@ -358,11 +358,13 @@ public String id() { @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 String id() { @Override public Collection<Phase> phases() { + // START SNIPPET: default return List.of(phase( ALL, phase(VALIDATE, phase(INITIALIZE)), @@ -410,6 +413,7 @@ public Collection<Phase> phases() { phase(INTEGRATION_TEST)), phase(INSTALL, after(PACKAGE)), phase(DEPLOY, after(PACKAGE)))); + // END SNIPPET: default } @Override @@ -468,12 +472,14 @@ public String id() { @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 diff --git a/impl/maven-core/src/site/apt/lifecycles.apt.vm b/impl/maven-core/src/site/apt/lifecycles.apt.vm index edcdfc8b1178..d5c132476af7 100644 --- a/impl/maven-core/src/site/apt/lifecycles.apt.vm +++ b/impl/maven-core/src/site/apt/lifecycles.apt.vm @@ -34,82 +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}}: -*-------------------------------+---------------------------------------------------------------------------------------+ -|| Phase || Description -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<validate>>> | validate the project is correct and all necessary information is available. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<initialize>>> | initialize build state, e.g. set properties or create directories. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<generate-sources>>> | generate any source code for inclusion in compilation. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<process-sources>>> | process the source code, for example to filter any values. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<generate-resources>>> | generate resources for inclusion in the package. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<process-resources>>> | copy and process the resources into the destination directory, ready for packaging. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<compile>>> | compile the source code of the project. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<process-classes>>> | post-process the generated files from compilation, for example to do bytecode enhancement on Java classes. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<generate-test-sources>>> | generate any test source code for inclusion in compilation. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<process-test-sources>>> | process the test source code, for example to filter any values. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<generate-test-resources>>> | create resources for testing. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<process-test-resources>>> | copy and process the resources into the test destination directory. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<test-compile>>> | compile the test source code into the test destination directory -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<process-test-classes>>> | post-process the generated files from test compilation, for example to do bytecode enhancement on Java classes. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<test>>> | run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<prepare-package>>> | perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<package>>> | take the compiled code and package it in its distributable format, such as a JAR. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<pre-integration-test>>> | perform actions required before integration tests are executed. This may involve things such as setting up the required environment. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<integration-test>>> | process and deploy the package if necessary into an environment where integration tests can be run. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<post-integration-test>>> | perform actions required after integration tests have been executed. This may including cleaning up the environment. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<verify>>> | run any checks to verify the package is valid and meets quality criteria. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<install>>> | install the package into the local repository, for use as a dependency in other projects locally. -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<deploy>>> | done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects. -*-------------------------------+--------------------------------------------------------------------------------------+ +%{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: -*-------------------------------+---------------------------------------------------------------------------------------+ -|| Phase || Description -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<pre-clean>>> | execute processes needed prior to the actual project cleaning -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<clean>>> | remove all files generated by the previous build -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<post-clean>>> | execute processes needed to finalize the project cleaning -*-------------------------------+--------------------------------------------------------------------------------------+ +%{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: -*-------------------------------+---------------------------------------------------------------------------------------+ -|| Phase || Description -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<pre-site>>> | execute processes needed prior to the actual project site generation -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<site>>> | generate the project's site documentation -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<post-site>>> | execute processes needed to finalize the site generation, and to prepare for site deployment -*-------------------------------+--------------------------------------------------------------------------------------+ -| <<<site-deploy>>> | deploy the generated site documentation to the specified web server -*-------------------------------+--------------------------------------------------------------------------------------+ +%{snippet|id=site|file=${project.basedir}/src/main/java/org/apache/maven/internal/impl/DefaultLifecycleRegistry.java}