From e5c3441aa0b5a98752b2bb9186dcc153f9940c10 Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Sun, 12 Feb 2023 14:22:47 +0100 Subject: [PATCH 01/12] Updated report config --- pom.xml | 28 ++++++++++------------ src/config/checkstyle/checkstyle-rules.xml | 4 ++-- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 0e23caa..2612242 100644 --- a/pom.xml +++ b/pom.xml @@ -191,6 +191,11 @@ 5.9.2 3.1 + + + + ${project.basedir}/src/config/checkstyle/checkstyle-rules.xml + 2.3.1 @@ -325,33 +330,22 @@ - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - - ${project.basedir}/src/config/checkstyle/checkstyle-rules.xml - - - + org.apache.maven.plugins maven-javadoc-plugin - https://velocity.apache.org/tools/devel/apidocs/ - https://jsoup.org/apidocs/ + http://www.antlr.org/api/Java/ + + *.generated.* - org.apache.maven.plugins maven-pmd-plugin @@ -359,6 +353,10 @@ ${project.basedir}/src/config/pmd/pmd-rules.xml + + + **/generated/**/* + diff --git a/src/config/checkstyle/checkstyle-rules.xml b/src/config/checkstyle/checkstyle-rules.xml index 55aced4..1010818 100644 --- a/src/config/checkstyle/checkstyle-rules.xml +++ b/src/config/checkstyle/checkstyle-rules.xml @@ -1,7 +1,7 @@ + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> From c7d9431ddb84059d90723863ecb8ff032f70ea76 Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Sun, 12 Feb 2023 14:24:03 +0100 Subject: [PATCH 02/12] Snapshot --- pom.xml | 2 +- src/changes/changes.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2612242..1e22074 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ com.bernardomg.velocity maven-site-fixer - 1.3.1 + 1.4.0-SNAPSHOT jar Maven Site Fixer diff --git a/src/changes/changes.xml b/src/changes/changes.xml index fd8acbd..ed80bd5 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -121,5 +121,7 @@ Updated JDK compatibility level. + + \ No newline at end of file From ee1b333e6f3e0ba6edef71ab3c0511f57a2dd120 Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Sun, 12 Feb 2023 14:57:55 +0100 Subject: [PATCH 03/12] Updated license years --- LICENSE | 2 +- src/main/java/com/bernardomg/velocity/tool/Html5UpdateTool.java | 2 +- src/main/java/com/bernardomg/velocity/tool/HtmlTool.java | 2 +- src/main/java/com/bernardomg/velocity/tool/SiteTool.java | 2 +- src/main/java/com/bernardomg/velocity/tool/package-info.java | 2 +- .../velocity/tool/test/unit/html/TestHtmlToolAddClass.java | 2 +- .../tool/test/unit/html/TestHtmlToolRemoveAttribute.java | 2 +- .../velocity/tool/test/unit/html/TestHtmlToolRemoveClass.java | 2 +- .../velocity/tool/test/unit/html/TestHtmlToolRetag.java | 2 +- .../tool/test/unit/html/TestHtmlToolSwapTagWithParent.java | 2 +- .../velocity/tool/test/unit/html/TestHtmlToolUnwrap.java | 2 +- .../velocity/tool/test/unit/html/TestHtmlToolWrap.java | 2 +- .../TestHtml5UpdateToolRemovePointsFromAttrLinks.java | 2 +- .../unit/html5update/TestHtml5UpdateToolUpdateTableHeads.java | 2 +- .../tool/test/unit/site/TestSiteToolFixAnchorLinks.java | 2 +- .../velocity/tool/test/unit/site/TestSiteToolFixHeadingIds.java | 2 +- .../velocity/tool/test/unit/site/TestSiteToolFixReport.java | 2 +- .../tool/test/unit/site/TestSiteToolFixReportEmpty.java | 2 +- .../tool/test/unit/site/TestSiteToolTransformIcons.java | 2 +- .../test/unit/site/TestSiteToolTransformImagesToFigures.java | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/LICENSE b/LICENSE index 77952a5..a8c26ab 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2021 Bernardo Martínez Garrido +Copyright (c) 2015-2023 Bernardo Martínez Garrido Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/bernardomg/velocity/tool/Html5UpdateTool.java b/src/main/java/com/bernardomg/velocity/tool/Html5UpdateTool.java index 7d02c2f..8d0db65 100644 --- a/src/main/java/com/bernardomg/velocity/tool/Html5UpdateTool.java +++ b/src/main/java/com/bernardomg/velocity/tool/Html5UpdateTool.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/bernardomg/velocity/tool/HtmlTool.java b/src/main/java/com/bernardomg/velocity/tool/HtmlTool.java index 8c20f86..7f15549 100644 --- a/src/main/java/com/bernardomg/velocity/tool/HtmlTool.java +++ b/src/main/java/com/bernardomg/velocity/tool/HtmlTool.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/bernardomg/velocity/tool/SiteTool.java b/src/main/java/com/bernardomg/velocity/tool/SiteTool.java index 25a4b4d..3f8ccd4 100644 --- a/src/main/java/com/bernardomg/velocity/tool/SiteTool.java +++ b/src/main/java/com/bernardomg/velocity/tool/SiteTool.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/bernardomg/velocity/tool/package-info.java b/src/main/java/com/bernardomg/velocity/tool/package-info.java index d515dd0..419206a 100644 --- a/src/main/java/com/bernardomg/velocity/tool/package-info.java +++ b/src/main/java/com/bernardomg/velocity/tool/package-info.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolAddClass.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolAddClass.java index 73401af..5aee556 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolAddClass.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolAddClass.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRemoveAttribute.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRemoveAttribute.java index 85fc8f6..e6ddceb 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRemoveAttribute.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRemoveAttribute.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRemoveClass.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRemoveClass.java index 30aa525..1e564ca 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRemoveClass.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRemoveClass.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRetag.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRetag.java index a524dab..e8d37e3 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRetag.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolRetag.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolSwapTagWithParent.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolSwapTagWithParent.java index 5519b9c..7e4181a 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolSwapTagWithParent.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolSwapTagWithParent.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolUnwrap.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolUnwrap.java index 316c86b..cf9ddcf 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolUnwrap.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolUnwrap.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolWrap.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolWrap.java index f6c2da6..33326d0 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolWrap.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolWrap.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html5update/TestHtml5UpdateToolRemovePointsFromAttrLinks.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html5update/TestHtml5UpdateToolRemovePointsFromAttrLinks.java index f52eb52..978f9bb 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html5update/TestHtml5UpdateToolRemovePointsFromAttrLinks.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html5update/TestHtml5UpdateToolRemovePointsFromAttrLinks.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html5update/TestHtml5UpdateToolUpdateTableHeads.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html5update/TestHtml5UpdateToolUpdateTableHeads.java index 7f32b93..2d16438 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html5update/TestHtml5UpdateToolUpdateTableHeads.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html5update/TestHtml5UpdateToolUpdateTableHeads.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixAnchorLinks.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixAnchorLinks.java index c4e470e..1915031 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixAnchorLinks.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixAnchorLinks.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixHeadingIds.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixHeadingIds.java index dbf5bb6..36b0241 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixHeadingIds.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixHeadingIds.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixReport.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixReport.java index 74f523d..5bab848 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixReport.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixReport.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixReportEmpty.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixReportEmpty.java index bbf4909..cec8e84 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixReportEmpty.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolFixReportEmpty.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformIcons.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformIcons.java index ffaa6cc..68cd639 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformIcons.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformIcons.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java index eb07abc..ecde112 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java @@ -1,7 +1,7 @@ /** * The MIT License (MIT) *

- * Copyright (c) 2015-2021 the original author or authors. + * Copyright (c) 2015-2023 the original author or authors. *

* Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal From 7fa24c766548f20ebd63473566f125094385fff2 Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Sun, 12 Feb 2023 15:02:12 +0100 Subject: [PATCH 04/12] Updated CI files --- .github/workflows/deployment.yml | 4 ++-- .github/workflows/doc_deployment.yml | 30 ++++++++++++++++++++++++ .github/workflows/test.yml | 34 ++++++++-------------------- 3 files changed, 41 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/doc_deployment.yml diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 20237c5..3b48e4e 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -7,13 +7,13 @@ on: jobs: github: name: Github - uses: Bernardo-MG/github-workflow/.github/workflows/maven_deploy_github.yml@v1 + uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_github.yml@v1 secrets: token: ${{ secrets.GITHUB_TOKEN }} ossrh: name: OSSRH - uses: Bernardo-MG/github-workflow/.github/workflows/maven_deploy_signed.yml@v1 + uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_signed.yml@v1 secrets: username: ${{ secrets.OSSRH_USERNAME }} password: ${{ secrets.OSSRH_TOKEN }} diff --git a/.github/workflows/doc_deployment.yml b/.github/workflows/doc_deployment.yml new file mode 100644 index 0000000..e11d382 --- /dev/null +++ b/.github/workflows/doc_deployment.yml @@ -0,0 +1,30 @@ +name: Doc deployment + +on: + push: + branches: + - master + - develop + +jobs: + deploy_develop_docs: + name: Deploy docs for develop + uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_site.yml@v1 + with: + branch: develop + host: docs.bernardomg.com + secrets: + url: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }} + username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }} + password: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} + + deploy_master_docs: + name: Deploy docs for master + uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_site.yml@v1 + with: + branch: master + host: docs.bernardomg.com + secrets: + url: ${{ secrets.DEPLOY_DOCS_SITE }} + username: ${{ secrets.DEPLOY_DOCS_USER }} + password: ${{ secrets.DEPLOY_DOCS_PASSWORD }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fb90e8..3987f7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,32 +1,16 @@ -name: Tests and docs +name: Tests on: [push, pull_request] jobs: - tests: - name: Tests - uses: Bernardo-MG/github-workflow/.github/workflows/maven_testing.yml@v1 - - deploy_develop_docs: - name: Deploy development docs - needs: tests - uses: Bernardo-MG/github-workflow/.github/workflows/maven_deploy_site.yml@v1 + tests_11: + name: Tests with JDK 11 + uses: Bernardo-MG/github-workflow-maven/.github/workflows/testing.yml@v1 with: - branch: develop - host: docs.bernardomg.com - secrets: - url: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }} - username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }} - password: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} + jdk: 11 - deploy_docs: - name: Deploy docs - needs: tests - uses: Bernardo-MG/github-workflow/.github/workflows/maven_deploy_site.yml@v1 + tests_17: + name: Tests with JDK 17 + uses: Bernardo-MG/github-workflow-maven/.github/workflows/testing.yml@v1 with: - branch: master - host: docs.bernardomg.com - secrets: - url: ${{ secrets.DEPLOY_DOCS_SITE }} - username: ${{ secrets.DEPLOY_DOCS_USER }} - password: ${{ secrets.DEPLOY_DOCS_PASSWORD }} \ No newline at end of file + jdk: 17 From c9d7cd6388f549cad5340cb3747551042e632356 Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Sun, 19 Feb 2023 14:36:22 +0100 Subject: [PATCH 05/12] Added test --- .../TestSiteToolTransformImagesToFigures.java | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java index ecde112..b944d6b 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java @@ -53,9 +53,26 @@ public TestSiteToolTransformImagesToFigures() { super(); } + @Test + @DisplayName("Generates no caption when there is no alt attribute") + public final void testCaption_NoAlt_NoFigCaption() { + final String html; // HTML code to edit + final String htmlExpected; // Expected result + final Element element; // Parsed HTML + + html = "

"; + htmlExpected = "
\n \n
"; + + element = Jsoup.parse(html) + .body(); + util.transformImagesToFigures(element); + + Assertions.assertEquals(htmlExpected, element.html()); + } + @Test @DisplayName("Generates a caption from the alt attribute") - public final void testCaption_Transforms() { + public final void testCaption_WithAlt_FigCaption() { final String html; // HTML code to edit final String htmlExpected; // Expected result final Element element; // Parsed HTML @@ -70,9 +87,6 @@ public final void testCaption_Transforms() { Assertions.assertEquals(htmlExpected, element.html()); } - /** - * Tests that an empty string causes no problem. - */ @Test @DisplayName("Transforming an emtpy string does nothing") public final void testEmptyString() { From cb342e2792c9ec8a21cb7304f116c515f035d921 Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Sun, 19 Feb 2023 14:44:31 +0100 Subject: [PATCH 06/12] Set display names to tests --- .../tool/test/unit/html/TestHtmlToolUnwrap.java | 16 ++++------------ .../TestSiteToolTransformImagesToFigures.java | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolUnwrap.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolUnwrap.java index cf9ddcf..353fa5c 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolUnwrap.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/html/TestHtmlToolUnwrap.java @@ -53,10 +53,8 @@ public TestHtmlToolUnwrap() { super(); } - /** - * Tests that unwrapping an empty element removes it. - */ @Test + @DisplayName("Unwrapping an empty element removes it") public final void testEmpty_Removed() { final String html; // HTML code to edit final String htmlExpected; // Expected result @@ -74,10 +72,8 @@ public final void testEmpty_Removed() { Assertions.assertEquals(htmlExpected, element.html()); } - /** - * Tests that unwrapping a not existing element does nothing. - */ @Test + @DisplayName("Unwrapping a not existing element does nothing") public final void testNotExisting_Nothing() { final String html; // HTML code to edit final String htmlExpected; // Expected result @@ -95,10 +91,8 @@ public final void testNotExisting_Nothing() { Assertions.assertEquals(htmlExpected, element.html()); } - /** - * Tests that an empty string causes no problem to the {@code unwrap} method. - */ @Test + @DisplayName("an empty string causes no problem when unwrapping") public final void testUnwrap_EmptyString() { final String html; // HTML code to edit final String htmlExpected; // Expected result @@ -115,10 +109,8 @@ public final void testUnwrap_EmptyString() { Assertions.assertEquals(htmlExpected, element.html()); } - /** - * Tests that unwrapping an element with text keeps this text. - */ @Test + @DisplayName("Unwrapping an element with text keeps this text") public final void testWithText_TextKept() { final String html; // HTML code to edit final String htmlExpected; // Expected result diff --git a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java index b944d6b..dd53034 100644 --- a/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java +++ b/src/test/java/com/bernardomg/velocity/tool/test/unit/site/TestSiteToolTransformImagesToFigures.java @@ -70,6 +70,23 @@ public final void testCaption_NoAlt_NoFigCaption() { Assertions.assertEquals(htmlExpected, element.html()); } + @Test + @DisplayName("Generates no caption when the alt attribute is empty") + public final void testCaption_EmptyAlt_NoFigCaption() { + final String html; // HTML code to edit + final String htmlExpected; // Expected result + final Element element; // Parsed HTML + + html = "

"; + htmlExpected = "
\n \n
"; + + element = Jsoup.parse(html) + .body(); + util.transformImagesToFigures(element); + + Assertions.assertEquals(htmlExpected, element.html()); + } + @Test @DisplayName("Generates a caption from the alt attribute") public final void testCaption_WithAlt_FigCaption() { From 1fd261d57ec76c08d8a75509564171205a37ad12 Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Tue, 28 Mar 2023 10:53:37 +0200 Subject: [PATCH 07/12] Updated Maven skin --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1e22074..56d831a 100644 --- a/pom.xml +++ b/pom.xml @@ -198,7 +198,7 @@ - 2.3.1 + 2.3.2 http://mvnrepository.com/artifact/com.bernardomg.velocity/maven-site-fixer From 7429bc5612673c7f2b3f689ca8e0d83d69b0453b Mon Sep 17 00:00:00 2001 From: Bernardo Date: Wed, 9 Aug 2023 15:02:56 +0200 Subject: [PATCH 08/12] Updated POM --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 56d831a..bd8712d 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.bernardomg.maven base-pom - 1.5.3 + 1.5.4 From b16e3fda1ff3822014caa0a6e74e1c8185dc757c Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Mon, 9 Sep 2024 16:01:39 +0200 Subject: [PATCH 09/12] Updated github workflows --- .github/workflows/deployment.yml | 42 +++++++++++++++++++++++--------- .github/workflows/test.yml | 30 +++++++++++++++-------- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 3b48e4e..d5fd6bf 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -6,16 +6,36 @@ on: jobs: github: - name: Github - uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_github.yml@v1 - secrets: - token: ${{ secrets.GITHUB_TOKEN }} + name: Github deployment + runs-on: ubuntu-latest + concurrency: + group: deploy-github-${{ github.ref }} + cancel-in-progress: true + permissions: + contents: read + packages: write + + steps: + - name: Deploy to Github + uses: bernardo-mg/maven-github-deployment-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + jdk: 17 ossrh: - name: OSSRH - uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_signed.yml@v1 - secrets: - username: ${{ secrets.OSSRH_USERNAME }} - password: ${{ secrets.OSSRH_TOKEN }} - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} \ No newline at end of file + name: OSSRH deployment + runs-on: ubuntu-latest + environment: deployment_ossrh + concurrency: + group: deploy-ossrh-${{ github.ref }} + cancel-in-progress: true + + steps: + - name: Deploy + uses: bernardo-mg/maven-signed-deployment-action@v1 + with: + username: ${{ secrets.OSSRH_USERNAME }} + password: ${{ secrets.OSSRH_TOKEN }} + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} + jdk: 17 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3987f7d..67d2170 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,14 +3,24 @@ name: Tests on: [push, pull_request] jobs: - tests_11: - name: Tests with JDK 11 - uses: Bernardo-MG/github-workflow-maven/.github/workflows/testing.yml@v1 - with: - jdk: 11 + tests: + name: Tests with JDK ${{ matrix.jdk }} + runs-on: ubuntu-latest - tests_17: - name: Tests with JDK 17 - uses: Bernardo-MG/github-workflow-maven/.github/workflows/testing.yml@v1 - with: - jdk: 17 + strategy: + matrix: + jdk: [17, 21] + + steps: + - name: Check-out + uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Set up JDK ${{ matrix.jdk }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.jdk }} + distribution: 'temurin' + cache: 'maven' + - name: Run up to integration tests + run: mvn verify -fae From b00eead777f9af75c9c7c4b4ceda7156bc15062c Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Mon, 9 Sep 2024 16:04:05 +0200 Subject: [PATCH 10/12] Removed doc deployment --- .github/workflows/doc_deployment.yml | 30 ---------------------------- readme.md | 30 ---------------------------- 2 files changed, 60 deletions(-) delete mode 100644 .github/workflows/doc_deployment.yml diff --git a/.github/workflows/doc_deployment.yml b/.github/workflows/doc_deployment.yml deleted file mode 100644 index e11d382..0000000 --- a/.github/workflows/doc_deployment.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Doc deployment - -on: - push: - branches: - - master - - develop - -jobs: - deploy_develop_docs: - name: Deploy docs for develop - uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_site.yml@v1 - with: - branch: develop - host: docs.bernardomg.com - secrets: - url: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }} - username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }} - password: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} - - deploy_master_docs: - name: Deploy docs for master - uses: Bernardo-MG/github-workflow-maven/.github/workflows/deploy_site.yml@v1 - with: - branch: master - host: docs.bernardomg.com - secrets: - url: ${{ secrets.DEPLOY_DOCS_SITE }} - username: ${{ secrets.DEPLOY_DOCS_USER }} - password: ${{ secrets.DEPLOY_DOCS_PASSWORD }} diff --git a/readme.md b/readme.md index 394f824..3f678dc 100644 --- a/readme.md +++ b/readme.md @@ -44,12 +44,6 @@ The tools included in this project will transform that example into this: [![Maven Central](https://img.shields.io/maven-central/v/com.bernardomg.velocity/maven-site-fixer.svg)][maven-repo] -[![Release docs](https://img.shields.io/badge/docs-release-blue.svg)][site-release] -[![Development docs](https://img.shields.io/badge/docs-develop-blue.svg)][site-develop] - -[![Release javadocs](https://img.shields.io/badge/javadocs-release-blue.svg)][javadoc-release] -[![Development javadocs](https://img.shields.io/badge/javadocs-develop-blue.svg)][javadoc-develop] - ## Features The project is composed by a small set of tools which allow editing the content of a Maven site page @@ -63,26 +57,6 @@ The project is composed by a small set of tools which allow editing the content The tools were developed to be used by the [Docs Maven Skin][docs-skin]. -## Documentation - -Documentation is always generated for the latest release, kept in the 'master' branch: - -- The [latest release documentation page][site-release]. -- The [the latest release Javadoc site][javadoc-release]. - -Documentation is also generated from the latest snapshot, taken from the 'develop' branch: - -- The [the latest snapshot documentation page][site-develop]. -- The [the latest snapshot Javadoc site][javadoc-develop]. - -The documentation site sources come along the source code (as it is a Maven site), so it is always possible to generate them using the following Maven command: - -``` -$ mvn verify site -``` - -The verify phase is required, as otherwise some of the reports won't be created. - ## Acknowledgement The code comes from adapting the tools at the [Reflow Maven Skin][reflow-skin]. They were made their own project, instead of being part of a multi-module Maven project, and then heavily modified. @@ -144,9 +118,5 @@ The project has been released under the [MIT License][license]. [maven-repo]: http://mvnrepository.com/artifact/com.bernardomg.velocity/maven-site-fixer [issues]: https://github.com/bernardo-mg/maven-site-fixer/issues -[javadoc-develop]: https://docs.bernardomg.com/development/maven/maven-site-fixer/apidocs -[javadoc-release]: https://docs.bernardomg.com/maven/maven-site-fixer/apidocs [license]: http://www.opensource.org/licenses/mit-license.php [scm]: https://github.com/bernardo-mg/maven-site-fixer -[site-develop]: https://docs.bernardomg.com/development/maven/maven-site-fixer -[site-release]: https://docs.bernardomg.com/maven/maven-site-fixer From 9bb2f7f24b12f09e4273514a49548015794a0300 Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Mon, 9 Sep 2024 16:05:26 +0200 Subject: [PATCH 11/12] Updated dependencies --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index bd8712d..dbba56d 100644 --- a/pom.xml +++ b/pom.xml @@ -185,10 +185,10 @@ 1.9.4 - 3.11 - 1.2 - 1.15.3 - 5.9.2 + 3.17.0 + 1.3.4 + 1.18.1 + 5.11.0 3.1 From c2a6f195268afb584e99e26c04cbeebfac2efa95 Mon Sep 17 00:00:00 2001 From: Bernardo-MG Date: Mon, 9 Sep 2024 20:26:08 +0200 Subject: [PATCH 12/12] Release --- pom.xml | 2 +- src/changes/changes.xml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index dbba56d..e8b6eea 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ com.bernardomg.velocity maven-site-fixer - 1.4.0-SNAPSHOT + 1.3.2 jar Maven Site Fixer diff --git a/src/changes/changes.xml b/src/changes/changes.xml index ed80bd5..13e16e8 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -121,7 +121,10 @@ Updated JDK compatibility level. - + + + Updated dependencies. + \ No newline at end of file