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

Quarkiverse adjustments / onboarding #409

Merged
merged 11 commits into from
Aug 29, 2024
14 changes: 14 additions & 0 deletions .github/quarkus-ecosystem-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e

# update the versions
mvn --settings .github/quarkus-ecosystem-maven-settings.xml -B versions:set-property -Dproperty=quarkus.version -DnewVersion=${QUARKUS_VERSION} -DgenerateBackupPoms=false
mvn --settings .github/quarkus-ecosystem-maven-settings.xml -B versions:set-property -Dproperty=version.io.quarkus -DnewVersion=${QUARKUS_VERSION} -DgenerateBackupPoms=false

# run the tests
mvn --settings .github/quarkus-ecosystem-maven-settings.xml -B clean install -Pquick -pl '!integration-test'

mvn --settings .github/quarkus-ecosystem-maven-settings.xml clean verify -Pjackson-classic -pl integration-test -Dnative -Dquarkus.native.container-build=true --fail-at-end -e
mvn --settings .github/quarkus-ecosystem-maven-settings.xml clean verify -Pjsonb-classic -pl integration-test -Dnative -Dquarkus.native.container-build=true --fail-at-end -e
mvn --settings .github/quarkus-ecosystem-maven-settings.xml clean verify -Pjackson-reactive -pl integration-test -Dnative -Dquarkus.native.container-build=true --fail-at-end -e
mvn --settings .github/quarkus-ecosystem-maven-settings.xml clean verify -Pjsonb-reactive -pl integration-test -Dnative -Dquarkus.native.container-build=true --fail-at-end -e
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Integration Tests

on:
push:
branches: [ master, v3.X, v2.X, v1.X ]
branches: [ main ]
pazkooda marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches: [ master ]
branches: [ main ]
workflow_dispatch:

jobs:
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/latest-stable-compatibility-tests.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/maven-regression.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/publish.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/quarkus-snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Quarkus ecosystem CI"
on:
watch:
types: [started]
workflow_dispatch:

# For this CI to work, ECOSYSTEM_CI_TOKEN needs to contain a GitHub with rights to close the Quarkus issue that the user/bot has opened,
# while 'ECOSYSTEM_CI_REPO_PATH' needs to be set to the corresponding path in the 'quarkusio/quarkus-ecosystem-ci' repository

env:
ECOSYSTEM_CI_REPO: quarkusio/quarkus-ecosystem-ci
ECOSYSTEM_CI_REPO_FILE: context.yaml
JAVA_VERSION: 17

#########################
# Repo specific setting #
#########################

ECOSYSTEM_CI_REPO_PATH: quarkiverse-resteasy-problem

jobs:
build:
name: "Build against latest Quarkus snapshot"
runs-on: ubuntu-latest
if: github.actor == 'quarkusbot' || github.event_name == 'workflow_dispatch'

steps:
- name: Install yq
uses: dcarbone/[email protected]

- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'

- name: Checkout repo
uses: actions/checkout@v3
with:
path: current-repo

- name: Checkout Ecosystem
uses: actions/checkout@v3
with:
repository: ${{ env.ECOSYSTEM_CI_REPO }}
path: ecosystem-ci

- name: Setup and Run Tests
run: ./ecosystem-ci/setup-and-test
env:
ECOSYSTEM_CI_TOKEN: ${{ secrets.ECOSYSTEM_CI_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/quickstart-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Quickstart Flow Tests

on:
push:
branches: [ master, v3.X, v2.X, v1.X ]
branches: [ main ]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
EXTENSION_VERSION=$(mvn -f ../pom.xml -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
echo "EXTENSION_VERSION = $EXTENSION_VERSION"
cd quarkus-resteasy-problem-playground
./mvnw quarkus:add-extension -Dextensions="com.tietoevry.quarkus:quarkus-resteasy-problem:$EXTENSION_VERSION"
./mvnw quarkus:add-extension -Dextensions="io.quarkiverse:quarkus-resteasy-problem:$EXTENSION_VERSION"

- name: Run tests
working-directory: ./quickstart/quarkus-resteasy-problem-playground
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Static Code Analysis

on:
push:
branches: [ master, v3.X, v2.X, v1.X ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]
workflow_dispatch:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Unit Tests

on:
push:
branches: [ master, v3.X, v2.X, v1.X ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]
workflow_dispatch:

jobs:
Expand Down
12 changes: 1 addition & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,4 @@ Command line:\
`./mvnw verify -pl integration-test -Pjsonb-classic`\
`./mvnw verify -pl integration-test -Pjsonb-reactive`\
`./mvnw verify -pl integration-test -Pjackson-classic,quarkus-1.4` - checking backward compatibility with older versions of Quarkus\
`./mvnw clean verify -Pnative,jackson-classic -pl integration-test` - running tests in native mode

### Deployment and release
Releases are managed and conducted by Tietoevry. Stable (release) artifacts are available from Maven Central.

```
./mvnw release:prepare release:perform
```
Now create and publish new release on Github.

This will also automatically trigger GH Action, which will deploy artifacts built from newly created version to [OSSRH staging nexus](https://s01.oss.sonatype.org/#stagingRepositories).
`./mvnw clean verify -Pnative,jackson-classic -pl integration-test` - running tests in native mode
2 changes: 0 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022 Tietoevry (https://www.tietoevry.com/)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
# Problem Details for HTTP APIs (RFC-7807) implementation for Quarkus / RESTeasy.

[![Release](https://img.shields.io/maven-central/v/com.tietoevry.quarkus/quarkus-resteasy-problem/3?label=quarkus-resteasy-problem)](https://search.maven.org/search?q=g:com.tietoevry.quarkus%20AND%20a:quarkus-resteasy-problem%20AND%20v:3*)
[![Quarkus](https://img.shields.io/badge/Quarkus-3.0.0+-important.svg)](https://github.com/quarkusio/quarkus/releases/tag/3.0.0.Final)
![Quarkus](https://img.shields.io/badge/Java%2011+-blue.svg)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/quarkiverse/quarkus-resteasy-problem/blob/main/LICENSE.txt)

[![Release](https://img.shields.io/maven-central/v/com.tietoevry.quarkus/quarkus-resteasy-problem/2?label=quarkus-resteasy-problem)](https://search.maven.org/search?q=g:com.tietoevry.quarkus%20AND%20a:quarkus-resteasy-problem%20AND%20v:2*)
[![Quarkus](https://img.shields.io/badge/Quarkus-2.0.0+-important.svg)](https://github.com/quarkusio/quarkus/releases/tag/2.16.6.Final)
![Quarkus](https://img.shields.io/badge/Java%2011+-blue.svg)

[![Release](https://img.shields.io/maven-central/v/com.tietoevry.quarkus/quarkus-resteasy-problem/1?label=quarkus-resteasy-problem)](https://search.maven.org/search?q=g:com.tietoevry.quarkus%20AND%20a:quarkus-resteasy-problem%20AND%20v:1*)
[![Quarkus](https://img.shields.io/badge/Quarkus-1.4.0+-important.svg)](https://github.com/quarkusio/quarkus/releases/tag/1.13.7.Final)
![Quarkus](https://img.shields.io/badge/Java%208+-blue.svg)

[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/tietoevry/quarkus-resteasy-problem/blob/master/LICENSE.txt)

[![Build status](https://github.com/tietoevry/quarkus-resteasy-problem/actions/workflows/unit-tests.yaml/badge.svg)](https://github.com/TietoEVRY/quarkus-resteasy-problem/actions/workflows/unit-tests.yaml)
[![Build status](https://github.com/tietoevry/quarkus-resteasy-problem/actions/workflows/integration-tests.yaml/badge.svg)](https://github.com/TietoEVRY/quarkus-resteasy-problem/actions/workflows/integration-tests.yaml)
[![Build status](https://github.com/tietoevry/quarkus-resteasy-problem/actions/workflows/native-mode-tests.yaml/badge.svg)](https://github.com/TietoEVRY/quarkus-resteasy-problem/actions/workflows/native-mode-tests.yaml)
[![Compatibility with latest stable Quarkus](https://github.com/tietoevry/quarkus-resteasy-problem/actions/workflows/latest-stable-compatibility-tests.yaml/badge.svg)](https://github.com/TietoEVRY/quarkus-resteasy-problem/actions/workflows/latest-stable-compatibility-tests.yaml)
[![Build status](https://github.com/quarkiverse/quarkus-resteasy-problem/actions/workflows/unit-tests.yaml/badge.svg)](https://github.com/quarkiverse/quarkus-resteasy-problem/actions/workflows/unit-tests.yaml)
[![Build status](https://github.com/quarkiverse/quarkus-resteasy-problem/actions/workflows/integration-tests.yaml/badge.svg)](https://github.com/quarkiverse/quarkus-resteasy-problem/actions/workflows/integration-tests.yaml)
[![Build status](https://github.com/quarkiverse/quarkus-resteasy-problem/actions/workflows/native-mode-tests.yaml/badge.svg)](https://github.com/quarkiverse/quarkus-resteasy-problem/actions/workflows/native-mode-tests.yaml)

[RFC7807 Problem](https://tools.ietf.org/html/rfc7807) extension for Quarkus RESTeasy/JaxRS applications. It maps Exceptions to `application/problem+json` HTTP responses. Inspired by [Zalando Problem library](https://github.com/zalando/problem).

Expand All @@ -36,7 +23,7 @@ This extension supports:

- __time-saving__ - in most cases you will not have to implement your own JaxRS `ExceptionMapper`s anymore, which makes your app smaller, and less error-prone.

See [Built-in Exception Mappers Wiki](https://github.com/tietoevry/quarkus-resteasy-problem/wiki#built-in-exception-mappers) for more details.
See [Built-in Exception Mappers Wiki](https://github.com/quarkiverse/quarkus-resteasy-problem/wiki#built-in-exception-mappers) for more details.

From [RFC7807](https://tools.ietf.org/html/rfc7807):
```
Expand All @@ -48,6 +35,18 @@ so-called "HTTP APIs" are usually not.
```

## Usage
### Quarkus 3.15+
This extension is now part of Quarkiverse, so simply add this to your pom.xml:
```xml
<dependency>
<groupId>io.quarkiverse.resteasy-problem</groupId>
<artifactId>quarkus-resteasy-problem</artifactId>
</depend>
```

<details>
<summary>Quarkus up to 3.14 / Java 17+</summary>

### Quarkus 3.X
Quarkus | Java | quarkus-resteasy-problem
---------------------|------|-------------------------
Expand All @@ -74,6 +73,7 @@ Or add the following dependency to `pom.xml` in existing project:
<version>3.9.0</version>
</dependency>
```
</details>

<details>
<summary>Quarkus 2.X / Java 11+</summary>
Expand Down Expand Up @@ -135,7 +135,7 @@ Now you can throw `HttpProblem`s (using builder or a subclass), JaxRS exceptions
```java
package problem;

import com.tietoevry.quarkus.resteasy.problem.HttpProblem;
import io.quarkiverse.resteasy.problem.HttpProblem;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Response;
Expand Down
6 changes: 3 additions & 3 deletions deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.tietoevry.quarkus</groupId>
<groupId>io.quarkiverse.resteasy-problem</groupId>
<artifactId>quarkus-resteasy-problem-parent</artifactId>
<version>3.9.1-SNAPSHOT</version>
<version>999-SNAPSHOT</version>
</parent>

<artifactId>quarkus-resteasy-problem-deployment</artifactId>
<name>Quarkus - RESTeasy - Problem - Deployment</name>

<dependencies>
<dependency>
<groupId>com.tietoevry.quarkus</groupId>
<groupId>io.quarkiverse.resteasy-problem</groupId>
pazkooda marked this conversation as resolved.
Show resolved Hide resolved
<artifactId>quarkus-resteasy-problem</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.tietoevry.quarkus.resteasy.problem.deployment;
package io.quarkiverse.resteasy.problem.deployment;

import java.util.function.BooleanSupplier;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.tietoevry.quarkus.resteasy.problem.deployment;
package io.quarkiverse.resteasy.problem.deployment;

import java.util.Objects;
import java.util.function.BooleanSupplier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.tietoevry.quarkus.resteasy.problem.deployment;
package io.quarkiverse.resteasy.problem.deployment;

final class JacksonDetector extends ClasspathDetector {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.tietoevry.quarkus.resteasy.problem.deployment;
package io.quarkiverse.resteasy.problem.deployment;

final class JsonBDetector extends ClasspathDetector {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.tietoevry.quarkus.resteasy.problem.deployment;
package io.quarkiverse.resteasy.problem.deployment;

import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
Expand Down
Loading