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

Add predefined list of licenses #395

Merged
merged 1 commit into from
Feb 1, 2022
Merged

Conversation

eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Feb 1, 2022

@eed3si9n eed3si9n changed the base branch from develop to 1.6.x February 1, 2022 00:33
@eed3si9n eed3si9n merged commit 6798813 into sbt:1.6.x Feb 1, 2022
@eed3si9n eed3si9n deleted the wip/licenses branch February 1, 2022 02:23
eed3si9n added a commit to eed3si9n/sbt that referenced this pull request Feb 1, 2022
rtyley added a commit to guardian/etag-caching that referenced this pull request Dec 22, 2023
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 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant