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 the apache/sling-cli Docker 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-skills
Alternatively, clone the repository and copy the skill to a locations supported by your coding assistant.
The osgi-scr-migrator skill requires:
python3 3.7 or newerThe 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 21There 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:
apache/sling-cli image for the Nexus/vote/finalize stepssettings.xml with 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.