Skip to content

Commit 3bca30b

Browse files
xSAVIKxthboileau
andauthored
Integrate Maven builds and GH actions setup (#1414)
* Add maven wrapper to simplify local builds * Add standardized git configs * Update and fix Maven setup to reflect latest changes, improved profiling, added support for deploying packages to GH packages as well as Maven central. Harden plugins configs. Fixed links to licenses, websites, etc. * Drop Travis build in favor of GH actions * Add new badges * Bump dependency check plugin version * Fix profiles usages * Update wrapper setup * Use wrapper in CI * Migrate back to java8 Co-authored-by: Thierry Boileau <[email protected]> * Drop release keyword as it's not supported by Java8 * Drop ics * Drop the repos section --------- Co-authored-by: Thierry Boileau <[email protected]>
1 parent bf311c4 commit 3bca30b

File tree

11 files changed

+1115
-73
lines changed

11 files changed

+1115
-73
lines changed

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Set default behavior to automatically normalize line endings.
2+
* text=auto
3+
4+
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
5+
# in Windows via a file share from Linux, the scripts will work.
6+
*.{cmd,[cC][mM][dD]} text eol=crlf
7+
*.{bat,[bB][aA][tT]} text eol=crlf
8+
9+
# Force bash scripts to always use LF line endings so that if a repo is accessed
10+
# in Unix via a file share from Windows, the scripts will work.
11+
*.sh text eol=lf

.github/workflows/build.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "2.5"
7+
pull_request:
8+
workflow_dispatch:
9+
concurrency:
10+
group:
11+
${{ github.repository }}-${{ github.workflow }}-${{ github.event.number || github.head_ref || github.run_id || github.sha }}
12+
cancel-in-progress: true
13+
env:
14+
JAVA_VERSION: 8
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up JDK ${{ env.JAVA_VERSION }}
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: 'temurin'
24+
java-version: ${{ env.JAVA_VERSION }}
25+
cache: 'maven'
26+
- name: Build with Maven
27+
run: ./mvnw -B package --file pom.xml
28+
- name: Run tests
29+
continue-on-error: true
30+
run: ./mvnw -B test -P default,test

.github/workflows/publish.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Publish package to GitHub Packages and Central
2+
on:
3+
release:
4+
types: [ created ]
5+
workflow_dispatch:
6+
concurrency:
7+
group:
8+
${{ github.repository }}-${{ github.workflow }}-${{ github.event.number || github.head_ref || github.run_id || github.sha }}
9+
cancel-in-progress: true
10+
env:
11+
JAVA_VERSION: 8
12+
jobs:
13+
publish-gh-packages:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up JDK ${{ env.JAVA_VERSION }} for publishing to GitHub Packages
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: 'temurin'
24+
java-version: ${{ env.JAVA_VERSION }}
25+
cache: 'maven'
26+
server-id: github
27+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
28+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
29+
- name: Publish GitHub Packages package
30+
run: ./mvnw clean --batch-mode -P default,github -Dpublish=github deploy
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
34+
publish-ossrh:
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
38+
packages: write
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Set up JDK ${{ env.JAVA_VERSION }} for publishing to Maven Central Repository
42+
uses: actions/setup-java@v4
43+
with:
44+
distribution: 'temurin'
45+
java-version: ${{ env.JAVA_VERSION }}
46+
cache: 'maven'
47+
server-id: ossrh
48+
server-username: MAVEN_USERNAME
49+
server-password: MAVEN_PASSWORD
50+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
51+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
52+
- name: Publish to the Maven Central Repository
53+
run: ./mvnw clean --batch-mode -P default,ossrh -Dpublish=ossrh deploy
54+
env:
55+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
56+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
57+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

.gitignore

Lines changed: 115 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,122 @@
1-
/incubator/*/bin
2-
/modules/*/bin
3-
/modules/org.restlet.test/velocity.log
4-
/modules/org.restlet.test/velocity.log.1
5-
.DS_Store
61
*.iml
72
.DS_Store
83
.idea
94
target
105
.classpath
116
.project
127
.settings
8+
*.class
9+
*.log
10+
*.ctxt
11+
.mtj.tmp/
12+
*.jar
13+
*.war
14+
*.nar
15+
*.ear
16+
*.zip
17+
*.tar.gz
18+
*.rar
19+
hs_err_pid*
20+
replay_pid*
21+
target/
22+
pom.xml.tag
23+
pom.xml.releaseBackup
24+
pom.xml.versionsBackup
25+
pom.xml.next
26+
release.properties
27+
dependency-reduced-pom.xml
28+
buildNumber.properties
29+
.mvn/timing.properties
30+
.mvn/wrapper/maven-wrapper.jar
31+
.java-version
32+
.jenv-version
33+
*.bak
34+
.vscode/*
35+
!.vscode/settings.json
36+
!.vscode/tasks.json
37+
!.vscode/launch.json
38+
!.vscode/extensions.json
39+
!.vscode/*.code-snippets
40+
.history/
41+
*.vsix
42+
.idea/
43+
cmake-build-*/
44+
*.iws
45+
out/
46+
.idea_modules/
47+
atlassian-ide-plugin.xml
48+
com_crashlytics_export_strings.xml
49+
crashlytics.properties
50+
crashlytics-build.properties
51+
fabric.properties
52+
.idea/httpRequests
53+
.idea/caches/build_file_checksums.ser
54+
*~
55+
.fuse_hidden*
56+
.directory
57+
.Trash-*
58+
.nfs*
59+
.metadata
60+
bin/
61+
tmp/
62+
*.tmp
63+
*.swp
64+
*~.nib
65+
local.properties
66+
.settings/
67+
.loadpath
68+
.recommenders
69+
.externalToolBuilders/
70+
*.launch
71+
*.pydevproject
72+
.cproject
73+
.autotools
74+
.factorypath
75+
.buildpath
76+
.target
77+
.tern-project
78+
.texlipse
79+
.springBeans
80+
.recommenders/
81+
.apt_generated/
82+
.apt_generated_test/
83+
.cache-main
84+
.scala_dependencies
85+
.worksheet
86+
Thumbs.db
87+
Thumbs.db:encryptable
88+
ehthumbs.db
89+
ehthumbs_vista.db
90+
*.stackdump
91+
[Dd]esktop.ini
92+
$RECYCLE.BIN/
93+
*.cab
94+
*.msi
95+
*.msix
96+
*.msm
97+
*.msp
98+
*.lnk
99+
.data/
100+
temp/
101+
classes/
102+
deploy/
103+
javadoc/
104+
cwallet.sso.lck
105+
.AppleDouble
106+
.LSOverride
107+
Icon
108+
._*
109+
.DocumentRevisions-V100
110+
.fseventsd
111+
.Spotlight-V100
112+
.TemporaryItems
113+
.Trashes
114+
.VolumeIcon.icns
115+
.com.apple.timemachine.donotpresent
116+
.AppleDB
117+
.AppleDesktop
118+
Network Trash Folder
119+
Temporary Items
120+
.apdisk
121+
secring.*
122+
private.gpg

.mvn/wrapper/maven-wrapper.jar

61.6 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.1
18+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
19+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar

.travis.yml

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

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Restlet Framework
22

3+
4+
[![Build Status](https://github.com/restlet/restlet-framework-java/actions/workflows/build.yaml/badge.svg)](https://github.com/restlet/restlet-framework-java/actions/workflows/ci.yaml)
5+
6+
[![Apache License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
7+
8+
[![Eclipse EPL License](https://img.shields.io/badge/License-EPL_1.0-red.svg)](https://opensource.org/licenses/EPL-1.0)
9+
10+
311
## The first REST API framework for Java
412

513
Thanks to Restlet Framework's powerful routing and filtering capabilities, unified client and server Java API, developers can build secure and scalable RESTful web APIs.
@@ -24,5 +32,3 @@ To learn more about Restlet Framework, please have a look at the following resou
2432
* [Stack Overflow](http://stackoverflow.com/questions/tagged/restlet)
2533

2634
Copyright 2024 Qlik
27-
28-
[![Build Status](https://travis-ci.org/restlet/restlet-framework-java.svg?branch=2.5)](https://travis-ci.org/restlet/restlet-framework-java)

0 commit comments

Comments
 (0)