Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Document pom.xml SCM settings

...

See a recent example below

Note
titleDefault branch name

Sling uses the default branch name master . To keep things simple for our tooling ( repo tool, Jenkins ) please create the repository locally and use master  as a branch name when pushing the initial changes to the repository. See Removal of problematic language for more context.


Code Block
$ mkdir sling-new-repo
$ cd sling-new-repo
$ git init -b master

See also the discussion from

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyINFRA-22359


Permission propagation

The scripts will be created in gitbox and github at the same time, but permissions will be granted to the GitHub repository sometime later, due to the way ASF infra tooling works. If permissions don't appear in two hours, raise an INFRA ticket. In the meantime you can use the gitbox backend to push your changes.

...

Reference: https://help.github.com/en/articles/splitting-a-subfolder-out-into-a-new-repository

Maven SCM settings

The SCM settings from the pom.xml file are read by various tools, but most often used by the maven-scm-plugin  when releasing. We set the connection and developerScm settings to reference the ASF-maintained gitbox service, but use GitHub for the URL since it offers a better browsing experience and receives special treatment from some tools, such as renovate.

Code Block
languagexml
titlepom.xml scm settings example
  <scm>
    <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-$MODULE.git</connection>
    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-$MODULE.git</developerConnection>
    <url>https://github.com/apache/sling-org-apache-sling-$MODULE.git</url>
  </scm>


Update the repo manifest

Regenerate the default.xml manifest form the sling-aggregator repo using  groovy collect-sling-repos.groovy > default.xml .

Update local Sling repo checkout

Execute the following comman in the root of the Sling repo checkout

Code Block
bash
bash
$ repo sync -j 16
$ cd ${NEW_REPO}
$ git checkout master

Boilerplate files

Ensure that at a minimum the repository contains the following files:

...

Most of the files can be copied from any repository. We'll use org-apache-sling-api  as an example.

Code Block
bash
bash
$ cd org-apache-sling-api
$ cp CODE_OF_CONDUCT.md

...

 CONTRIBUTING.md Jenkinsfile LICENSE .gitignore ../${NEW_REPO}

Generate a default .asf.yaml  file and update it, if applicable:

Code Block
bash
bash
$ cd aggregator
$ groovy ./scripts/update-asf-yaml.groovy ../

...

org-apache-sling

...

-commons-metrics-prometheus/

...

See

Git - .asf.yaml features for more details:

  • tags: include initially sling  and java  (or other programming language, as applicable )
  • homepage: module documentation on Sling website, or the Sling homepage if none exists
  • description: the name from the pom.xml 

Badges

The sling-aggregator/add-badges.sh script automates the creation of badges for the README. You will need a valid GitHub token for it. To add the badges for just a single repository, run.

Code Block
$ cd aggregator
$ groovy ./addgenerate-project-badges.shgroovy ../ ${NEW_REPO}

Enroll in Kibble

...