Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'temurin'

- name: Checkout maven
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Do you like Apache Maven? Then [donate back to the ASF](https://www.apache.org/f
Quick Build
-------
If you want to bootstrap Maven, you'll need:
- Java 17+
- Java 21+
- Maven 3.6.3 or later
- Run Maven, specifying a location into which the completed Maven distro should be installed:
```
Expand Down
2 changes: 1 addition & 1 deletion apache-maven/src/assembly/maven/bin/mvn
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ else
fi

if ! "$JAVACMD" --enable-native-access=ALL-UNNAMED -version >/dev/null 2>&1; then
echo "Error: Apache Maven 4.x requires Java 17 or newer to run." >&2
echo "Error: Apache Maven 4.x requires Java 21 or newer to run." >&2
"$JAVACMD" -version >&2
echo "Please upgrade your Java installation or set JAVA_HOME to point to a compatible JDK." >&2
exit 1
Expand Down
4 changes: 2 additions & 2 deletions apache-maven/src/assembly/maven/bin/mvn.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ if not exist "%JAVACMD%" (
goto error
)

@REM Check Java version by testing the Java 17+ flag
@REM Check Java version by testing the Java 21+ flag
"%JAVACMD%" --enable-native-access=ALL-UNNAMED -version >nul 2>&1
if ERRORLEVEL 1 (
echo Error: Apache Maven 4.x requires Java 17 or newer to run. >&2
echo Error: Apache Maven 4.x requires Java 21 or newer to run. >&2
"%JAVACMD%" -version >&2
echo Please upgrade your Java installation or set JAVA_HOME to point to a compatible JDK. >&2
goto error
Expand Down
2 changes: 1 addition & 1 deletion api/maven-api-model/src/main/mdo/maven.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,7 @@

<p>If a target version, different from the base version, is specified for resources or script files,
then this value modifies the directory where the files will be copied.
For example, if {@code targetVersion} is 17, then the {@code foo/bar.properties}
For example, if {@code targetVersion} is 21, then the {@code foo/bar.properties}
resource file will be copied as {@code META-INF/versions/17/foo/bar.properties}.</p>

<p>This element can be combined with the {@code module} element for specifying sources,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.release>21</maven.compiler.release>
</properties>
</profile>
</profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ void testSingleMojoNoPom() throws Exception {
verifier.execute();
verifier.verifyErrorFreeLog();

// Example output on my Linux Box w/ Java 17
// Example output on my Linux Box w/ Java 21
// The following profiles are active:
//
// - settings-active-default (source: external)
// - settings-active (source: external)
// - settings-jdk-8 (source: external)
// - settings-jdk-11 (source: external)
// - settings-jdk-17 (source: external)
// - settings-jdk-21 (source: external)
// - settings-os-unix (source: external)
// - settings-property (source: external)
// - settings-file-exists-present (source: external)
Expand All @@ -69,6 +70,7 @@ void testSingleMojoNoPom() throws Exception {
// - pom-jdk-8 (source: org.apache.maven.its.mng7737:test:0.1)
// - pom-jdk-11 (source: org.apache.maven.its.mng7737:test:0.1)
// - pom-jdk-17 (source: org.apache.maven.its.mng7737:test:0.1)
// - pom-jdk-21 (source: org.apache.maven.its.mng7737:test:0.1)
// - pom-os-unix (source: org.apache.maven.its.mng7737:test:0.1)
// - pom-property (source: org.apache.maven.its.mng7737:test:0.1)
// - pom-file-exists-present (source: org.apache.maven.its.mng7737:test:0.1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>17</release>
<release>21</release>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ under the License.
<jdk>[17,)</jdk>
</activation>
</profile>
<profile>
<id>pom-jdk-21</id>
<activation>
<jdk>[21,)</jdk>
</activation>
</profile>
<profile>
<id>pom-os-unix</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ under the License.
<jdk>[17,)</jdk>
</activation>
</profile>
<profile>
<id>settings-jdk-21</id>
<activation>
<jdk>[21,)</jdk>
</activation>
</profile>
<profile>
<id>settings-os-unix</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>maven-repro</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.release>21</maven.compiler.release>
</properties>
<dependencies>
<dependency>
Expand All @@ -20,7 +20,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<release>17</release>
<release>21</release>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ under the License.

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javaVersion>17</javaVersion>
<javaVersion>21</javaVersion>
<guiceVersion>6.0.0</guiceVersion>
<mavenVersion>4.0.0-beta-5</mavenVersion>
<mavenPluginPluginVersion>4.0.0-beta-1</mavenPluginPluginVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ under the License.

<properties>
<mavenVersion>4.0.0-rc-2</mavenVersion>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.target>21</maven.compiler.target>
</properties>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ under the License.
</distributionManagement>

<properties>
<javaVersion>17</javaVersion>
<javaVersion>21</javaVersion>
<maven.compiler.source>${javaVersion}</maven.compiler.source>
<maven.compiler.target>${javaVersion}</maven.compiler.target>
<maven.compiler.release>${javaVersion}</maven.compiler.release>
Expand Down Expand Up @@ -880,7 +880,7 @@ under the License.</licenseText>
<configuration>
<rules>
<requireJavaVersion>
<version>[17,)</version>
<version>[21,)</version>
</requireJavaVersion>
<enforceBytecodeVersion>
<maxJdkVersion>${maven.compiler.release}</maxJdkVersion>
Expand Down