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

[WW-5335] Prepares for Java 17 & Struts 7.x #785

Merged
merged 1 commit into from
Nov 15, 2023
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
10 changes: 9 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ name: "CodeQL"

on:
push:
branches: [ "master" ]
branches:
- master
- release/struts-7-0-x
pull_request:

permissions:
Expand All @@ -43,6 +45,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: 'maven'
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
push:
branches:
- master
- release/struts-7-0-x

permissions: read-all

Expand All @@ -33,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17', '21' ]
java: [ '17', '21' ]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/scorecards-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ on:
schedule:
- cron: "30 1 * * 6" # Weekly on Saturdays
push:
branches: [ "master" ]
branches:
- master
- release/struts-7-0-x

permissions: read-all

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
push:
branches:
- master
- release/struts-7-0-x

permissions: read-all

Expand Down
113 changes: 39 additions & 74 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ pipeline {
}
}
}
stage('JDK 17') {
stage('JDK 21') {
agent {
label 'ubuntu'
}
tools {
jdk 'jdk_17_latest'
jdk 'jdk_21_latest'
maven 'maven_3_latest'
}
environment {
Expand All @@ -44,7 +44,7 @@ pipeline {
}
stage('Test') {
steps {
sh './mvnw -B verify -Pcoverage -DskipAssembly'
sh './mvnw -B test'
}
post {
always {
Expand All @@ -53,49 +53,47 @@ pipeline {
}
}
}
stage('Code Quality') {
stage('Build Source & JavaDoc') {
when {
branch 'master'
}
steps {
withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) {
sh './mvnw -B -Pcoverage -DskipAssembly -Dsonar.login=${SONARCLOUD_TOKEN} verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar'
dir("local-snapshots-dir/") {
deleteDir()
}
sh './mvnw -B source:jar javadoc:jar -DskipTests -DskipAssembly'
}
}
}
post {
always {
cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
}
}
}
stage('JDK 11') {
agent {
label 'ubuntu'
}
tools {
jdk 'jdk_11_latest'
maven 'maven_3_latest'
}
environment {
MAVEN_OPTS = "-Xmx1024m"
}
stages {
stage('Build') {
stage('Deploy Snapshot') {
when {
branch 'master'
}
steps {
sh './mvnw -B clean install -DskipTests -DskipAssembly'
withCredentials([file(credentialsId: 'lukaszlenart-repository-access-token', variable: 'CUSTOM_SETTINGS')]) {
sh './mvnw -s \${CUSTOM_SETTINGS} deploy -DskipTests -DskipAssembly'
}
}
}
stage('Test') {
steps {
sh './mvnw -B test'
stage('Upload nightlies') {
when {
branch 'master'
}
post {
always {
junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
}
steps {
sh './mvnw -B package -DskipTests'
sshPublisher(publishers: [
sshPublisherDesc(
configName: 'Nightlies',
transfers: [
sshTransfer(
remoteDirectory: '/struts/snapshot',
removePrefix: 'assembly/target/assembly/out',
sourceFiles: 'assembly/target/assembly/out/struts-*.zip',
cleanRemote: true
)
],
verbose: true
)
])
}
}
}
Expand All @@ -105,12 +103,12 @@ pipeline {
}
}
}
stage('JDK 8') {
stage('JDK 17') {
agent {
label 'ubuntu'
}
tools {
jdk 'jdk_1.8_latest'
jdk 'jdk_17_latest'
maven 'maven_3_latest'
}
environment {
Expand All @@ -124,7 +122,7 @@ pipeline {
}
stage('Test') {
steps {
sh './mvnw -B test'
sh './mvnw -B verify -Pcoverage -DskipAssembly'
}
post {
always {
Expand All @@ -133,49 +131,16 @@ pipeline {
}
}
}
stage('Build Source & JavaDoc') {
when {
branch 'master'
}
steps {
dir("local-snapshots-dir/") {
deleteDir()
}
sh './mvnw -B source:jar javadoc:jar -DskipTests -DskipAssembly'
}
}
stage('Deploy Snapshot') {
stage('Code Quality') {
when {
branch 'master'
}
steps {
withCredentials([file(credentialsId: 'lukaszlenart-repository-access-token', variable: 'CUSTOM_SETTINGS')]) {
sh './mvnw -s \${CUSTOM_SETTINGS} deploy -DskipTests -DskipAssembly'
withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) {
sh './mvnw -B -Pcoverage -DskipAssembly -Dsonar.login=${SONARCLOUD_TOKEN} verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar'
}
}
}
stage('Upload nightlies') {
when {
branch 'master'
}
steps {
sh './mvnw -B package -DskipTests'
sshPublisher(publishers: [
sshPublisherDesc(
configName: 'Nightlies',
transfers: [
sshTransfer(
remoteDirectory: '/struts/snapshot',
removePrefix: 'assembly/target/assembly/out',
sourceFiles: 'assembly/target/assembly/out/struts-*.zip',
cleanRemote: true
)
],
verbose: true
)
])
}
}
}
post {
always {
Expand Down
2 changes: 1 addition & 1 deletion apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>
<artifactId>struts2-apps</artifactId>
<packaging>pom</packaging>
Expand Down
4 changes: 2 additions & 2 deletions apps/rest-showcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
<name>Struts 2 Rest Showcase Webapp</name>
<description>Struts 2 Rest Showcase Example</description>

Expand Down
2 changes: 1 addition & 1 deletion apps/showcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-showcase</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-assembly</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-bom</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Struts 2 Bill of Materials</name>
Expand Down
2 changes: 1 addition & 1 deletion bundles/admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-osgi-admin-bundle</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundles/demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-osgi-demo-bundle</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-osgi-bundles</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>
<artifactId>struts2-core</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion plugins/async/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-async-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/bean-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion plugins/cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-cdi-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/config-browser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-config-browser-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/convention/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-convention-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/dwr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-dwr-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion plugins/embeddedjsp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-plugins</artifactId>
<version>6.4.0-SNAPSHOT</version>
<version>7.0.0-SNAPSHOT</version>
</parent>

<artifactId>struts2-embeddedjsp-plugin</artifactId>
Expand Down
Loading