From 622ae475a55a570db77e6c262bba58f1ad42c9cc Mon Sep 17 00:00:00 2001 From: William Schey Date: Fri, 23 Jun 2023 16:32:50 +1000 Subject: [PATCH 1/7] #287: Fix for NPE that is throw when trying to link internally to project --- .../main/java/org/bsc/confluence/model/SiteProcessor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java b/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java index 42e1070e..5952918c 100644 --- a/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java +++ b/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java @@ -310,6 +310,9 @@ public Optional getPage() { @Override public Optional getPagePrefixToApply() { + if (pagePrefixToApply == null) + return MarkdownParserContext.super.getPagePrefixToApply(); + return Optional.of(pagePrefixToApply); } @@ -317,6 +320,9 @@ public Optional getPagePrefixToApply() { public boolean isLinkPrefixEnabled() { if( child.isIgnoreVariables() ) return false; + if (page == null) + return MarkdownParserContext.super.isLinkPrefixEnabled(); + return Optional.of(page).map( p -> !p.getTitle().contains("[") ).orElse(true); } From 5997ce7ddffd33a2ffa59650f4e93a60c41603ba Mon Sep 17 00:00:00 2001 From: William Schey Date: Fri, 23 Jun 2023 18:06:10 +1000 Subject: [PATCH 2/7] #287: Changed to use Optional.ofNullable to deal with nulls --- .../java/org/bsc/confluence/model/SiteProcessor.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java b/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java index 5952918c..4b2d151e 100644 --- a/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java +++ b/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java @@ -310,20 +310,14 @@ public Optional getPage() { @Override public Optional getPagePrefixToApply() { - if (pagePrefixToApply == null) - return MarkdownParserContext.super.getPagePrefixToApply(); - - return Optional.of(pagePrefixToApply); + return Optional.ofNullable(pagePrefixToApply); } @Override public boolean isLinkPrefixEnabled() { if( child.isIgnoreVariables() ) return false; - if (page == null) - return MarkdownParserContext.super.isLinkPrefixEnabled(); - - return Optional.of(page).map( p -> !p.getTitle().contains("[") ).orElse(true); + return Optional.ofNullable(page).map( p -> !p.getTitle().contains("[") ).orElse(true); } }, content); From 220426a4c952a9f15d3d9f091115a5a5a920a4fa Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Fri, 23 Jun 2023 20:14:03 +0200 Subject: [PATCH 3/7] refactor(SiteProcessor.java): Optional usage refinement use Optional.OfNullable() instead Optional.of() --- .../src/main/java/org/bsc/confluence/model/SiteProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java b/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java index 4b2d151e..dbe1abe2 100644 --- a/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java +++ b/core/src/main/java/org/bsc/confluence/model/SiteProcessor.java @@ -300,12 +300,12 @@ public boolean isSkipHtml() { @Override public Optional getSite() { - return Optional.of(site); + return Optional.ofNullable(site); } @Override public Optional getPage() { - return Optional.of(child); + return Optional.ofNullable(child); } @Override From 96d0999f4057f0d6c162769dd2367d87656710b9 Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Fri, 23 Jun 2023 20:17:05 +0200 Subject: [PATCH 4/7] build: move to next dev version --- addon-scrollversions/pom.xml | 2 +- core/pom.xml | 2 +- gitlog+jira/pom.xml | 2 +- plugin-reporting/pom.xml | 2 +- pom.xml | 2 +- processor-commonmark/pom.xml | 2 +- processor-freemarker/pom.xml | 2 +- service-rest-api/pom.xml | 2 +- service-xmlrpc-api/pom.xml | 2 +- test-plugin/pom.xml | 2 +- test-publishing/pom.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addon-scrollversions/pom.xml b/addon-scrollversions/pom.xml index a58e4e52..175142c5 100644 --- a/addon-scrollversions/pom.xml +++ b/addon-scrollversions/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.11 + 7.12-SNAPSHOT 4.0.0 diff --git a/core/pom.xml b/core/pom.xml index 9b747b90..ccac7d3a 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.11 + 7.12-SNAPSHOT 4.0.0 diff --git a/gitlog+jira/pom.xml b/gitlog+jira/pom.xml index 8668939f..d8824ccd 100644 --- a/gitlog+jira/pom.xml +++ b/gitlog+jira/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.11 + 7.12-SNAPSHOT 4.0.0 diff --git a/plugin-reporting/pom.xml b/plugin-reporting/pom.xml index 4eee8e1c..a3eb232a 100755 --- a/plugin-reporting/pom.xml +++ b/plugin-reporting/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.11 + 7.12-SNAPSHOT diff --git a/pom.xml b/pom.xml index 52fdec9e..46ab9540 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.bsc.maven maven-confluence-parent pom - 7.11 + 7.12-SNAPSHOT CONFLUENCE-REPORTING::Parent Maven's plugin that allow to generate "project's documentation" directly to confluence allowing, in the same time, to keep in-sync both project & documentation diff --git a/processor-commonmark/pom.xml b/processor-commonmark/pom.xml index 6cdde764..a6829831 100644 --- a/processor-commonmark/pom.xml +++ b/processor-commonmark/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.11 + 7.12-SNAPSHOT 4.0.0 diff --git a/processor-freemarker/pom.xml b/processor-freemarker/pom.xml index 9182631b..855ba2f3 100644 --- a/processor-freemarker/pom.xml +++ b/processor-freemarker/pom.xml @@ -5,7 +5,7 @@ org.bsc.maven maven-confluence-parent - 7.11 + 7.12-SNAPSHOT maven-confluence-processor-freemarker CONFLUENCE-REPORTING::Freemaker::Processor diff --git a/service-rest-api/pom.xml b/service-rest-api/pom.xml index b2a5cb31..84ad2972 100644 --- a/service-rest-api/pom.xml +++ b/service-rest-api/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.11 + 7.12-SNAPSHOT 4.0.0 diff --git a/service-xmlrpc-api/pom.xml b/service-xmlrpc-api/pom.xml index b5a937a1..23c34d0a 100644 --- a/service-xmlrpc-api/pom.xml +++ b/service-xmlrpc-api/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.11 + 7.12-SNAPSHOT 4.0.0 diff --git a/test-plugin/pom.xml b/test-plugin/pom.xml index beb45833..6c471c64 100644 --- a/test-plugin/pom.xml +++ b/test-plugin/pom.xml @@ -6,7 +6,7 @@ maven-confluence-parent org.bsc.maven - 7.11 + 7.12-SNAPSHOT diff --git a/test-publishing/pom.xml b/test-publishing/pom.xml index 7e2fb037..ca5b83ff 100644 --- a/test-publishing/pom.xml +++ b/test-publishing/pom.xml @@ -3,7 +3,7 @@ maven-confluence-parent org.bsc.maven - 7.11 + 7.12-SNAPSHOT 4.0.0 From f70f9d5c308c422c5be645724b00b100be7f750b Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Fri, 23 Jun 2023 20:38:02 +0200 Subject: [PATCH 5/7] build: move to next version 7.12 --- addon-scrollversions/pom.xml | 2 +- core/pom.xml | 2 +- gitlog+jira/pom.xml | 2 +- plugin-reporting/pom.xml | 2 +- pom.xml | 2 +- processor-commonmark/pom.xml | 2 +- processor-freemarker/pom.xml | 2 +- service-rest-api/pom.xml | 2 +- service-xmlrpc-api/pom.xml | 2 +- test-plugin/pom.xml | 2 +- test-publishing/pom.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addon-scrollversions/pom.xml b/addon-scrollversions/pom.xml index 175142c5..e8e995cc 100644 --- a/addon-scrollversions/pom.xml +++ b/addon-scrollversions/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.12-SNAPSHOT + 7.12 4.0.0 diff --git a/core/pom.xml b/core/pom.xml index ccac7d3a..deaa29df 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.12-SNAPSHOT + 7.12 4.0.0 diff --git a/gitlog+jira/pom.xml b/gitlog+jira/pom.xml index d8824ccd..877d12d5 100644 --- a/gitlog+jira/pom.xml +++ b/gitlog+jira/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.12-SNAPSHOT + 7.12 4.0.0 diff --git a/plugin-reporting/pom.xml b/plugin-reporting/pom.xml index a3eb232a..1478ee90 100755 --- a/plugin-reporting/pom.xml +++ b/plugin-reporting/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.12-SNAPSHOT + 7.12 diff --git a/pom.xml b/pom.xml index 46ab9540..65037848 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.bsc.maven maven-confluence-parent pom - 7.12-SNAPSHOT + 7.12 CONFLUENCE-REPORTING::Parent Maven's plugin that allow to generate "project's documentation" directly to confluence allowing, in the same time, to keep in-sync both project & documentation diff --git a/processor-commonmark/pom.xml b/processor-commonmark/pom.xml index a6829831..bbfd93a7 100644 --- a/processor-commonmark/pom.xml +++ b/processor-commonmark/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.12-SNAPSHOT + 7.12 4.0.0 diff --git a/processor-freemarker/pom.xml b/processor-freemarker/pom.xml index 855ba2f3..ccc6ed90 100644 --- a/processor-freemarker/pom.xml +++ b/processor-freemarker/pom.xml @@ -5,7 +5,7 @@ org.bsc.maven maven-confluence-parent - 7.12-SNAPSHOT + 7.12 maven-confluence-processor-freemarker CONFLUENCE-REPORTING::Freemaker::Processor diff --git a/service-rest-api/pom.xml b/service-rest-api/pom.xml index 84ad2972..c48d168c 100644 --- a/service-rest-api/pom.xml +++ b/service-rest-api/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.12-SNAPSHOT + 7.12 4.0.0 diff --git a/service-xmlrpc-api/pom.xml b/service-xmlrpc-api/pom.xml index 23c34d0a..6eeee256 100644 --- a/service-xmlrpc-api/pom.xml +++ b/service-xmlrpc-api/pom.xml @@ -5,7 +5,7 @@ maven-confluence-parent org.bsc.maven - 7.12-SNAPSHOT + 7.12 4.0.0 diff --git a/test-plugin/pom.xml b/test-plugin/pom.xml index 6c471c64..a7f36398 100644 --- a/test-plugin/pom.xml +++ b/test-plugin/pom.xml @@ -6,7 +6,7 @@ maven-confluence-parent org.bsc.maven - 7.12-SNAPSHOT + 7.12 diff --git a/test-publishing/pom.xml b/test-publishing/pom.xml index ca5b83ff..d3235356 100644 --- a/test-publishing/pom.xml +++ b/test-publishing/pom.xml @@ -3,7 +3,7 @@ maven-confluence-parent org.bsc.maven - 7.12-SNAPSHOT + 7.12 4.0.0 From a118da790dd92fb39945e4754cacb276083884bc Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Fri, 23 Jun 2023 20:40:04 +0200 Subject: [PATCH 6/7] docs(changeme.md): update --- CHANGELOG.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 731201f2..f9a8b22b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,67 @@ +## Next release +### Generic changes + +**build: move to next version 7.12** + + +[f70f9d5c308c422](https://github.com/bsorrentino/maven-confluence-plugin/commit/f70f9d5c308c422) bsorrentino *2023-06-23 18:38:02* + +**build: move to next dev version** + + +[96d0999f4057f0d](https://github.com/bsorrentino/maven-confluence-plugin/commit/96d0999f4057f0d) bsorrentino *2023-06-23 18:17:05* + +**Merge branch 'feature/pr288' into develop** + + +[c4b960e134429a2](https://github.com/bsorrentino/maven-confluence-plugin/commit/c4b960e134429a2) bsorrentino *2023-06-23 18:15:11* + +**refactor(SiteProcessor.java): Optional usage refinement** + + * use Optional.OfNullable() instead Optional.of() + +[220426a4c952a9f](https://github.com/bsorrentino/maven-confluence-plugin/commit/220426a4c952a9f) bsorrentino *2023-06-23 18:14:03* + +**Merge branch 'williamschey-master' into feature/pr288** + + +[83e977cc998064b](https://github.com/bsorrentino/maven-confluence-plugin/commit/83e977cc998064b) bsorrentino *2023-06-23 18:07:45* + +**#287: Changed to use Optional.ofNullable to deal with nulls** + + +[5997ce7ddffd33a](https://github.com/bsorrentino/maven-confluence-plugin/commit/5997ce7ddffd33a) William Schey *2023-06-23 08:06:10* + +**#287: Fix for NPE that is throw when trying to link internally to project** + + +[622ae475a55a570](https://github.com/bsorrentino/maven-confluence-plugin/commit/622ae475a55a570) William Schey *2023-06-23 06:32:50* + +**Merge branch 'master' into develop** + + +[90b6784c533e68f](https://github.com/bsorrentino/maven-confluence-plugin/commit/90b6784c533e68f) Build Pipeline *2023-03-23 09:05:22* + +**Merge branch 'hotfix/changelog'** + + +[3ba40fc5a0c85de](https://github.com/bsorrentino/maven-confluence-plugin/commit/3ba40fc5a0c85de) Build Pipeline *2023-03-23 09:05:20* + +**docs(CHANGELOG.md): update** + + +[345993d38a96642](https://github.com/bsorrentino/maven-confluence-plugin/commit/345993d38a96642) Build Pipeline *2023-03-23 09:05:00* + +**Merge tag 'v7.11' into develop** + + * new release + +[a3511124ab4627f](https://github.com/bsorrentino/maven-confluence-plugin/commit/a3511124ab4627f) Build Pipeline *2023-03-23 09:02:31* + + ## v7.11 ### Generic changes @@ -111,6 +172,10 @@ [20e7233fad07815](https://github.com/bsorrentino/maven-confluence-plugin/commit/20e7233fad07815) bsorrentino *2023-03-04 11:13:15* + +## v7.10 +### Generic changes + **Merge branch 'release/7.10'** @@ -448,6 +513,10 @@ [b2c477701450e30](https://github.com/bsorrentino/maven-confluence-plugin/commit/b2c477701450e30) Build Pipeline *2022-12-09 12:02:52* + +## v7.7.1 +### Generic changes + **Merge branch 'hotfix/7.7.1'** From c6192c5efe8d032e429aff9f3e1d9c503ea468ad Mon Sep 17 00:00:00 2001 From: bsorrentino Date: Fri, 23 Jun 2023 20:49:26 +0200 Subject: [PATCH 7/7] docs(readme.md): update --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7b96799e..68b5d428 100644 --- a/README.md +++ b/README.md @@ -28,15 +28,16 @@ For practical samples refer to folder/module [test-publishing](https://github.co ## News - Date | Release | Info -------------------|-------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -| **Mar 23, 2023** | [Release 7.11](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.11) | Support of Confluence `Excerpt` macro. Refer to [#285](https://github.com/bsorrentino/maven-confluence-plugin/issues/285) | -| **Mar 4, 2023** | [Release 7.10](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.10) | Allow to skip html tags in markdown processing. Refer to [#284](https://github.com/bsorrentino/maven-confluence-plugin/issues/284) | -| **Jan 4, 2023** | [Release 7.9](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.9) | Fix problem Problem parsing `%` character from markdown to wiki. Refer to [#282](https://github.com/bsorrentino/maven-confluence-plugin/issues/282) | -| **Dec 9, 2022** | [Release 7.8](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.8) | Merged PR [#281](https://github.com/bsorrentino/maven-confluence-plugin/pull/281) that fix [#280](https://github.com/bsorrentino/maven-confluence-plugin/issue/280) "**allows specifying additional HTTP headers in the servers section of settings.xml**". Thanks to [DirkMahler](https://github.com/DirkMahler) for contribution. | -| **Jul 3, 2022** | [Release 7.7](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.7) | Merged PR [#266](https://github.com/bsorrentino/maven-confluence-plugin/pull/266) "**Adding JSON Support**". Thanks to [jksevend](https://github.com/jksevend) for contribution. | -| **Jun 3, 2022** | [Release 7.6](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.6) | Merged PR [#267](https://github.com/bsorrentino/maven-confluence-plugin/pull/267) "**added function to define jira instance baseurl**", that fix issue [#136](https://github.com/bsorrentino/maven-confluence-plugin/issues/136). Thanks to [tspindler](https://github.com/tspindler) for contribution. | -| **Apr 1, 2022** | [Release 7.5](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.5) | Fix empty table cell not handled properly. Refer to [#264](https://github.com/bsorrentino/maven-confluence-plugin/issues/ | -| **Jan 10, 2022** | [Release 7.4](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.4) | Fix problem with **encoding**. Refer to [#261](https://github.com/bsorrentino/maven-confluence-plugin/issues/261). | +| Date | Release | Info | +|------------------|-------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Jun 23, 2023** | [Release 7.12](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.12) | Merged PR [#288](https://github.com/bsorrentino/maven-confluence-plugin/pull/288) that fix [#287](https://github.com/bsorrentino/maven-confluence-plugin/issue/287) "**Maven report generation breaks, if a new page was added with new attachments and references to it**". Thanks to [williamschey](https://github.com/williamschey) for contribution. | +| **Mar 23, 2023** | [Release 7.11](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.11) | Support of Confluence `Excerpt` macro. Refer to [#285](https://github.com/bsorrentino/maven-confluence-plugin/issues/285) | +| **Mar 4, 2023** | [Release 7.10](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.10) | Allow to skip html tags in markdown processing. Refer to [#284](https://github.com/bsorrentino/maven-confluence-plugin/issues/284) | +| **Jan 4, 2023** | [Release 7.9](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.9) | Fix problem Problem parsing `%` character from markdown to wiki. Refer to [#282](https://github.com/bsorrentino/maven-confluence-plugin/issues/282) | +| **Dec 9, 2022** | [Release 7.8](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.8) | Merged PR [#281](https://github.com/bsorrentino/maven-confluence-plugin/pull/281) that fix [#280](https://github.com/bsorrentino/maven-confluence-plugin/issue/280) "**allows specifying additional HTTP headers in the servers section of settings.xml**". Thanks to [DirkMahler](https://github.com/DirkMahler) for contribution. | +| **Jul 3, 2022** | [Release 7.7](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.7) | Merged PR [#266](https://github.com/bsorrentino/maven-confluence-plugin/pull/266) "**Adding JSON Support**". Thanks to [jksevend](https://github.com/jksevend) for contribution. | +| **Jun 3, 2022** | [Release 7.6](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.6) | Merged PR [#267](https://github.com/bsorrentino/maven-confluence-plugin/pull/267) "**added function to define jira instance baseurl**", that fix issue [#136](https://github.com/bsorrentino/maven-confluence-plugin/issues/136). Thanks to [tspindler](https://github.com/tspindler) for contribution. | +| **Apr 1, 2022** | [Release 7.5](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.5) | Fix empty table cell not handled properly. Refer to [#264](https://github.com/bsorrentino/maven-confluence-plugin/issues/ | +| **Jan 10, 2022** | [Release 7.4](https://github.com/bsorrentino/maven-confluence-plugin/releases/tag/v7.4) | Fix problem with **encoding**. Refer to [#261](https://github.com/bsorrentino/maven-confluence-plugin/issues/261). | ### [Release History](HISTORY.md)