A set of Agent Skills for Apache Sling developers and users.
Current skills:
update-sling-parent-pom: Updates the parent POM of a Sling project to the next version.osgi-scr-migrator: Migrates OSGi-based Java projects from deprecated Felix SCR annotations to official OSGi R6/R7 Component annotations, including Java source and Maven POM updates.sling-release: Releases an Apache Sling module end-to-end using Maven and theapache/sling-cliDocker tool (staging, voting, and post-vote finalization).
First of all, install and configure a coding assistant that supports Agent Skills.
/plugin marketplace add apache/sling-agent-skills
/plugin install apache-sling-agent-skills@apache-sling-agent-skills-marketplace
/plugin marketplace add apache/sling-agent-skills
/plugin install apache-sling-agent-skills@apache-sling-agent-skills-marketplace
codex plugin marketplace add apache/sling-agent-skills
codex plugin add apache-sling-agent-skills@apache-sling-agent-skills-marketplace
Using npx skills:
npx skills add apache/sling-agent-skillsAlternatively, clone the repository and copy the skill to a locations supported by your coding assistant.
The osgi-scr-migrator skill requires:
python33.7 or newer- Java 17 or newer
- Maven or Gradle for building and testing the migrated project
The update-sling-parent-pom skill requires running Apache Maven with older JVM versions. Therefore it expects the following commands to exist:
mvn8: Apache Maven running with Java 8mvn11: Apache Maven running with Java 11mvn17: Apache Maven running with Java 17mvn21: Apache Maven running with Java 21
There is no generic solution for creating these scripts. One approach is to create small wrapper scripts and add them to PATH. For example, mvn11 would be:
#!/bin/sh -e
JAVA_HOME=/usr/lib64/jvm/java-11
export JAVA_HOME
mvn "$@"The sling-release skill requires:
- Docker, to run the
apache/sling-cliimage for the Nexus/vote/finalize steps - Apache Maven, to stage and perform the release from the project being released
- A configured ASF committer environment (SSH/SVN access, GPG signing key,
settings.xmlwith the ASF repository server)
Some parent pom updates require changes to the OSGi components descriptors. These can be validated using the osgi-ds-metatype-diff tool. Since there is no release of this tool yet you will need to build it and install it to your local Maven repository. Building using -DskipTests -DskipITs is required for recent Java versions.
This dependency is optional but recommended.