From 71b5148d33dff4b9b671c46cbac7f5cb1bd16dcb Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Sun, 19 Jan 2025 00:04:13 +0100 Subject: [PATCH 1/4] add osgi headers via maven-bundle-plugin --- commonmark-ext-autolink/pom.xml | 9 ++++++ commonmark-ext-footnotes/pom.xml | 9 ++++++ commonmark-ext-gfm-strikethrough/pom.xml | 9 ++++++ commonmark-ext-gfm-tables/pom.xml | 9 ++++++ commonmark-ext-heading-anchor/pom.xml | 9 ++++++ commonmark-ext-image-attributes/pom.xml | 9 ++++++ commonmark-ext-ins/pom.xml | 9 ++++++ commonmark-ext-task-list-items/pom.xml | 9 ++++++ commonmark-ext-yaml-front-matter/pom.xml | 9 ++++++ commonmark/pom.xml | 9 ++++++ pom.xml | 36 ++++++++++++++++++++++++ 11 files changed, 126 insertions(+) diff --git a/commonmark-ext-autolink/pom.xml b/commonmark-ext-autolink/pom.xml index 7f6a5cbc..b471e2e8 100644 --- a/commonmark-ext-autolink/pom.xml +++ b/commonmark-ext-autolink/pom.xml @@ -33,4 +33,13 @@ + + + + org.apache.felix + maven-bundle-plugin + + + + diff --git a/commonmark-ext-footnotes/pom.xml b/commonmark-ext-footnotes/pom.xml index d34e4e2f..09b09935 100644 --- a/commonmark-ext-footnotes/pom.xml +++ b/commonmark-ext-footnotes/pom.xml @@ -24,4 +24,13 @@ + + + + org.apache.felix + maven-bundle-plugin + + + + diff --git a/commonmark-ext-gfm-strikethrough/pom.xml b/commonmark-ext-gfm-strikethrough/pom.xml index 1fd1269b..23d93fa9 100644 --- a/commonmark-ext-gfm-strikethrough/pom.xml +++ b/commonmark-ext-gfm-strikethrough/pom.xml @@ -24,4 +24,13 @@ + + + + org.apache.felix + maven-bundle-plugin + + + + diff --git a/commonmark-ext-gfm-tables/pom.xml b/commonmark-ext-gfm-tables/pom.xml index d261a1d2..fc3f7957 100644 --- a/commonmark-ext-gfm-tables/pom.xml +++ b/commonmark-ext-gfm-tables/pom.xml @@ -23,5 +23,14 @@ test + + + + + org.apache.felix + maven-bundle-plugin + + + diff --git a/commonmark-ext-heading-anchor/pom.xml b/commonmark-ext-heading-anchor/pom.xml index e4a62b2b..b63b3647 100644 --- a/commonmark-ext-heading-anchor/pom.xml +++ b/commonmark-ext-heading-anchor/pom.xml @@ -23,5 +23,14 @@ test + + + + + org.apache.felix + maven-bundle-plugin + + + diff --git a/commonmark-ext-image-attributes/pom.xml b/commonmark-ext-image-attributes/pom.xml index 55b0dce2..cbf102b8 100644 --- a/commonmark-ext-image-attributes/pom.xml +++ b/commonmark-ext-image-attributes/pom.xml @@ -24,4 +24,13 @@ + + + + org.apache.felix + maven-bundle-plugin + + + + diff --git a/commonmark-ext-ins/pom.xml b/commonmark-ext-ins/pom.xml index 9dbe2cf0..7af32627 100644 --- a/commonmark-ext-ins/pom.xml +++ b/commonmark-ext-ins/pom.xml @@ -24,4 +24,13 @@ + + + + org.apache.felix + maven-bundle-plugin + + + + diff --git a/commonmark-ext-task-list-items/pom.xml b/commonmark-ext-task-list-items/pom.xml index 3926c8b5..62fd974f 100644 --- a/commonmark-ext-task-list-items/pom.xml +++ b/commonmark-ext-task-list-items/pom.xml @@ -24,4 +24,13 @@ + + + + org.apache.felix + maven-bundle-plugin + + + + diff --git a/commonmark-ext-yaml-front-matter/pom.xml b/commonmark-ext-yaml-front-matter/pom.xml index 9e329e0d..adff7d71 100644 --- a/commonmark-ext-yaml-front-matter/pom.xml +++ b/commonmark-ext-yaml-front-matter/pom.xml @@ -24,4 +24,13 @@ + + + + org.apache.felix + maven-bundle-plugin + + + + diff --git a/commonmark/pom.xml b/commonmark/pom.xml index 17f3bc74..4ffd0ba9 100644 --- a/commonmark/pom.xml +++ b/commonmark/pom.xml @@ -54,6 +54,15 @@ + + + + org.apache.felix + maven-bundle-plugin + + + + BSD-2-Clause diff --git a/pom.xml b/pom.xml index 031869f6..51583df2 100644 --- a/pom.xml +++ b/pom.xml @@ -76,6 +76,42 @@ maven-surefire-plugin 3.2.5 + + org.apache.felix + maven-bundle-plugin + 6.0.0 + + + jar + bundle + + + + org.commonmark.*;-split-package:=merge-first + + + {local-packages} + + + + + + manifest + + manifest + + + true + + + + bundle + + bundle + + + + From e811c5cef0fbac91d25e581d75252f4bf99623aa Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Sun, 19 Jan 2025 10:26:46 +0100 Subject: [PATCH 2/4] downgrade maven-bundle-plugin to 5.1.9 as 6 requires java 17 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 51583df2..eea05181 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ org.apache.felix maven-bundle-plugin - 6.0.0 + 5.1.9 jar From 4e625178708118036b28ebee80d6520ebfe4b5d0 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Sun, 19 Jan 2025 10:34:34 +0100 Subject: [PATCH 3/4] Add Lucee to README used by list --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7660cc50..73e69d9d 100644 --- a/README.md +++ b/README.md @@ -452,6 +452,7 @@ Some users of this library (feel free to raise a PR if you want to be added): * [Znai](https://github.com/testingisdocumenting/znai) * [Open Note](https://github.com/YangDai2003/OpenNote-Compose) a markdown editor and note-taking app for Android * [Quarkus Roq](https://github.com/quarkiverse/quarkus-roq/) The Roq Static Site Generator allows to easily create a static website or blog using Quarkus super-powers. +* [Lucee](https://github.com/lucee/lucee) See also -------- From 5fb452d97a7eb818ffad8f54a9ee3b2ef0577669 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Sat, 7 Jun 2025 17:48:46 +1000 Subject: [PATCH 4/4] Simplify maven-bundle-plugin setup The only downside to defining it in `` in the parent pom is that there's a warning when running the plugin on the parent pom: [INFO] --- bundle:5.1.9:manifest (bundle-manifest) @ commonmark-parent --- [WARNING] Ignoring project type pom - supportedProjectTypes = [jar, bundle] The upside is we don't have to remember to put the plugin into all the poms. The configuration is as recommended here: https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#_adding_osgi_metadata_to_existing_projects_without_changing_the_packaging_type Compared to the previous one, the only differences are: - Import-Package adds imports for java packages, which seems to be recommended, see https://github.com/bndtools/bnd/issues/2507 - Import-Package of own packages that were exported (e.g. org.commonmark in core) don't have the version number, not sure what's recommended there --- commonmark-ext-autolink/pom.xml | 9 ---- commonmark-ext-footnotes/pom.xml | 9 ---- commonmark-ext-gfm-strikethrough/pom.xml | 9 ---- commonmark-ext-gfm-tables/pom.xml | 9 ---- commonmark-ext-heading-anchor/pom.xml | 9 ---- commonmark-ext-image-attributes/pom.xml | 9 ---- commonmark-ext-ins/pom.xml | 9 ---- commonmark-ext-task-list-items/pom.xml | 9 ---- commonmark-ext-yaml-front-matter/pom.xml | 9 ---- commonmark/pom.xml | 9 ---- pom.xml | 56 +++++++++--------------- 11 files changed, 20 insertions(+), 126 deletions(-) diff --git a/commonmark-ext-autolink/pom.xml b/commonmark-ext-autolink/pom.xml index b471e2e8..7f6a5cbc 100644 --- a/commonmark-ext-autolink/pom.xml +++ b/commonmark-ext-autolink/pom.xml @@ -33,13 +33,4 @@ - - - - org.apache.felix - maven-bundle-plugin - - - - diff --git a/commonmark-ext-footnotes/pom.xml b/commonmark-ext-footnotes/pom.xml index 09b09935..d34e4e2f 100644 --- a/commonmark-ext-footnotes/pom.xml +++ b/commonmark-ext-footnotes/pom.xml @@ -24,13 +24,4 @@ - - - - org.apache.felix - maven-bundle-plugin - - - - diff --git a/commonmark-ext-gfm-strikethrough/pom.xml b/commonmark-ext-gfm-strikethrough/pom.xml index 23d93fa9..1fd1269b 100644 --- a/commonmark-ext-gfm-strikethrough/pom.xml +++ b/commonmark-ext-gfm-strikethrough/pom.xml @@ -24,13 +24,4 @@ - - - - org.apache.felix - maven-bundle-plugin - - - - diff --git a/commonmark-ext-gfm-tables/pom.xml b/commonmark-ext-gfm-tables/pom.xml index fc3f7957..d261a1d2 100644 --- a/commonmark-ext-gfm-tables/pom.xml +++ b/commonmark-ext-gfm-tables/pom.xml @@ -23,14 +23,5 @@ test - - - - - org.apache.felix - maven-bundle-plugin - - - diff --git a/commonmark-ext-heading-anchor/pom.xml b/commonmark-ext-heading-anchor/pom.xml index b63b3647..e4a62b2b 100644 --- a/commonmark-ext-heading-anchor/pom.xml +++ b/commonmark-ext-heading-anchor/pom.xml @@ -23,14 +23,5 @@ test - - - - - org.apache.felix - maven-bundle-plugin - - - diff --git a/commonmark-ext-image-attributes/pom.xml b/commonmark-ext-image-attributes/pom.xml index cbf102b8..55b0dce2 100644 --- a/commonmark-ext-image-attributes/pom.xml +++ b/commonmark-ext-image-attributes/pom.xml @@ -24,13 +24,4 @@ - - - - org.apache.felix - maven-bundle-plugin - - - - diff --git a/commonmark-ext-ins/pom.xml b/commonmark-ext-ins/pom.xml index 7af32627..9dbe2cf0 100644 --- a/commonmark-ext-ins/pom.xml +++ b/commonmark-ext-ins/pom.xml @@ -24,13 +24,4 @@ - - - - org.apache.felix - maven-bundle-plugin - - - - diff --git a/commonmark-ext-task-list-items/pom.xml b/commonmark-ext-task-list-items/pom.xml index 62fd974f..3926c8b5 100644 --- a/commonmark-ext-task-list-items/pom.xml +++ b/commonmark-ext-task-list-items/pom.xml @@ -24,13 +24,4 @@ - - - - org.apache.felix - maven-bundle-plugin - - - - diff --git a/commonmark-ext-yaml-front-matter/pom.xml b/commonmark-ext-yaml-front-matter/pom.xml index adff7d71..9e329e0d 100644 --- a/commonmark-ext-yaml-front-matter/pom.xml +++ b/commonmark-ext-yaml-front-matter/pom.xml @@ -24,13 +24,4 @@ - - - - org.apache.felix - maven-bundle-plugin - - - - diff --git a/commonmark/pom.xml b/commonmark/pom.xml index 4ffd0ba9..17f3bc74 100644 --- a/commonmark/pom.xml +++ b/commonmark/pom.xml @@ -54,15 +54,6 @@ - - - - org.apache.felix - maven-bundle-plugin - - - - BSD-2-Clause diff --git a/pom.xml b/pom.xml index eea05181..29ca4ead 100644 --- a/pom.xml +++ b/pom.xml @@ -48,6 +48,11 @@ org.apache.maven.plugins maven-jar-plugin 3.4.1 + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + org.apache.maven.plugins @@ -76,42 +81,6 @@ maven-surefire-plugin 3.2.5 - - org.apache.felix - maven-bundle-plugin - 5.1.9 - - - jar - bundle - - - - org.commonmark.*;-split-package:=merge-first - - - {local-packages} - - - - - - manifest - - manifest - - - true - - - - bundle - - bundle - - - - @@ -139,6 +108,21 @@ deploy + + org.apache.felix + maven-bundle-plugin + + 5.1.9 + + + bundle-manifest + process-classes + + manifest + + + +