Skip to content

Add Maven publication#190

Merged
snazy merged 4 commits intoapache:mainfrom
snazy:releases-prep
Sep 10, 2024
Merged

Add Maven publication#190
snazy merged 4 commits intoapache:mainfrom
snazy:releases-prep

Conversation

@snazy
Copy link
Member

@snazy snazy commented Aug 22, 2024

Adds publishing for Maven artifacts, including signing. Includes most prerequisites to publish Maven artifacts to Maven Central.

The build-code parts have been taken from Nessie, including the necessary special treatment of shadow-jars and support to publish a bom.
./gradlew publishToMavenLocal works out of the box.

On top of the Nessie parts, this change can also build a source tarball from using git archive, plus some Apache project specific adoptions.

Fully signed invocation example, assuming GPG agent (there are alternative ways to provide the GPG key+passphrase):

./ gradlew \
   publishToMavenLocal \
   sourceTarball \
   -Prelease \
   -PuseGpgAgent

This change also introduces a version.txt, which contains 999-SNAPSHOT. Using 999-SNAPSHOT on the main branch makes it easier later on to enable multiple major/minor version branches and releases from those. version.txt on a major/minor version branch would contain something like 2.1-SNAPSHOT. With 999-SNAPSHOT on the main branch eliminates the need to update version.txt on the main branch when a new major version branch is created, eliminating the need to commit and push to multiple branches from a mostly automated release workflow infrastructure.

@snazy snazy force-pushed the releases-prep branch 11 times, most recently from 6f6e7a1 to 789a379 Compare August 25, 2024 06:34
@snazy snazy mentioned this pull request Aug 26, 2024
@snazy snazy force-pushed the releases-prep branch 9 times, most recently from 55bc25d to ea160e8 Compare August 30, 2024 12:04
@snazy snazy force-pushed the releases-prep branch 4 times, most recently from e4e375d to 3b825fa Compare September 4, 2024 16:09
@snazy snazy marked this pull request as ready for review September 4, 2024 16:16
Adds publishing for Maven artifacts, including signing. Includes most prerequisites to publish Maven artifacts to Maven Central.

The build-code parts have been taken from Nessie, including the necessary special treatment of shadow-jars and support to publish a bom.
`./gradlew publishToMavenLocal` works out of the box.

On top of the Nessie parts, this change can also build a source tarball from using `git archive`, plus some Apache project specific adoptions.

Fully signed invocation example, assuming GPG agent (there are alternative ways to provide the GPG key+passphrase):
```bash
./ gradlew \
   publishToMavenLocal \
   sourceTarball \
   -Prelease \
   -PuseGpgAgent
```

This change also introduces a `version.txt`, which contains `999-SNAPSHOT`. Using `999-SNAPSHOT` on the `main` branch makes it easier later on to enable multiple major/minor version branches and releases from those. `version.txt` on a major/minor version branch would contain something like `2.1-SNAPSHOT`. With `999-SNAPSHOT` on the `main` branch eliminates the need to update `version.txt` on the `main` branch when a new major version branch is created, eliminating the need to commit and push to multiple branches from a mostly automated release workflow infrastructure.
@snazy
Copy link
Member Author

snazy commented Sep 5, 2024

@jbonofre can you review?


mailingLists.addAll("dev", "issues", "commits")

podlingPpmcAsfIds.addAll("anoop", "ashvin", "jackye", "russellspitzer", "snazy", "vvcephei")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add the mentors here (very selfish, but I would like to be on the list :) ).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a trick to verify that you review this change ;) ;) :disappear:

build.gradle.kts Outdated

repositories {
register("apache") {
this.nexusUrl // TODO configure
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean https://repository.apache.org ?

It's used for staging and snapshots.
The stagingProfileId is the one from the release managers, or the release bot. Right ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep these as TODOs for now until we can actually test at least snapshot-releases e2e.
BTW: stagingProfileId isn't the user/bot (credentials are configured in a different way) - it's an ID "per-release".

@snazy snazy merged commit 99d8eb7 into apache:main Sep 10, 2024
@snazy snazy deleted the releases-prep branch September 10, 2024 12:31
snazy added a commit to snazy/polaris that referenced this pull request Feb 11, 2026
* fix(site): Bump the binary distribution version. (apache#3624)

Co-authored-by: ChristopherQu <[email protected]>

* chore(deps): update actions/stale digest to dcd2b94 (apache#3643)

* security(getting-started): enforce stronger postgres password and restrict database access (apache#3570)

* security(getting-started): enforce strong postgres passwords and restrict database access

- Add POSTGRES_PASSWORD environment variable to specify the Postgres
  database password.
- Add validation to reject weak default "postgres" password.
- Generate random 16-character password if POSTGRES_PASSWORD is not
  provided.
- Replace all hardcoded "postgres" password references with
  $POSTGRES_PASSWORD variable.
- Restrict Azure PostgreSQL access to VM's public IP using
  `--public-access` flag. This aligns security posture across AWS
  (VPC-only), Azure (IP-restricted), and GCP (authorized-networks)
- Update documentation site to describe the POSTGRES_PASSWORD
  environment variable.

* OpenAPI specs: update README with detailed API specifications (apache#3629)

* CI: simplify `ci-incr-build-cache-save` action usage (apache#3626)

* CI: simplify upload-artifacts call + only on failure (apache#3627)

* CI: simplify java-setup action usage (apache#3628)

* STS roleArn: enable 3rd party STS services (apache#3619)

Certain non-AWS STS service implementations use role ARNs that look quite different from AWS ones.
This change shall enable those STS implementations.

Example role ARNs that currently fail:
* `urn:ecs:sts::s3:assumed-role/s3assumeRole/user1-105-temp`
* `urn:sgws:identity::12345:group/foo-bar-abcdef`

Related issue apache#2743

* Last merged commit 29ccdd1

---------

Co-authored-by: HJ Q. <[email protected]>
Co-authored-by: ChristopherQu <[email protected]>
Co-authored-by: Mend Renovate <[email protected]>
Co-authored-by: Pierre Laporte <[email protected]>
Co-authored-by: Alexandre Dutra <[email protected]>
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.

2 participants