Skip to content

Commit 2e280e1

Browse files
committed
breaking: migrating to jakarta namespace
1 parent c8d29ea commit 2e280e1

File tree

10 files changed

+87
-55
lines changed

10 files changed

+87
-55
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/gradle-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Call Gradle CI
2+
3+
on: [workflow_dispatch, push, pull_request]
4+
5+
jobs:
6+
call-workflow:
7+
uses: tomasbjerre/.github/.github/workflows/gradle-ci.yml@master
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Publish release on tag push
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
push:
7+
tags:
8+
- "*"
9+
10+
jobs:
11+
call-workflow:
12+
uses: tomasbjerre/.github/.github/workflows/publish-release-on-tag-push.yaml@master

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# Bitbucket Cloud Java REST API
2-
[![Build Status](https://travis-ci.org/tomasbjerre/bitbucket-cloud-java-rest-api.svg?branch=master)](https://travis-ci.org/tomasbjerre/bitbucket-cloud-java-rest-api)
3-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/se.bjurr.bitbucketcloud/bitbucket-cloud-java-rest-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/se.bjurr.bitbucketcloud/bitbucket-cloud-java-rest-api)
1+
# JAX-RS server with OpenAPI
42

5-
REST API generated from the `swagger.json` spec at https://api.bitbucket.org/swagger.json
3+
## Overview
4+
This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using an
5+
[OpenAPI-Spec](https://openapis.org), you can easily generate a server stub.
66

7-
You may want to use [App Passwords](https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html) for authentication.
7+
This is an example of building a OpenAPI-enabled JAX-RS server.
8+
This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework.
89

9-
**Note:** `swagger.yml` is committed in the repo! Because some adjustments were needed to get code generation working. See commit log.
10+
This project produces a jar that defines some interfaces.
11+
The jar can be used in combination with another project providing the implementation.
1012

11-
**Note:** JAX-RS is just an API! You will need an implementation to create a client. Example [here](https://github.com/tomasbjerre/violation-comments-to-bitbucket-cloud-lib). See: https://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Services

build.gradle

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,54 @@
1-
apply plugin: 'java'
2-
3-
buildscript {
4-
repositories {
5-
mavenLocal()
6-
mavenCentral()
7-
}
8-
dependencies {
9-
classpath 'se.bjurr.gradle:gradle-scripts:2.+'
10-
classpath 'org.openapitools:openapi-generator-gradle-plugin:5.4.0'
11-
}
1+
plugins {
2+
id "se.bjurr.gradle.conventional-release" version "0.+"
3+
id "se.bjurr.gradle.java-convention" version "0.+"
4+
id "se.bjurr.gradle.update-versions" version "0.+"
5+
id "org.openapi.generator" version "7.14.0"
126
}
13-
apply from: project.buildscript.classLoader.getResource('main.gradle').toURI()
147

158
dependencies {
16-
compile 'io.swagger:swagger-annotations:1.5.3'
17-
compile 'javax.ws.rs:javax.ws.rs-api:2.1.1'
18-
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9'
19-
compile 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.9.9'
20-
compile 'javax.validation:validation-api:2.0.1.Final'
9+
api 'io.swagger:swagger-annotations:1.6.16'
10+
api 'jakarta.ws.rs:jakarta.ws.rs-api:4.0.0'
11+
api 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.19.1'
12+
api 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.19.1'
13+
api 'jakarta.validation:jakarta.validation-api:3.1.1'
14+
api 'jakarta.annotation:jakarta.annotation-api:3.0.0'
2115
}
2216

23-
24-
apply plugin: 'org.openapi.generator'
25-
2617
openApiGenerate {
27-
generatorName = "jaxrs-spec"
28-
skipOverwrite = false
29-
inputSpec = "$rootDir/openapi.yml".toString()
30-
validateSpec = false
31-
skipValidateSpec = true
32-
outputDir = "$rootDir".toString()
33-
apiPackage = "se.bjurr.bitbucketcloud.gen.api"
34-
modelPackage = "se.bjurr.bitbucketcloud.gen.model"
35-
configOptions = [
36-
interfaceOnly: "true",
37-
generatePom: "false",
38-
useJackson: "true"
39-
]
18+
generatorName = "jaxrs-spec"
19+
skipOverwrite = false
20+
inputSpec = "$rootDir/openapi.yml".toString()
21+
validateSpec = false
22+
skipValidateSpec = true
23+
outputDir = "$rootDir".toString()
24+
apiPackage = "se.bjurr.bitbucketcloud.gen.api"
25+
modelPackage = "se.bjurr.bitbucketcloud.gen.model"
26+
configOptions = [
27+
interfaceOnly: "true",
28+
generatePom: "false",
29+
useJackson: "true",
30+
useJakartaEe: "true"
31+
]
4032
}
4133

4234
compileJava.dependsOn 'openApiGenerate'
4335

36+
tasks.named("spotlessGroovyGradle") {
37+
dependsOn(tasks.named("openApiGenerate"))
38+
}
39+
40+
tasks.named("spotlessJava") {
41+
dependsOn(tasks.named("openApiGenerate"))
42+
}
43+
44+
tasks.named("spotlessJson") {
45+
dependsOn(tasks.named("openApiGenerate"))
46+
}
47+
48+
tasks.named("sourcesJar") {
49+
dependsOn(tasks.named("openApiGenerate"))
50+
}
51+
52+
tasks.named("javadocJar") {
53+
dependsOn(tasks.named("openApiGenerate"))
54+
}

gradle.properties

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
version = 1.12-SNAPSHOT
2-
group = 'se.bjurr.bitbucketcloud'
3-
description = 'Rest client for Bitbucket CLoud'
1+
#
2+
#Thu Jul 17 15:40:07 CEST 2025
3+
description='Rest client for Bitbucket CLoud'
4+
group=se.bjurr.bitbucketcloud
5+
version=1.11.1
6+
formattingExcludedPatterns=**/src/gen/**.java

gradle/wrapper/gradle-wrapper.jar

-11.8 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

settings.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
mavenCentral()
5+
mavenLocal()
6+
}
7+
}

0 commit comments

Comments
 (0)