From 334cd36b0a4a0601dfa40bd2c680aeaca794b4f1 Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Sat, 28 Dec 2024 00:46:36 +0700 Subject: [PATCH 1/2] Handle

in Maven Plugin Reference documentation See gh-43622 --- .../boot/build/mavenplugin/PluginXmlParser.java | 3 ++- .../src/docs/antora/modules/maven-plugin/pages/packaging.adoc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java index d8a5f5a59349..76f37c48c3da 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -118,6 +118,7 @@ private String format(String input) { .replace("
", " ") .replace("\n", " ") .replace(""", "\"") + .replace("

", " ") .replaceAll("\\{@code (.*?)}", "`$1`") .replaceAll("\\{@link (.*?)}", "`$1`") .replaceAll("\\{@literal (.*?)}", "`$1`") diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora/modules/maven-plugin/pages/packaging.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora/modules/maven-plugin/pages/packaging.adoc index 1d1fe87d9fea..d3ab42b8d52b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora/modules/maven-plugin/pages/packaging.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora/modules/maven-plugin/pages/packaging.adoc @@ -168,7 +168,7 @@ The following configuration installs/deploys a single `task` classified artifact include::example$packaging/classified-artifact-pom.xml[tags=classified-artifact] ---- -As both the `maven-jar-plugin` and the `spring-boot-maven-plugin` runs at the same phase, it is important that the jar plugin is defined first (so that it runs before the repackage goal). +As both the `maven-jar-plugin` and the `spring-boot-maven-plugin` run at the same phase, it is important that the jar plugin is defined first (so that it runs before the repackage goal). Again, if you are using `spring-boot-starter-parent`, this can be simplified as follows: [source,xml,indent=0,subs="verbatim,attributes"] From 1b6b1601059187962687206c351544ec52abb843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Sat, 28 Dec 2024 10:19:35 +0100 Subject: [PATCH 2/2] Polish "Handle

in Maven Plugin Reference documentation" See gh-43622 --- .../springframework/boot/build/mavenplugin/PluginXmlParser.java | 2 +- .../src/docs/antora/modules/maven-plugin/pages/packaging.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java index 76f37c48c3da..eac52c64418f 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/PluginXmlParser.java @@ -116,9 +116,9 @@ private String format(String input) { .replace("<", "<") .replace(">", ">") .replace("
", " ") + .replace("

", " ") .replace("\n", " ") .replace(""", "\"") - .replace("

", " ") .replaceAll("\\{@code (.*?)}", "`$1`") .replaceAll("\\{@link (.*?)}", "`$1`") .replaceAll("\\{@literal (.*?)}", "`$1`") diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora/modules/maven-plugin/pages/packaging.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora/modules/maven-plugin/pages/packaging.adoc index d3ab42b8d52b..1d1fe87d9fea 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora/modules/maven-plugin/pages/packaging.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora/modules/maven-plugin/pages/packaging.adoc @@ -168,7 +168,7 @@ The following configuration installs/deploys a single `task` classified artifact include::example$packaging/classified-artifact-pom.xml[tags=classified-artifact] ---- -As both the `maven-jar-plugin` and the `spring-boot-maven-plugin` run at the same phase, it is important that the jar plugin is defined first (so that it runs before the repackage goal). +As both the `maven-jar-plugin` and the `spring-boot-maven-plugin` runs at the same phase, it is important that the jar plugin is defined first (so that it runs before the repackage goal). Again, if you are using `spring-boot-starter-parent`, this can be simplified as follows: [source,xml,indent=0,subs="verbatim,attributes"]