Skip to content

Commit c1699cc

Browse files
committed
Set project name to lower case for short version in doc-maven-plugin
1 parent 11b9d9a commit c1699cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

commons/doc-maven-plugin/src/main/java/org/openidentityplatform/doc/maven/AsciidocPreProcessMojo.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Header, with the fields enclosed by brackets [] replaced by your own identifying
1212
* information: "Portions copyright [year] [name of copyright owner]".
1313
*
14-
* Copyright 2024-2025 3A Systems LLC.
14+
* Copyright 2024-2026 3A Systems LLC.
1515
*/
1616

1717
package org.openidentityplatform.doc.maven;
@@ -126,10 +126,11 @@ protected void setVersion(String version) throws IOException {
126126
for(File docFile : docDir.listFiles((dir, name) -> name.toLowerCase().endsWith(".adoc"))) {
127127
System.out.println(docFile);
128128
String adoc = FileUtils.readFileToString(docFile, StandardCharsets.UTF_8);
129+
129130
String versionRegex = String.format("(:%s-version:)\\s*(.*)\\b", this.projectName.toLowerCase());
130131
adoc = adoc.replaceAll(versionRegex, "$1 " + version);
131132

132-
String versionShortRegex = String.format("(:%s-version-short:)\\s*(.*)\\b", this.projectName);
133+
String versionShortRegex = String.format("(:%s-version-short:)\\s*(.*)\\b", this.projectName.toLowerCase());
133134
adoc = adoc.replaceAll(versionShortRegex, "$1 " + versionShort);
134135

135136
FileUtils.writeStringToFile(docFile, adoc, StandardCharsets.UTF_8);

0 commit comments

Comments
 (0)