{"id":26031735,"url":"https://github.com/apache/sling-org-apache-sling-starter","last_synced_at":"2025-04-09T23:17:26.156Z","repository":{"id":28333619,"uuid":"107435578","full_name":"apache/sling-org-apache-sling-starter","owner":"apache","description":"Apache Sling Starter Application","archived":false,"fork":false,"pushed_at":"2025-03-31T16:05:35.000Z","size":1931,"stargazers_count":27,"open_issues_count":13,"forks_count":28,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-04-09T23:17:21.163Z","etag":null,"topics":["java","sling"],"latest_commit_sha":null,"homepage":"https://sling.apache.org/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-18T16:39:29.000Z","updated_at":"2025-03-31T16:05:39.000Z","dependencies_parsed_at":"2023-09-23T03:01:21.780Z","dependency_job_id":"66b4c888-17ca-4dae-91d2-fa369f3b314f","html_url":"https://github.com/apache/sling-org-apache-sling-starter","commit_stats":{"total_commits":1823,"total_committers":52,"mean_commits":35.05769230769231,"dds":0.691716950082282,"last_synced_commit":"b85a9786606baeb278b984c921b3d8294c5f8862"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-org-apache-sling-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-org-apache-sling-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-org-apache-sling-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-org-apache-sling-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/sling-org-apache-sling-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125593,"owners_count":21051771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","sling"],"created_at":"2025-03-06T20:51:36.032Z","updated_at":"2025-04-09T23:17:26.129Z","avatar_url":"https://github.com/apache.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Apache Sling](https://sling.apache.org/res/logos/sling.png)](https://sling.apache.org)\n\n\u0026#32;[![Build Status](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-starter/job/master/badge/icon)](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-starter/job/master/)\u0026#32;[![Test Status](https://img.shields.io/jenkins/tests.svg?jobUrl=https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-starter/job/master/)](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-starter/job/master/test/?width=800\u0026height=600)\u0026#32;[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=apache_sling-org-apache-sling-starter\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-starter)\u0026#32;[![JavaDoc](https://www.javadoc.io/badge/org.apache.sling/org.apache.sling.starter.svg)](https://www.javadoc.io/doc/org.apache.sling/org.apache.sling.starter)\u0026#32;[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.starter/badge.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.starter%22) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n# Apache Sling Starter\n\nThis module is part of the [Apache Sling](https://sling.apache.org) project.\n\nThe starter project produces feature artifacts that can be launched using the\n[Feature Launcher](https://github.com/apache/sling-org-apache-sling-feature-launcher).\n\nIt is **not meant to be a production-ready setup**, more as a way to facilitate experimenting and learning Sling. \n\nSee [Releasing a new version of the Sling starter](https://cwiki.apache.org/confluence/display/SLING/Releasing+a+new+version+of+the+Sling+Starter) for how to create a release of this module.\n\n## How to run the Sling Starter module in Standalone mode\n\n\u003e **Note**\n\u003e This is a note \"mvn clean\" deletes the \"launcher\" work directory in the project base\n\u003e directory. It is advisable to use a work directory outside of the project directory.\n\n1. Build the Sling Starter using\n   ```bash\n   mvn clean install\n   ```\n   in the current directory.\n\n   \u003e **Hint** \n   \u003e You can defer stopping the instance after running the ITs with argument `-Dfeature-launcher.waitForInput=true` to do some manual checks.\n\n2. Start Sling backed by \n   - Oak SegmentStore with\n     ```bash\n     target/dependency/org.apache.sling.feature.launcher/bin/launcher -f target/slingfeature-tmp/feature-oak_tar.json\n     ```\n     If you are using Windows:\n     ```bat\n     target\\dependency\\org.apache.sling.feature.launcher\\bin\\launcher.bat -f target\\slingfeature-tmp\\feature-oak_tar.json\n     ```\n   - Oak MongoDB DocumentStore with\n     ```bash\n     target/dependency/org.apache.sling.feature.launcher/bin/launcher -f target/slingfeature-tmp/feature-oak_mongo.json\n     ```\n     If you are using Windows:\n     ```bat\n     target\\dependency\\org.apache.sling.feature.launcher\\bin\\launcher.bat -f target\\slingfeature-tmp\\feature-oak_mongo.json\n     ```\n     This expects a MongoDB server to be running, search for `mongodb://` in the feature files for the expected URL (currently `mongodb://localhost:27017`).\n\n3. Browse Sling in [localhost:8080](http://localhost:8080)\n\n## How to run the Sling Starter Docker image\n\nThe following tags are supported\n\n| Tag name       | Supported platforms | Links                                                                                                                                                                                     |\n|----------------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `12`, `latest` | `amd64`             | [Dockerfile](https://github.com/apache/sling-org-apache-sling-starter/blob/org.apache.sling.starter-12/Dockerfile), [Release notes](https://sling.apache.org/news/sling-12-released.html) |\n| `11`           | `amd64`             | [Dockerfile](https://github.com/apache/sling-org-apache-sling-starter-docker/blob/11/Dockerfile), [Release notes](https://sling.apache.org/news/sling-11-released.html)                   |\n| `10`           | `amd64`             | [Dockerfile](https://github.com/apache/sling-org-apache-sling-starter-docker/blob/10/Dockerfile), [Release notes](https://sling.apache.org/news/sling-10-released.html)                   |\n| `9`            | `amd64`             | [Dockerfile](https://github.com/apache/sling-org-apache-sling-starter-docker/blob/9/Dockerfile), [Release notes](https://sling.apache.org/news/sling-launchpad-9-released.html)           |\n| `snapshot`     | `amd64`, `arm64`    | [Dockerfile](https://github.com/apache/sling-org-apache-sling-starter/blob/master/Dockerfile)                                                                                             |\n\n1. Start Sling Docker image backed by \n   - Oak SegmentStore with\n     ```bash\n     docker volume create sling-launcher\n     docker run --rm -p 8080:8080 -v sling-launcher:/opt/sling/launcher apache/sling:snapshot\n     ```\n   - Oak MongoDB DocumentStore with\n     ```bash\n     docker volume create sling-launcher\n     docker run --rm -p 27017:27017 mongo:4.4.6\n     docker run --rm -p 8081:8080 -v sling-launcher:/opt/sling/launcher apache/sling:snapshot oak_mongo\n     ```\n\nThe [docker/](docker/) directory contains sample files related to container-based development.\n\n## Testing\n\nThe Sling Starter will execute two suites of tests using the `maven-surefire-plugin`:\n\n1. A small set of smoke tests, embedded in the project, that verify the basic functionality of the Starter\n2. An extensive set of end-to-end tests that verify the overall functionality of the Starter and the bundles that are embedded into it\n\nBy default, these are both executed when building the project against an Oak SegmentNodeStore backend.\n\nAdditionally, when the `ci` profile is enabled the smoke tests are also executed in against an Oak DocumentNodeStore backend. For technical resons, the full end-to-end tests are not executed.\n\n\n## Docker\n\n\u003e The Sling Starter Docker image is only for testing/learning purposes. For your custom applications, \n\u003e please configure your [Feature model](https://github.com/apache/sling-org-apache-sling-feature) and \n\u003e build your image with all dependencies and configurations built in.\n\nOur example Docker image uses `/opt/sling/bin/launch.sh` script as the `entrypoint`. It supports the \nfollowing environment variables:\n\n| Environment variable | Description                            | Example              |\n|----------------------|----------------------------------------|----------------------|\n| `JAVA_DEBUG_PORT`    | Run Sling Starter in Java debug mode   | `5005`               |\n| `EXTRA_JAVA_OPTS`    | Extra java options e.g `Xmx` or `Xms`. | `-Xms256m -Xmx2048m` |\n\n\u003e **Example**\n\u003e running Sling Starter in debug mode with custom memory settings\n\n```bash\ndocker run -p 8080:8080 -p 5005:5005 -e JAVA_DEBUG_PORT=5005 -e EXTRA_JAVA_OPTS='-Xms256m -Xmx2048m' apache/sling:snapshot\n```\n\n## Building the Docker image\n\nThis module can optionally build a Docker image. This is achieved by running a build with the `-Ddocker.skip=false` argument. By default, the image is built as `apache/sling:snapshot`. The tag can be overrriden using the `docker.image.tag` Maven property.\n\n```\n$ mvn clean package -Ddocker.skip=false -Ddocker.image.tag=local\n$ docker run --rm -p 8080:8080 apache/sling:local\n```\n\n## Extending the Sling Starter\n\nIf you wish the extend the Sling Starter but would like to keep various application-level features out, you can\nstart with the `nosample_base` aggregate, which contains:\n\n- all the base features\n- Oak base features, without the NodeStore setup\n- No applications ( Composum, Slingshot, etc )\n\nFor instance, launching an empty Sling Starter with segment persistence can be achieved by running\n\n    target/dependency/org.apache.sling.feature.launcher/bin/launcher -f target/slingfeature-tmp/feature-nosample_base.json,target/slingfeature-tmp/feature-oak_persistence_sns.json\n    \nYour own feature files can be added to the feature list.\n\n\n## Helper scripts\n\nThe `scripts` directory contains helper scripts that will aid with local development by simplifying the use of tools external to the Sling Starter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fsling-org-apache-sling-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fsling-org-apache-sling-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fsling-org-apache-sling-starter/lists"}