{"id":14987967,"url":"https://github.com/apache/sling-project-archetype","last_synced_at":"2025-10-19T12:30:21.501Z","repository":{"id":43656618,"uuid":"182231010","full_name":"apache/sling-project-archetype","owner":"apache","description":"Apache Sling Project Archetype","archived":false,"fork":false,"pushed_at":"2024-12-21T11:52:46.000Z","size":110,"stargazers_count":6,"open_issues_count":1,"forks_count":5,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-01-29T19:49:48.704Z","etag":null,"topics":["java","sling"],"latest_commit_sha":null,"homepage":"https://sling.apache.org/","language":"Java","has_issues":false,"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":"2019-04-19T08:30:44.000Z","updated_at":"2024-12-21T11:52:49.000Z","dependencies_parsed_at":"2024-09-19T22:00:36.534Z","dependency_job_id":"6a34e976-f540-4154-87c0-47cdecd61fe9","html_url":"https://github.com/apache/sling-project-archetype","commit_stats":{"total_commits":58,"total_committers":13,"mean_commits":4.461538461538462,"dds":0.5,"last_synced_commit":"fa95aebdedb86ab10debb1e82ab74d57b7c3081f"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-project-archetype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-project-archetype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-project-archetype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fsling-project-archetype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/sling-project-archetype/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237125504,"owners_count":19259296,"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":"2024-09-24T14:15:50.894Z","updated_at":"2025-10-19T12:30:15.871Z","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-project-archetype/job/master/badge/icon)](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-project-archetype/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-project-archetype/job/master/)](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-project-archetype/job/master/test/?width=800\u0026height=600)\u0026#32;[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=apache_sling-project-archetype\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=apache_sling-project-archetype)\u0026#32;[![JavaDoc](https://www.javadoc.io/badge/org.apache.sling/sling-project-archetype.svg)](https://www.javadoc.io/doc/org.apache.sling/sling-project-archetype)\u0026#32;[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/sling-project-archetype/badge.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22sling-project-archetype%22) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n### Sling Project Template through Maven Archetype\n\n#### Releases\n\n| Version | Description |\n|:--------|:------------|\n|1.0.0    |Initial Release. Do not use anymore as it has issues with handling embedded bundles|\n|1.0.2    |Fixes for the embedded bundles issue and prevents the interactive mode to fail to ask for certain parameters by having no defaults|\n|1.0.4    |Updated the Archetype to work with Sling 12|\n|1.0.8    |Added a launcher module|\n|1.0.12   |Add Java 17 support|\n|1.0.14   |Automatically use latest available Sling Starter version, improve launcher for Windows and different Maven setups, include examples in launcher when enabled|\n\n#### Introduction\n\nThis archetype will create a Sling project that can be deployed on the Sling.\n\nThe **core** and **ui.apps** are empty Maven modules that are ready for you code.\n\nThere are also **example** modules with the extension of **.example**. Please copy whatever you\nwant from these module into the appropriate module. The example modules are not intended to be\ninstalled into Sling.\nBoth type (regular and example) have the same structure and so you can copy them over without\nany problems.\n\nIf this archetype was generated with the **optionAll** property set to **y** then an **all** package\nwill be created that contains both the **core** and the **ui.apps**. This enables the developer\nto easily deploy all modules in that project as a single unit (see below).\n\nIf this archetype was generated with the **optionAll** property set to **n** then the **core**\nbundle will be deployed as embedded bundle of the **ui.apps** package.\n\n#### Why a Separate All Package\n\nFor a simple project that only contains one or two modules (bundle and content package) this seems\nlike overkill and the same can be accomplished using the ui.apps as single deployment package.\n\nThat said for a more serious project where there are multiple bundles and content packages this\nbecomes difficult to handle. Not only needs one Content Package to take the role of the single\ndeployment package which requires it to add the other modules as dependencies. This can be confusing\nand so the dedicated All content package solves that. It contains the dependencies and the logic\nhow to build and deploy the entire project in one step.\n\n#### Archetype Properties\n\n|Name                 |Description                                                                   |\n|:--------------------|:-----------------------------------------------------------------------------|\n|groupId              |Maven Group Id|\n|artifactId           |Maven Artifact Id|\n|version              |Version of your project|\n|artifactName         |Project Label used in the Descriptions and Module Name|\n|package              |Root Package of the Java Code|\n|packageGroup         |Name of the Package Folder where the package is installed in (/etc/packages)|\n|appsFolderName       |Folder name under /apps where components etc are installed|\n|contentFolderName    |Folder name under /content where the content is added to|\n|slingModelSubPackage |Sub Package where Sling Models should be place in with no trailing dots|\n|slingHostName        |Host Name or IP Address of the server where Sling is hosted|\n|slingPort            |Port to which your Sling instance is bound to|\n|optionAll            |Determines if the project is created with an **all** package or packaged inside the ui.apps mdoule (y/n)|\n|optionExample        |Determines if the example code is kept in separate modules (s), merged together into single modules (m) or example code is deleted (d)|\n\n#### Usage\n\nYou can create a project with this archetype using this command:\n```\nmvn archetype:generate \\\n   -DarchetypeGroupId=org.apache.sling \\\n   -DarchetypeArtifactId=sling-project-archetype \\\n   -DarchetypeVersion=1.0.14\n```\nMaven will then guide you through the configuration process to fill in all the\nproperties and then create the project.\n\n#### Local Build and Usage\n\n* Build this project locally with\n```\nmvn clean install\n```\n* Go to your folder where you want your generated project to be\n* Generate it with:\n```\nmvn archetype:generate -DarchetypeCatalog=local\n```\n* Select this Archetype from a given list\n* Provide the requested properties\n\n#### Build and Install Integration Test\n\nThere is a simple integration test setup with this archetype.\nThis script will build both the Merged All and UI (ui.apps packaging) and install them on the\nlocal Sling instance. The resulting pages (from the example code) can be viewed here:\n\n* [All Merged Home](http://localhost:8080/content/testContentAllMer/home.html)\n* [UI Merged Home](http://localhost:8080/content/testContentUIMer/home.html)\n\nYou can run this all of these test projects using the attached Unix shell script:\n```\nsh build.run.and.deploy.test.sh\n```\n\nThe properties for the integration test can be found under\n**/test/resources/projects/\\[all/notAll\\]/archetype.properties**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fsling-project-archetype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fsling-project-archetype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fsling-project-archetype/lists"}