Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use predefined sbt License object #29

Merged
merged 1 commit into from
Dec 22, 2023
Merged

Conversation

rtyley
Copy link
Member

@rtyley rtyley commented Dec 22, 2023

The License object was added in sbt v1.6.2 with PR sbt/librarymanagement#395 .

It's more concise, and gives some consistency for how licenses are expressed.

Specifying a license is required for submitting a project to Maven Central.

The `License` object was added in sbt v1.6.2 (https://github.com/sbt/sbt/releases/tag/v1.6.2),
with PR sbt/librarymanagement#395 . It's more concise, and gives some
consistency for how licenses are expressed.

Specifying a license is *required* for submitting a project to Maven Central:

https://central.sonatype.org/publish/requirements/#license-information
@rtyley rtyley merged commit 88d63f7 into main Dec 22, 2023
2 checks passed
@rtyley rtyley deleted the use-predefined-license-object branch December 22, 2023 16:12
Copy link

Mock info: This PR Breaks Binary Compatibility when compared against most recent release 3.0.0. Details...

rtyley added a commit to guardian/gha-scala-library-release-workflow that referenced this pull request Dec 22, 2023
We had a failed release on https://github.com/guardian/targeting-client after
guardian/targeting-client#37 accidentally removed the
`license` setting:

https://github.com/guardian/targeting-client/actions/runs/7299896704/job/19893644176#step:5:56
```
2023-12-22 12:37:31.245Z error [SonatypeClient] [close] Failed  - (SonatypeClient.scala:181)
2023-12-22 12:37:31.245Z error [SonatypeClient] Activity name:close, started:2023-12-22T12:36:34.296Z  - (SonatypeClient.scala:469)
2023-12-22 12:37:31.246Z error [SonatypeClient]     Failed: pom-staging, failureMessage:Invalid POM: /com/gu/targeting-client/client-play-json-v30_2.13/1.1.5/client-play-json-v30_2.13-1.1.5.pom: License information missing  - (SonatypeClient.scala:387)
```

Specifying a license is *required* for submitting a project to Maven Central:

https://central.sonatype.org/publish/requirements/#license-information

Note that sbt v1.6.2 and above (thanks to sbt/librarymanagement#395)
supply a `License` object that means you can define the license much more concisely:

```
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0"))
```

Used successfully in guardian/etag-caching#29
rtyley added a commit to guardian/gha-scala-library-release-workflow that referenced this pull request Dec 22, 2023
We had a failed release on https://github.com/guardian/targeting-client after
guardian/targeting-client#37 accidentally removed the
`license` setting:

https://github.com/guardian/targeting-client/actions/runs/7299896704/job/19893644176#step:5:56
```
2023-12-22 12:37:31.245Z error [SonatypeClient] [close] Failed  - (SonatypeClient.scala:181)
2023-12-22 12:37:31.245Z error [SonatypeClient] Activity name:close, started:2023-12-22T12:36:34.296Z  - (SonatypeClient.scala:469)
2023-12-22 12:37:31.246Z error [SonatypeClient]     Failed: pom-staging, failureMessage:Invalid POM: /com/gu/targeting-client/client-play-json-v30_2.13/1.1.5/client-play-json-v30_2.13-1.1.5.pom: License information missing  - (SonatypeClient.scala:387)
```

Specifying a license is *required* for submitting a project to Maven Central:

https://central.sonatype.org/publish/requirements/#license-information

Note that sbt v1.6.2 and above (thanks to sbt/librarymanagement#395)
supply a `License` object that means you can define the license much more concisely:

```
licenses := Seq(License.Apache2)
```

Used successfully in guardian/etag-caching#29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant