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 <[email protected]> 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> +```
