Skip to content

Commit 09144bf

Browse files
committed
[Runtime] Embed Maven 3.9.7
1 parent 8c3cbdd commit 09144bf

File tree

5 files changed

+47
-6
lines changed

5 files changed

+47
-6
lines changed

RELEASE_NOTES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Eclipse m2e - Release notes
22

3+
## 2.6.1
4+
5+
* 📅 Release Date: _expected_ beginning of June 2024
6+
7+
### Embedded and use Maven 3.9.7
8+
9+
Updated the embedded Maven from version 3.9.6 to 3.9.7; [Maven 3.9.7 Release Notes](https://maven.apache.org/docs/3.9.7/release-notes.html).
10+
311
## 2.6.0
412

513
* 📅 Release Date: 21th February 2024

org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ReadonlyMavenExecutionRequest.java

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
package org.eclipse.m2e.core.internal.embedder;
1515

1616
import java.io.File;
17+
import java.lang.reflect.InvocationTargetException;
18+
import java.lang.reflect.Method;
1719
import java.util.Collections;
1820
import java.util.Date;
1921
import java.util.List;
@@ -519,7 +521,38 @@ public boolean isUseLegacyLocalRepository() {
519521

520522
@Override
521523
public MavenExecutionRequest setUseLegacyLocalRepository(boolean useLegacyRepository) {
522-
return request.setUseLegacyLocalRepository(useLegacyRepository);
524+
throw new IllegalStateException();
525+
}
526+
527+
private static final Method IS_IGNORE_TRANSITIVE_REPOSITORIES;
528+
static {
529+
Method method = null;
530+
try { // Tycho somehow compiles against the oldest version making compilation fail if methods from new Maven methods are referenced.
531+
method = MavenExecutionRequest.class.getMethod("isIgnoreTransitiveRepositories");
532+
} catch(Exception e) {
533+
}
534+
IS_IGNORE_TRANSITIVE_REPOSITORIES = method;
535+
}
536+
537+
/**
538+
* @deprecated DO NOT CALL to maintain Maven 3.8 compatibility
539+
*/
540+
// @Override
541+
@Deprecated(since = "to maintain compatibility with Maven 3.8")
542+
public boolean isIgnoreTransitiveRepositories() {
543+
if(IS_IGNORE_TRANSITIVE_REPOSITORIES != null) {
544+
try {
545+
return (boolean) IS_IGNORE_TRANSITIVE_REPOSITORIES.invoke(request);
546+
} catch(IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
547+
throw new IllegalStateException(e);
548+
}
549+
}
550+
throw new UnsupportedOperationException();
551+
}
552+
553+
// @Override
554+
public MavenExecutionRequest setIgnoreTransitiveRepositories(boolean ignoreTransitiveRepositories) {
555+
throw new IllegalStateException();
523556
}
524557

525558
@Override
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# To force a version qualifier update add the bug here
2-
Update build-qualifier because maven-runtime version update to Maven 3.9.6
2+
Update build-qualifier because maven-runtime version update to Maven 3.9.7

org.eclipse.m2e.maven.runtime/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
</parent>
2121

2222
<artifactId>org.eclipse.m2e.maven.runtime</artifactId>
23-
<version>3.9.601-SNAPSHOT</version>
23+
<version>3.9.700-SNAPSHOT</version>
2424
<packaging>jar</packaging>
2525

2626
<name>M2E Embedded Maven Runtime (includes Incubating components)</name>
2727

2828
<properties>
2929
<!-- maven core version -->
30-
<maven-core.version>3.9.6</maven-core.version>
30+
<maven-core.version>3.9.7</maven-core.version>
3131
<!-- NOTE: When maven-core.version changes, this may impact the versions of the maven-resolver-*
3232
jars that export the org.eclipse.aether.* packages in the org.eclipse.m2e.maven.runtime
3333
bundle. So make sure the following variable has the value of the maven-resolver-* jars
3434
https://bugs.eclipse.org/bugs/show_bug.cgi?id=529540 -->
35-
<maven-resolver.version>1.9.18</maven-resolver.version>
35+
<maven-resolver.version>1.9.20</maven-resolver.version>
3636
<apache-commons-codec.version>1.16.1</apache-commons-codec.version><!-- Keep in sync with what maven includes-->
3737
<!-- below are m2e-specific addons -->
3838
<plexus-build-api.version>1.2.0</plexus-build-api.version>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<dependency>
103103
<groupId>org.eclipse.m2e</groupId>
104104
<artifactId>org.eclipse.m2e.maven.runtime</artifactId>
105-
<version>3.9.601-SNAPSHOT</version>
105+
<version>3.9.700-SNAPSHOT</version>
106106
</dependency>
107107
</dependencies>
108108

0 commit comments

Comments
 (0)