You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2026/04/17 21:21:47 UTC
(sling-whiteboard) branch master updated (30e7fcaf -> 8a264112)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
from 30e7fcaf skills: update README
new 4852e4c8 skills: improve support for updating to parent pom 35
new 8a264112 skills: add basic support for updating up to parent pom 52
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
skills/update-sling-parent-pom/SKILL.md | 24 ++++++++++++
.../reference/.deps-scope.md.swp | Bin 0 -> 12288 bytes
.../reference/bundle-parent.md | 43 ++++++++++++++++++++-
.../reference/deps-scope.md | 4 ++
.../reference/mockito-java17.md | 5 +++
.../update-sling-parent-pom/reference/osgi-deps.md | 29 ++++++++++++++
.../update-sling-parent-pom/reference/timestamp.md | 7 ++++
7 files changed, 111 insertions(+), 1 deletion(-)
create mode 100644 skills/update-sling-parent-pom/reference/.deps-scope.md.swp
create mode 100644 skills/update-sling-parent-pom/reference/deps-scope.md
create mode 100644 skills/update-sling-parent-pom/reference/mockito-java17.md
create mode 100644 skills/update-sling-parent-pom/reference/osgi-deps.md
create mode 100644 skills/update-sling-parent-pom/reference/timestamp.md
(sling-whiteboard) 01/02: skills: improve support for updating to parent pom 35
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
commit 4852e4c8bfc865a6098d8666a6f13b045f4289ee
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Apr 17 20:56:31 2026 +0200
skills: improve support for updating to parent pom 35
---
.../reference/bundle-parent.md | 43 +++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/skills/update-sling-parent-pom/reference/bundle-parent.md b/skills/update-sling-parent-pom/reference/bundle-parent.md
index 4a0895fc..7ba84fb7 100644
--- a/skills/update-sling-parent-pom/reference/bundle-parent.md
+++ b/skills/update-sling-parent-pom/reference/bundle-parent.md
@@ -6,5 +6,46 @@ Projects that are not OSGi bundles can continue using the old coordinates.
## pom.xml changes for bundle projects
-Remove the maven-bundle-plugin and use the bnd-maven-plugin instead.
+Remove the `<packaging>bundle</packaging>` tag.
+
+Replace `org.apache.sling:maven-sling-plugin` with `org.apache.sling:sling-maven-plugin`
+
+Remove the `org.apache.felix:maven-bundle-plugin` completely from the pom.xml file. If a the plugin had a `configuration/instructions` tag move it to a bnd configuration file named `bnd.bnd` in the project root. To migrate to the bnd.bnd file, use the following example as a template:
+
+**pom.xml snippet:**
+
+```xml
+<configuration>
+ <instructions>
+ <Import-Package>
+ !org.apache.sling.scripting.core.impl.helper,
+ *
+ </Import-Package>
+ <Provide-Capability>
+ osgi.service;objectClass=java.lang.Runnable,
+ osgi.service;objectClass=javax.servlet.Servlet,
+ osgi.service;objectClass=org.apache.sling.api.adapter.AdapterFactory,
+ osgi.service;objectClass=org.apache.sling.models.factory.ModelFactory
+ </Provide-Capability>
+ </instructions>
+</configuration>
+
+```
+
+***bnd.bnd snippet:***
+Import-Package:\
+ !org.apache.sling.scripting.core.impl.helper,\
+ *
+Provide-Capability:\
+ osgi.service;objectClass=java.lang.Runnable,\
+ osgi.service;objectClass=jakarta.servlet.Servlet,\
+ osgi.service;objectClass=org.apache.sling.api.adapter.AdapterFactory,\
+ osgi.service;objectClass=org.apache.sling.models.factory.ModelFactory
+```
+
+If the build fails with a baselining error then add a pom property named `bnd.baseline.skip` with value `true`. This happens for projects that have not yet been released. Example below:
+
+```
+[ERROR] Failed to execute goal biz.aQute.bnd:bnd-baseline-maven-plugin:4.2.0:baseline (bnd-baseline) on project org.apache.sling.jcr.js.nodetypes: An error occurred while calculating the baseline: Unable to locate a previous version of the artifact -> [Help 1]
+```
(sling-whiteboard) 02/02: skills: add basic support for updating up to parent pom 52
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
commit 8a264112fcfdbba733c6d18ff99788ba27e2d212
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Apr 17 23:21:26 2026 +0200
skills: add basic support for updating up to parent pom 52
---
skills/update-sling-parent-pom/SKILL.md | 24 +++++++++++++++++
.../reference/.deps-scope.md.swp | Bin 0 -> 12288 bytes
.../reference/deps-scope.md | 4 +++
.../reference/mockito-java17.md | 5 ++++
.../update-sling-parent-pom/reference/osgi-deps.md | 29 +++++++++++++++++++++
.../update-sling-parent-pom/reference/timestamp.md | 7 +++++
6 files changed, 69 insertions(+)
diff --git a/skills/update-sling-parent-pom/SKILL.md b/skills/update-sling-parent-pom/SKILL.md
index cd6ea806..ee880b85 100644
--- a/skills/update-sling-parent-pom/SKILL.md
+++ b/skills/update-sling-parent-pom/SKILL.md
@@ -18,6 +18,7 @@ Use when the user asks to upgrade the Sling parent POM version in their project.
- determine the next available version, typically incrementing by 1. For example, if the version is '22' the next version would be '23'
- update the parent pom version
- run a full Maven build with the `clean verify` goals using the Java version required by the new parent pom version.
+ - if the new parent pom version supports multiple Java versions, use the highest supported one. For example, out of 8, 11, and 17, use Java 17.
- apply additional verification steps as needed if the specific version requires it
- if workarounds were present before updating the parent pom version, check if they can be removed. If they are needed add them back
@@ -32,6 +33,10 @@ Different parent pom versions require different Java versions. This is listed in
- Java 17: `mvn17`
- Java 21: `mvn21`
+The following versions are not supported and must be skipped:
+- 42
+- 50
+
| Parent POM Version | Java Version(s) | Additional fixes needed |
|--------------------|-----------------|-------------------------|
| 22 | 8 | None |
@@ -48,6 +53,21 @@ Different parent pom versions require different Java versions. This is listed in
| 33 | 8 | None |
| 34 | 8 | None |
| 35 | 8,11 | bundle-parent |
+| 36 | 8,11 | None |
+| 37 | 8,11 | None |
+| 38 | 8,11 | None |
+| 39 | 8,11 | None |
+| 40 | 8,11 | None |
+| 41 | 8,11 | None |
+| 43 | 8,11 | None |
+| 44 | 8,11 | timestamp |
+| 45 | 8,11 | None |
+| 46 | 8,11,17 | mockito-java17 |
+| 47 | 8,11,17 | None |
+| 48 | 8,11,17 | None |
+| 49 | 8,11,17 | osgi-deps, deps-scope |
+| 51 | 8,11,17 | None |
+| 52 | 8,11,17 | None |
### Additional fixes
@@ -59,6 +79,10 @@ See the following reference files for additional fixes needed to update to a spe
- servlet-3: [servlet-3.md](./reference/servlet-3.md)
- osgi-annotations: [osgi-annotations.md](./reference/osgi-annotations.md)
- bundle-parent: [bundle-parent.md](./reference/bundle-parent.md)
+- timestamp: [timestamp.md](./reference/timestamp.md)
+- mockito-java17: [mockito-java17.md](./reference/mockito-java17.md)
+- osgi-deps: [osgi-deps.md](./reference/osgi-deps.md)
+- deps-scope: [deps-scope.md](./reference/deps-scope.md)
### Workarounds
diff --git a/skills/update-sling-parent-pom/reference/.deps-scope.md.swp b/skills/update-sling-parent-pom/reference/.deps-scope.md.swp
new file mode 100644
index 00000000..773e7847
Binary files /dev/null and b/skills/update-sling-parent-pom/reference/.deps-scope.md.swp differ
diff --git a/skills/update-sling-parent-pom/reference/deps-scope.md b/skills/update-sling-parent-pom/reference/deps-scope.md
new file mode 100644
index 00000000..055934fd
--- /dev/null
+++ b/skills/update-sling-parent-pom/reference/deps-scope.md
@@ -0,0 +1,4 @@
+# Explicitly set dependency scopes
+
+- set scope to `test` for dependencies that are only used in tests
+- otherwise use scope `provided` to prevent transitive dependencies from being included in the classpath
diff --git a/skills/update-sling-parent-pom/reference/mockito-java17.md b/skills/update-sling-parent-pom/reference/mockito-java17.md
new file mode 100644
index 00000000..6791f4fe
--- /dev/null
+++ b/skills/update-sling-parent-pom/reference/mockito-java17.md
@@ -0,0 +1,5 @@
+# Updating Mockito to a version compatible with Java 17
+
+If org.mockito:mockito-core is defined as a dependency ensure the version is at least 4.11.0 .
+
+If org.mockito:mockito-all is defined as a dependency replace it with org.mockito:mockito-core:4.11.0 .
diff --git a/skills/update-sling-parent-pom/reference/osgi-deps.md b/skills/update-sling-parent-pom/reference/osgi-deps.md
new file mode 100644
index 00000000..f771e658
--- /dev/null
+++ b/skills/update-sling-parent-pom/reference/osgi-deps.md
@@ -0,0 +1,29 @@
+# Individual management of OSGi dependencies
+
+Remove dependencies of aggregate OSGi artifacts:
+- org.osgi:osgi.core
+- org.osgi:osgi.cmpn
+
+In case of compilation failures use the following individual dependencies (already managed in the parent pom):
+
+- org.osgi:org.osgi.framework
+- org.osgi:org.osgi.util.tracker
+- org.osgi:org.osgi.dto
+- org.osgi:org.osgi.service.url
+- org.osgi:org.osgi.resource
+- org.osgi:org.osgi.service.cm
+- org.osgi:org.osgi.service.component
+- org.osgi:org.osgi.service.event
+- org.osgi:org.osgi.service.http
+- org.osgi:org.osgi.service.http.whiteboard
+- org.osgi:org.osgi.service.log
+- org.osgi:org.osgi.namespace.contract
+- org.osgi:org.osgi.namespace.extender
+- org.osgi:org.osgi.namespace.implementation
+- org.osgi:org.osgi.namespace.service
+- org.osgi:org.osgi.namespace.unresolvable
+- org.osgi:org.osgi.annotation.versioning
+- org.osgi:org.osgi.annotation.bundle
+- org.osgi:org.osgi.service.component.annotations
+- org.osgi:org.osgi.service.metatype.annotations
+
diff --git a/skills/update-sling-parent-pom/reference/timestamp.md b/skills/update-sling-parent-pom/reference/timestamp.md
new file mode 100644
index 00000000..8e8799af
--- /dev/null
+++ b/skills/update-sling-parent-pom/reference/timestamp.md
@@ -0,0 +1,7 @@
+# Configuring the build timestamp
+
+Update the `pom.xml` file to have a property for the build timestamp:
+
+```xml
+ <project.build.outputTimestamp>1</project.build.outputTimestamp>
+```