Skip to content

Commit 2465f02

Browse files
authored
Merge branch 'master' into mixins
2 parents 9546305 + bf87c1a commit 2465f02

File tree

208 files changed

+7777
-4503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+7777
-4503
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,3 @@ contact_links:
2424
- name: Project Mailing Lists
2525
url: https://maven.apache.org/mailing-lists.html
2626
about: Please ask a question or discuss here
27-
28-
- name: Old JIRA Issues
29-
url: https://issues.apache.org/jira/browse/MNG
30-
about: Please search old JIRA issues

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ updates:
2222
schedule:
2323
interval: "daily"
2424

25+
- package-ecosystem: "maven"
26+
directory: "/"
27+
schedule:
28+
interval: "daily"
29+
target-branch: "maven-4.0.x"
30+
labels:
31+
- "mvn40"
32+
- "dependencies"
33+
2534
- package-ecosystem: "maven"
2635
directory: "/"
2736
schedule:
@@ -36,6 +45,15 @@ updates:
3645
schedule:
3746
interval: "daily"
3847

48+
- package-ecosystem: "github-actions"
49+
directory: "/"
50+
schedule:
51+
interval: "daily"
52+
target-branch: "maven-4.0.x"
53+
labels:
54+
- "mvn40"
55+
- "dependencies"
56+
3957
- package-ecosystem: "github-actions"
4058
directory: "/"
4159
schedule:

.github/release-drafter-3.x.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
# under the License.
1717

1818
_extends: maven-gh-actions-shared:.github/release-drafter.yml
19+
tag-template: maven-$RESOLVED_VERSION

.github/release-drafter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# under the License.
1717

1818
_extends: maven-gh-actions-shared
19+
tag-template: maven-$RESOLVED_VERSION
1920

2021
include-pre-releases: true
2122
prerelease: true

.github/workflows/maven.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Set up JDK
34-
uses: actions/setup-java@v4
34+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
3535
with:
3636
java-version: 17
3737
distribution: 'temurin'
3838

3939
- name: Checkout maven
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4141
with:
4242
persist-credentials: false
4343

@@ -49,7 +49,7 @@ jobs:
4949
cp .github/ci-mimir-daemon.properties ~/.mimir/daemon.properties
5050
5151
- name: Handle Mimir caches
52-
uses: actions/cache@v4
52+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
5353
with:
5454
path: ~/.mimir/local
5555
key: mimir-${{ runner.os }}-initial-${{ hashFiles('**/pom.xml') }}
@@ -70,7 +70,7 @@ jobs:
7070
run: ls -la apache-maven/target
7171

7272
- name: Upload Maven distributions
73-
uses: actions/upload-artifact@v4
73+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
7474
with:
7575
name: maven-distributions
7676
path: |
@@ -87,7 +87,7 @@ jobs:
8787
java: ['17', '21', '24']
8888
steps:
8989
- name: Set up JDK ${{ matrix.java }}
90-
uses: actions/setup-java@v4
90+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
9191
with:
9292
java-version: ${{ matrix.java }}
9393
distribution: 'temurin'
@@ -105,7 +105,7 @@ jobs:
105105
run: choco install graphviz
106106

107107
- name: Checkout maven
108-
uses: actions/checkout@v4
108+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
109109
with:
110110
persist-credentials: false
111111

@@ -118,7 +118,7 @@ jobs:
118118
cp .github/ci-mimir-daemon.properties ~/.mimir/daemon.properties
119119
120120
- name: Handle Mimir caches
121-
uses: actions/cache@v4
121+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
122122
with:
123123
path: ~/.mimir/local
124124
key: mimir-${{ runner.os }}-full-${{ hashFiles('**/pom.xml') }}
@@ -127,7 +127,7 @@ jobs:
127127
mimir-${{ runner.os }}-
128128
129129
- name: Download Maven distribution
130-
uses: actions/download-artifact@v4
130+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
131131
with:
132132
name: maven-distributions
133133
path: maven-dist
@@ -166,7 +166,7 @@ jobs:
166166
run: mvn site -e -B -V -Preporting
167167

168168
- name: Upload test artifacts
169-
uses: actions/upload-artifact@v4
169+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
170170
if: failure()
171171
with:
172172
name: ${{ github.run_number }}-full-build-artifact-${{ runner.os }}-${{ matrix.java }}
@@ -182,13 +182,13 @@ jobs:
182182
java: ['17', '21', '24']
183183
steps:
184184
- name: Set up JDK ${{ matrix.java }}
185-
uses: actions/setup-java@v4
185+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
186186
with:
187187
java-version: ${{ matrix.java }}
188188
distribution: 'temurin'
189189

190190
- name: Checkout maven
191-
uses: actions/checkout@v4
191+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
192192
with:
193193
persist-credentials: false
194194

@@ -201,7 +201,7 @@ jobs:
201201
cp .github/ci-mimir-daemon.properties ~/.mimir/daemon.properties
202202
203203
- name: Handle Mimir caches
204-
uses: actions/cache@v4
204+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
205205
with:
206206
path: ~/.mimir/local
207207
key: mimir-${{ runner.os }}-its-${{ hashFiles('**/pom.xml') }}
@@ -210,7 +210,7 @@ jobs:
210210
mimir-${{ runner.os }}-
211211
212212
- name: Download Maven distribution
213-
uses: actions/download-artifact@v4
213+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
214214
with:
215215
name: maven-distributions
216216
path: maven-dist
@@ -245,7 +245,7 @@ jobs:
245245
run: mvn install -e -B -V -Prun-its,mimir
246246

247247
- name: Upload test artifacts
248-
uses: actions/upload-artifact@v4
248+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
249249
if: failure()
250250
with:
251251
name: ${{ github.run_number }}-integration-test-artifact-${{ runner.os }}-${{ matrix.java }}

.mvn/maven.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# A hack to pass on this property for Maven 3 as well; Maven 4 supports this property out of the box
2+
-DsessionRootDirectory=${session.rootDirectory}

Jenkinsfile

Lines changed: 21 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,23 @@ pipeline {
66
options {
77
skipDefaultCheckout()
88
durabilityHint('PERFORMANCE_OPTIMIZED')
9-
//buildDiscarder logRotator( numToKeepStr: '60' )
109
disableRestartFromStage()
1110
}
1211
stages {
13-
stage("Parallel Stage") {
14-
parallel {
15-
16-
stage("Build / Test - JDK17") {
17-
agent { node { label 'ubuntu' } }
18-
steps {
19-
timeout(time: 210, unit: 'MINUTES') {
20-
checkout scm
21-
mavenBuild("jdk_17_latest", "-Djacoco.skip=true")
22-
script {
23-
properties([buildDiscarder(logRotator(artifactNumToKeepStr: '5', numToKeepStr: env.BRANCH_NAME == 'master' ? '30' : '5'))])
24-
if (env.BRANCH_NAME == 'master') {
25-
withEnv(["JAVA_HOME=${tool "jdk_17_latest"}",
26-
"PATH+MAVEN=${ tool "jdk_17_latest" }/bin:${tool "maven_3_latest"}/bin",
27-
"MAVEN_OPTS=-Xms4G -Xmx4G -Djava.awt.headless=true"]) {
28-
sh "mvn clean deploy -DdeployAtEnd=true -B"
29-
}
30-
}
31-
}
12+
stage("Build / Test - JDK17") {
13+
agent { node { label 'ubuntu' } }
14+
steps {
15+
timeout(time: 210, unit: 'MINUTES') {
16+
checkout scm
17+
mavenBuild("jdk_17_latest", "")
18+
script {
19+
properties([buildDiscarder(logRotator(artifactNumToKeepStr: '5', numToKeepStr: isDeployedBranch() ? '30' : '5'))])
20+
if (isDeployedBranch()) {
21+
withEnv(["JAVA_HOME=${tool "jdk_17_latest"}",
22+
"PATH+MAVEN=${ tool "jdk_17_latest" }/bin:${tool "maven_3_latest"}/bin",
23+
"MAVEN_OPTS=-Xms4G -Xmx4G -Djava.awt.headless=true"]) {
24+
sh "mvn clean deploy -DdeployAtEnd=true -B"
3225
}
33-
}
34-
}
35-
36-
stage("Build / Test - JDK21") {
37-
agent { node { label 'ubuntu' } }
38-
steps {
39-
timeout(time: 210, unit: 'MINUTES') {
40-
checkout scm
41-
// jacoco is definitely too slow
42-
mavenBuild("jdk_21_latest", "") // "-Pjacoco jacoco-aggregator:report-aggregate-all"
43-
// recordIssues id: "analysis-jdk17", name: "Static Analysis jdk17", aggregatingResults: true, enabledForFailure: true,
44-
// tools: [mavenConsole(), java(), checkStyle(), errorProne(), spotBugs(), javaDoc()],
45-
// skipPublishingChecks: true, skipBlames: true
46-
// recordCoverage id: "coverage-jdk21", name: "Coverage jdk21", tools: [[parser: 'JACOCO',pattern: 'target/site/jacoco-aggregate/jacoco.xml']],
47-
// sourceCodeRetention: 'MODIFIED', sourceDirectories: [[path: 'src/main/java']]
4826
}
4927
}
5028
}
@@ -53,8 +31,13 @@ pipeline {
5331
}
5432
}
5533

34+
boolean isDeployedBranch() {
35+
return env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'maven-4.0.x' || env.BRANCH_NAME == 'maven-3.9.x'
36+
}
37+
5638
/**
5739
* To other developers, if you are using this method above, please use the following syntax.
40+
* By default this method does NOT execute ITs anymore, just "install".
5841
*
5942
* mavenBuild("<jdk>", "<profiles> <goals> <plugins> <properties>"
6043
*
@@ -65,21 +48,15 @@ def mavenBuild(jdk, extraArgs) {
6548
script {
6649
try {
6750
withEnv(["JAVA_HOME=${tool "$jdk"}",
68-
"PATH+MAVEN=${ tool "$jdk" }/bin:${tool "maven_3_latest"}/bin",
51+
"PATH+MAVEN=${tool "$jdk"}/bin:${tool "maven_3_latest"}/bin",
6952
"MAVEN_OPTS=-Xms4G -Xmx4G -Djava.awt.headless=true"]) {
70-
sh "mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper -Dmaven=3.9.9"
71-
sh "./mvnw clean install -B -U -e -DskipTests -PversionlessMavenDist -V -DdistributionTargetDir=${env.WORKSPACE}/.apache-maven-master"
72-
// we use two steps so that we can cache artifacts downloaded from Maven Central repository
73-
// without installing any local artifacts to not pollute the cache
74-
sh "echo package Its"
75-
sh "./mvnw package -DskipTests -e -B -V -Prun-its -Dmaven.repo.local=${env.WORKSPACE}/.repository/cached"
53+
sh "mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper -Dmaven=3.9.10"
7654
sh "echo run Its"
77-
sh "./mvnw install -Pci $extraArgs -Dmaven.home=${env.WORKSPACE}/.apache-maven-master -e -B -V -Prun-its -Dmaven.repo.local=${env.WORKSPACE}/.repository/local -Dmaven.repo.local.tail=${env.WORKSPACE}/.repository/cached"
55+
sh "./mvnw -e -B -V install $extraArgs"
7856
}
7957
}
8058
finally {
8159
junit testResults: '**/target/test-results-surefire/*.xml', allowEmptyResults: true
8260
}
8361
}
8462
}
85-
// vim: et:ts=2:sw=2:ft=groovy

apache-maven/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ under the License.
2323
<parent>
2424
<groupId>org.apache.maven</groupId>
2525
<artifactId>maven</artifactId>
26-
<version>4.0.0-rc-4-SNAPSHOT</version>
26+
<version>4.1.0-SNAPSHOT</version>
2727
</parent>
2828

2929
<artifactId>apache-maven</artifactId>

apache-maven/src/assembly/maven/conf/maven.properties renamed to apache-maven/src/assembly/maven/conf/maven-system.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
#
1919

2020
#
21-
# Maven user properties
21+
# Maven system properties
2222
#
2323
# The properties defined in this file will be made available through
24-
# user properties at the very beginning of Maven's boot process.
24+
# system properties at the very beginning of Maven's boot process.
2525
#
2626

2727
maven.installation.conf = ${maven.home}/conf
@@ -31,8 +31,8 @@ maven.project.conf = ${session.rootDirectory}/.mvn
3131
# Comma-separated list of files to include.
3232
# Each item may be enclosed in quotes to gracefully include spaces. Items are trimmed before being loaded.
3333
# If the first character of an item is a question mark, the load will silently fail if the file does not exist.
34-
${includes} = ?"${maven.user.conf}/maven.properties", \
35-
?"${maven.project.conf}/maven.properties"
34+
${includes} = ?"${maven.user.conf}/maven-system.properties", \
35+
?"${maven.project.conf}/maven-system.properties"
3636

3737
#
3838
# Settings
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
#
21+
# Maven user properties
22+
#
23+
# The properties defined in this file will be made available through
24+
# user properties at the very beginning of Maven's boot process.
25+
#
26+
27+
# Comma-separated list of files to include.
28+
# Each item may be enclosed in quotes to gracefully include spaces. Items are trimmed before being loaded.
29+
# If the first character of an item is a question mark, the load will silently fail if the file does not exist.
30+
${includes} = ?"${maven.user.conf}/maven-user.properties", \
31+
?"${maven.project.conf}/maven-user.properties"

0 commit comments

Comments
 (0)