Copilot commented on code in PR #3: URL: https://github.com/apache/sling-adapter-annotations/pull/3#discussion_r3129861692
########## AGENTS.md: ########## @@ -0,0 +1,61 @@ +# Project overview +`adapter-annotations` is a small Apache Sling Java library that defines annotation types used to generate Sling Adapter metadata JSON. The module is a single Maven artifact (`jar`) with source under `src/main/java` and no in-repo runtime service layer; build/test behavior is inherited mostly from the Apache Sling parent POM. + +# Core commands +- Build/compile: `mvn -q clean package` +- Full test suite: `mvn -q test` +- Run a single test class: `mvn -q -Dtest=MyTest test` +- Run a single test method: `mvn -q -Dtest=MyTest#myMethod test` +- Lint/type-check/quality gates (via parent POM): `mvn -q verify` +- Install artifact locally: `mvn -q clean install` +- Release-style full build (clean + tests + checks): `mvn -q clean verify` +- Dev server(s): `echo "No dev server in this repository (library-only module)."` + +# Project layout +```text +. +├── `pom.xml` # Maven module definition (inherits Apache Sling parent) +├── `README.md` # Short module description +├── `CONTRIBUTING.md` # Points to Apache Sling contribution process +├── `Jenkinsfile` # CI entrypoint (`slingOsgiBundleBuild()`) +└── `src/` + └── `main/` + └── `java/` + └── `org/apache/sling/adapter/annotations/` + ├── `Adapter.java` + ├── `Adaptable.java` + └── `Adaptables.java` +``` + +# Development patterns & constraints +- Language/toolchain: Java (`sling.java.version` is `8`) built with Maven (`pom.xml`). +- Module system: plain Java package layout under `org.apache.sling.adapter.annotations`; no JPMS module descriptors. +- Style in existing code: + - Use 4-space indentation. + - Keep package names lowercase; type names use `UpperCamelCase`. + - Keep constants/method names aligned with Java conventions (`UPPER_SNAKE_CASE` for constants, `lowerCamelCase` for members). + - Preserve ASF license header in Java source files. + - Existing Javadocs often use `<code>...</code>` formatting; stay consistent nearby. +- Imports: standard Java imports first; avoid wildcard imports. +- CSS/frontend rules: not applicable in this repository (no web UI assets). +- Prefer minimal API-surface changes; this module is consumed as a shared annotations artifact. + +# Git workflow +- Primary branch is `master` (protected in `.asf.yaml`); do not commit directly to it. +- Create a short-lived feature branch from `master`: `git checkout -b <type>/<short-description>`. +- Commit messages should follow Apache Sling practice: include issue key when available, e.g. `SLING-12345 concise imperative summary`. +- Open a PR targeting `master`; merged PR branches are auto-deleted (`.asf.yaml`). +- Follow Apache Sling contribution guidance in `https://sling.apache.org/contributing.html`. Review Comment: The contribution URL is wrapped in backticks, which renders it as inline code and typically prevents auto-linking in Markdown viewers. Consider using a normal Markdown link (or bare URL) so it’s clickable, consistent with README.md/CONTRIBUTING.md. ```suggestion - Follow Apache Sling contribution guidance in [Apache Sling contribution guidance](https://sling.apache.org/contributing.html). ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
