Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @ExpediaGroup/eg-oss-poms-committers
* @ExpediaGroup/eg-oss-poms-committers @ExpediaGroup/apiary-committers

40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and deploy Snapshot
on:
workflow_dispatch:
inputs:
branch:
description: "The branch to build a SNAPSHOT from."
required: true
default: "main"
jobs:
deploy:
name: Build SNAPSHOT to Sonatype
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}

- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
java-package: jdk
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME # env variable for username in deploy
server-password: SONATYPE_PASSWORD # env variable for token in deploy
# only signed artifacts will be released to maven central. this sets up things for the maven-gpg-plugin
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
# this creates a settings.xml with the following server
settings-path: ${{ github.workspace }}

- name: Run Maven Targets
run: mvn deploy --settings $GITHUB_WORKSPACE/settings.xml --batch-mode --show-version --no-transfer-progress --activate-profiles sonatype-oss-release-github-actions
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ on: [push, pull_request]
jobs:
test:
name: Package and run all tests
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'
java-version: '8'
java-package: jdk

- name: Run Maven Targets
run: mvn package --batch-mode --show-version --no-transfer-progress
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release to Maven Central
on:
workflow_dispatch:
inputs:
branch:
description: "The branch to release from."
required: true
default: "main"
jobs:
release:
name: Release to Maven Central
runs-on: ubuntu-24.04

steps:
- name: Checkout source code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
# We need a personal access token to be able to push to a protected branch
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
java-package: jdk
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME # env variable for username in deploy
server-password: SONATYPE_PASSWORD # env variable for token in deploy
# only signed artifacts will be released to maven central. This sets up things for the maven-gpg-plugin
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
# this creates a settings.xml with the following server
settings-path: ${{ github.workspace }}

- name: Configure Git User
run: |
git config user.email "oss@expediagroup.com"
git config user.name "eg-oss-ci"
- name: Run Maven Targets
run: mvn release:prepare release:perform --settings $GITHUB_WORKSPACE/settings.xml --activate-profiles sonatype-oss-release-github-actions --batch-mode --show-version --no-transfer-progress
env:
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
GPG_PASSPHRASE: ${{secrets.GPG_PRIVATE_KEY_PASSPHRASE}}
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [3.0.0] - 2025-07-15
### Added
- Support for new Sonatype deployment: https://central.sonatype.org/pages/ossrh-eol/
- Use `sonatype-oss-release-github-actions` profile during: `mvn deploy` step.
- Removed deprecated profile `sonatype-oss-release`
- Added GitHub Actions release workflow.

## [2.4.1] - 2021-07-26
### Added
- Added two new properties related to the `maven-spotless-plugin`
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# eg-oss-parent

## Status ⚠️

This project is no longer in active development and will be archived in Jan 2022.

## Start using

Expand Down Expand Up @@ -50,4 +47,4 @@ If you experience timeouts, you can set the property `jib.httpTimeout` to a valu
# Legal
This project is available under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).

Copyright 2019-2021 Expedia, Inc.
Copyright 2019-2025 Expedia, Inc.
74 changes: 12 additions & 62 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>com.expediagroup</groupId>
<artifactId>eg-oss-parent</artifactId>
<version>2.4.2-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<description>Parent POM for Expedia Group open source projects</description>
<packaging>pom</packaging>
<url>https://github.com/ExpediaGroup/eg-oss-parent</url>
Expand Down Expand Up @@ -88,17 +88,6 @@
<spotless.config.execution.skip>false</spotless.config.execution.skip>
</properties>

<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -318,17 +307,6 @@
</execution>
</executions>
</plugin>
<plugin>
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Old sonatype deploy plugin it clashes with new way so it's removed.

<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus.staging.maven.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>

<pluginManagement>
Expand Down Expand Up @@ -472,50 +450,22 @@
</plugins>
</build>
</profile>
<!--
The profile `sonatype-oss-release` is going to be deprecated in the future because we will use
`sonatype-oss-release-github-actions` instead, which allows to do releases in Github instead of Jenkins.
The `sonatype-oss-release-github-actions` profile doesn't work in Jenkins so we will leave it here for
backwards compatibility, but you should migrate to use that one whenever it is possible.
-->
<profile>
<id>sonatype-oss-release</id>
<id>sonatype-oss-release-github-actions</id>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why you changed the id name?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah okay there were 2 profiles and now we just have 1?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes

<build>
<plugins>
<!--See https://central.sonatype.org/publish/publish-portal-maven/#publishing -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is the new plugin

<version>0.8.0</version>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

variable for version?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yeah maybe in a next pr.

<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>sonatype-oss-release-github-actions</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down