Skip to content

Commit 661d1bf

Browse files
authored
Bump maven-site-plugin to v3.20.0 (#297)
* Removed now invalid 'relativizeDecorationLinks' configuration * Updated sources location to new 'locales' in converter-example * Update other dependencies: * maven-fluido-skin v2.0.2-M11 * maven-project-info-reports-plugin v3.7.0 * Update tests to new generated HTML
1 parent 9aa5f4b commit 661d1bf

File tree

6 files changed

+34
-32
lines changed

6 files changed

+34
-32
lines changed

asciidoc-maven-site-converter-example/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323
<plugin>
2424
<groupId>org.apache.maven.plugins</groupId>
2525
<artifactId>maven-site-plugin</artifactId>
26-
<version>3.12.1</version>
26+
<version>3.20.0</version>
2727
<configuration>
2828
<!-- Disable generateReports if you don't want to include the built-in reports -->
2929
<generateReports>true</generateReports>
3030
<generateSitemap>true</generateSitemap>
31-
<relativizeDecorationLinks>false</relativizeDecorationLinks>
32-
<locales>en</locales>
3331
<inputEncoding>UTF-8</inputEncoding>
3432
<outputEncoding>UTF-8</outputEncoding>
3533
<!-- Ignore files prefixed with underscore -->

asciidoc-maven-site-converter-example/src/site/site.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<project>
1+
<site xmlns="http://maven.apache.org/SITE/2.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd">
24
<body>
35
<menu ref="reports" inherit="top"/>
46
<menu ref="modules"/>
@@ -10,6 +12,6 @@
1012
<skin>
1113
<groupId>org.apache.maven.skins</groupId>
1214
<artifactId>maven-fluido-skin</artifactId>
13-
<version>1.12.0</version>
15+
<version>2.0.0-M11</version>
1416
</skin>
15-
</project>
17+
</site>

asciidoc-maven-site-parser-example/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323
<plugin>
2424
<groupId>org.apache.maven.plugins</groupId>
2525
<artifactId>maven-site-plugin</artifactId>
26-
<version>3.12.1</version>
26+
<version>3.20.0</version>
2727
<configuration>
2828
<!-- Disable generateReports if you don't want to include the built-in reports -->
2929
<generateReports>true</generateReports>
3030
<generateSitemap>true</generateSitemap>
31-
<relativizeDecorationLinks>false</relativizeDecorationLinks>
32-
<locales>en</locales>
3331
<inputEncoding>UTF-8</inputEncoding>
3432
<outputEncoding>UTF-8</outputEncoding>
3533
<!-- Ignore files prefixed with underscore -->

asciidoc-maven-site-parser-example/src/site/site.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<project>
1+
<site xmlns="http://maven.apache.org/SITE/2.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd">
24
<body>
35
<menu ref="reports" inherit="top"/>
46
<menu ref="modules"/>
@@ -10,6 +12,6 @@
1012
<skin>
1113
<groupId>org.apache.maven.skins</groupId>
1214
<artifactId>maven-fluido-skin</artifactId>
13-
<version>1.12.0</version>
15+
<version>2.0.0-M11</version>
1416
</skin>
15-
</project>
17+
</site>

tests/src/test/java/org/asciidoctor/maven/examples/AsciidocMavenSiteConverterTest.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,26 @@ class AsciidocMavenSiteConverterTest {
1515

1616
@Test
1717
void shouldGenerateSitePages() {
18-
File index = mavenProject.getTarget(sitePage("index.html"));
18+
File index = mavenProject.getTarget(sitePage("index.html",""));
19+
// Since maven-site v3.20.0 'About' is added to title
1920
assertThat(index)
2021
.isNotEmpty()
2122
.content()
2223
.contains("<link rel=\"stylesheet\" href=\"./css/site.css\" />")
23-
.contains("<h1>AsciiDoc Maven Site Example</h1>")
24+
.contains("<h1>About AsciiDoc Maven Site Example</h1>")
2425
.contains("<li class=\"nav-header\">Asciidoctor Example</li>")
25-
.contains("<a href=\"hello.html\" title=\"Hello\"><span class=\"none\"></span>Hello</a>")
26-
.contains("<a href=\"article.html\" title=\"Article\"><span class=\"none\"></span>Article</a>");
26+
.contains("<li><a href=\"hello.html\">Hello</a></li>")
27+
.contains("<li><a href=\"article.html\">Article</a></li>");
2728

28-
File hello = mavenProject.getTarget(sitePage("hello.html"));
29+
File hello = mavenProject.getTarget(sitePage("hello.html",""));
2930
assertThat(hello)
3031
.isNotEmpty()
3132
.content()
3233
.contains("<h1>Hello, AsciiDoc!</h1>")
3334
.contains("<img src=\"images/tiger.png\" alt=\"Ghostscript Tiger\"/>")
3435
.contains("<h2 id=\"attributes\">Attributes</h2>");
3536

36-
File article = mavenProject.getTarget(sitePage("article.html"));
37+
File article = mavenProject.getTarget(sitePage("article.html", ""));
3738
assertThat(article)
3839
.isNotEmpty()
3940
.content()
@@ -45,7 +46,7 @@ void shouldGenerateSitePages() {
4546
.contains("<h2 id=\"attributes\"><a class=\"anchor\" href=\"#attributes\"></a>Attributes</h2>");
4647
}
4748

48-
private String sitePage(String filename) {
49-
return "site/" + filename;
49+
private static String sitePage(String filename, String locale) {
50+
return String.format("site/%s/%s", locale, filename);
5051
}
5152
}

tests/src/test/java/org/asciidoctor/maven/examples/AsciidocMavenSiteParserTest.java

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,36 @@ class AsciidocMavenSiteParserTest {
1616
@Test
1717
void shouldGenerateSitePages() {
1818
File index = mavenProject.getTarget(sitePage("index.html"));
19+
// Since maven-site v3.20.0 'About' is added to title
1920
assertThat(index)
2021
.isNotEmpty()
2122
.content()
22-
.contains("<h1>AsciiDoc Maven Site Example</h1>")
23+
.contains("<h1>About AsciiDoc Maven Site Example</h1>")
2324
.contains("<li class=\"nav-header\">Asciidoctor Example</li>")
24-
.contains("<a href=\"hello.html\" title=\"Hello\"><span class=\"none\"></span>Hello</a>")
25-
.contains("<a href=\"article.html\" title=\"Article\"><span class=\"none\"></span>Article</a>");
25+
.contains("<li><a href=\"hello.html\">Hello</a></li>")
26+
.contains("<li><a href=\"article.html\">Article</a></li>");
2627

2728
File hello = mavenProject.getTarget(sitePage("hello.html"));
2829
assertThat(hello)
2930
.isNotEmpty()
3031
.content()
31-
.contains("<h2>Hello, AsciiDoc!</h2>")
32+
.contains("<h1>Hello, AsciiDoc!</h1>")
3233
.contains("<div><img src=\"images/tiger.png\" alt=\"Ghostscript Tiger\" /></div>")
33-
.contains("<h3><a name=\"attributes\"></a>Attributes</h3>");
34+
.contains("<h2><a id=\"attributes\"></a>Attributes</h2>");
3435

3536
File article = mavenProject.getTarget(sitePage("article.html"));
3637
assertThat(article)
3738
.isNotEmpty()
3839
.content()
39-
.contains("<h2>AsciiDoc is Writing Zen</h2>")
40-
.contains("<h4><a name=\"unordered_list\"></a>Unordered list</h4>")
41-
.contains("<h4><a name=\"unordered_list\"></a>Unordered list</h4>")
42-
.contains("<h4><a name=\"table\"></a>Table</h4>")
43-
.contains("<h4><a name=\"code_blocks\"></a>Code blocks</h4>")
44-
.contains("<h3><a name=\"attributes\"></a>Attributes</h3>");
40+
.contains("<h1>AsciiDoc is Writing Zen</h1>")
41+
.contains("<h3><a id=\"unordered_list\"></a>Unordered list</h3>")
42+
.contains("<h3><a id=\"ordered_list\"></a>Ordered list</h3>")
43+
.contains("<h3><a id=\"table\"></a>Table</h3>")
44+
.contains("<h3><a id=\"code_blocks\"></a>Code blocks</h3>")
45+
.contains("<h2><a id=\"attributes\"></a>Attributes</h2>");
4546
}
4647

47-
private String sitePage(String filename) {
48+
private static String sitePage(String filename) {
4849
return "site/" + filename;
4950
}
5051
}

0 commit comments

Comments
 (0)