Skip to content

Update to Maven 4 - #4219

Draft
laeubi wants to merge 3 commits into
eclipse-tycho:mainfrom
laeubi:mvn4
Draft

Update to Maven 4#4219
laeubi wants to merge 3 commits into
eclipse-tycho:mainfrom
laeubi:mvn4

Conversation

@laeubi laeubi added this to the 5.0 milestone Sep 8, 2024
@github-actions

github-actions Bot commented Sep 8, 2024

Copy link
Copy Markdown

Test Results

  294 files   -   774    294 suites   - 774   10m 1s ⏱️ - 4h 57m 57s
  644 tests  -   777    588 ✅  -   812   42 💤 +21   6 ❌ + 6   8 🔥 + 8 
1 932 runs   - 2 331  1 764 ✅  - 2 433  126 💤 +60  18 ❌ +18  24 🔥 +24 

For more details on these failures and errors, see this check.

Results for commit 54b0c30. ± Comparison against base commit 5abb73e.

This pull request removes 777 tests.
org.eclipse.m2e.pde.target.tests.DependencyExclusionTest[1] ‑ testExclusionOfDifferentVersions()[1]
org.eclipse.m2e.pde.target.tests.DependencyExclusionTest[1] ‑ testExclusionOfDirectAndTransitivRequirement()[1]
org.eclipse.m2e.pde.target.tests.DependencyExclusionTest[1] ‑ testExclusionOfDirectRequirement()[1]
org.eclipse.m2e.pde.target.tests.DependencyExclusionTest[1] ‑ testExclusionOfMultipleVersions()[1]
org.eclipse.m2e.pde.target.tests.DependencyExclusionTest[2] ‑ testExclusionOfDifferentVersions()[2]
org.eclipse.m2e.pde.target.tests.DependencyExclusionTest[2] ‑ testExclusionOfDirectAndTransitivRequirement()[2]
org.eclipse.m2e.pde.target.tests.DependencyExclusionTest[2] ‑ testExclusionOfDirectRequirement()[2]
org.eclipse.m2e.pde.target.tests.DependencyExclusionTest[2] ‑ testExclusionOfMultipleVersions()[2]
org.eclipse.m2e.pde.target.tests.MavenFeatureTest[1] ‑ testFeatureArtifact()[1]
org.eclipse.m2e.pde.target.tests.MavenFeatureTest[1] ‑ testLocationContentFeatureGeneration()[1]
…
This pull request skips 36 tests.
org.eclipse.m2e.pde.target.tests.MavenContentTest ‑ testIncludeProvidedInfinite
org.eclipse.m2e.pde.target.tests.MavenContentTest ‑ testJettyWithInDependencies
org.eclipse.m2e.pde.target.tests.OSGiMetadataGenerationTest ‑ testArtifactWithSignature
org.eclipse.m2e.pde.target.tests.OSGiMetadataGenerationTest ‑ testBadDependencyDirect
org.eclipse.m2e.pde.target.tests.OSGiMetadataGenerationTest ‑ testBadDependencyInChain
org.eclipse.m2e.pde.target.tests.OSGiMetadataGenerationTest ‑ testBadSymbolicName
org.eclipse.m2e.pde.target.tests.OSGiMetadataGenerationTest ‑ testConditionalPackage
org.eclipse.m2e.pde.target.tests.OSGiMetadataGenerationTest ‑ testMissingOptionalDependency
org.eclipse.m2e.pde.target.tests.OSGiMetadataGenerationTest ‑ testNonJarArtifactInDependencies
org.eclipse.m2e.pde.target.tests.OSGiMetadataGenerationTest ‑ testNonOSGiArtifact_missingArtifactGenerate_changedCustomInstructions
…

♻️ This comment has been updated with latest results.

@laeubi
laeubi force-pushed the mvn4 branch 7 times, most recently from d907942 to 7e7357d Compare September 13, 2024 04:29
@laeubi
laeubi force-pushed the mvn4 branch 2 times, most recently from 08df834 to 4d44e7f Compare September 24, 2024 04:45
@laeubi laeubi modified the milestones: 5.0, 6.0 Mar 19, 2025
@laeubi
laeubi force-pushed the mvn4 branch 2 times, most recently from 6ea68db to 6d7133e Compare August 31, 2025 14:12
@laeubi

laeubi commented Aug 31, 2025

Copy link
Copy Markdown
Member Author

/request-license-review

@github-actions

This comment was marked as outdated.

@laeubi

laeubi commented Sep 16, 2025

Copy link
Copy Markdown
Member Author

I was now able to make the codebase actually compile with Maven 4.

@laeubi
laeubi force-pushed the mvn4 branch 2 times, most recently from 059428e to d0d8913 Compare September 16, 2025 14:33
@laeubi
laeubi requested a review from Copilot October 19, 2025 09:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates Tycho to use Maven 4.0.0-rc-4, making it compatible with the next major version of Maven. The update involves adjusting dependency scopes and adding missing transitive dependencies that were previously provided by Maven 3.

Key changes:

  • Updated Maven version from 3.9.11 to 4.0.0-rc-4
  • Removed test scope restrictions from maven-compat dependencies across multiple modules
  • Added explicit dependencies on maven-compat, javax.inject, and DI framework components (Guice, Sisu)

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pom.xml Updates Maven version property to 4.0.0-rc-4
tycho-versions-plugin/pom.xml Removes test scope from maven-compat dependency
tycho-source-plugin/pom.xml Removes test scope from maven-compat dependency
tycho-packaging-plugin/pom.xml Removes test scope from maven-compat dependency
tycho-p2-repository-plugin/pom.xml Removes test scope from maven-compat dependency
tycho-core/pom.xml Removes test scope from maven-compat dependency
tycho-compiler-plugin/pom.xml Removes test scope from maven-compat dependency
tycho-eclipse-plugin/pom.xml Removes test scope and adds javax.inject dependency
tycho-testing-harness/pom.xml Adds maven-core, maven-compat and DI framework dependencies
tycho-targetplatform/pom.xml Adds maven-compat and javax.inject dependencies
tycho-surefire/tycho-surefire-plugin/pom.xml Adds maven-compat dependency
tycho-spi/pom.xml Adds maven-compat dependency
tycho-sbom/pom.xml Adds maven-compat dependency
tycho-repository-plugin/pom.xml Adds maven-compat dependency
tycho-p2-publisher-plugin/pom.xml Adds maven-compat dependency
tycho-p2-director-plugin/pom.xml Adds maven-compat dependency
tycho-extras/tycho-pomless/pom.xml Adds maven-compat dependency
tycho-extras/tycho-pomless/src/main/java/.../TychoPomlessLifecycleParticipant.java Comments out extension warning code and removes unused imports
tycho-extras/tycho-document-bundle-plugin/pom.xml Adds maven-compat dependency
tycho-extras/target-platform-validation-plugin/pom.xml Adds maven-compat dependency
tycho-buildtimestamp-jgit/pom.xml Adds maven-compat dependency
tycho-baseline-plugin/pom.xml Adds maven-compat dependency
p2-maven-plugin/pom.xml Adds maven-compat and javax.inject dependencies with provided scope

@laeubi

laeubi commented Dec 13, 2025

Copy link
Copy Markdown
Member Author

Updated to Maven 4-rc5 as it contains some additional compatibility fixes.

@laeubi

laeubi commented Dec 13, 2025

Copy link
Copy Markdown
Member Author

/request-license-review

laeubi and others added 3 commits August 17, 2026 12:09
Add explicit javax.inject dependency for Maven 4 compatibility (#103)

* Initial plan

* Add javax.inject dependency to fix Maven 4 compilation issues

Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot]
<198982749+Copilot@users.noreply.github.com>
Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>
Fix Maven 4 test failures: Add DynamicImport-Package for p2 repository
factories and Eclipse Aether dependencies (#104)

* Initial plan

* Fix p2 repository factory registration with DynamicImport-Package

Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>

* Add aether-impl dependency for Maven 4 test compatibility

Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>

* Add Eclipse Aether dependencies for Maven 4 compatibility (partial
fix)

Maven 4 rc-5's MavenRepositorySystemUtils.newSession() still references
old
Eclipse Aether classes (org.eclipse.aether.*) but these are not provided
transitively. Added aether-api, aether-util, and aether-impl 1.1.0 to
provide
the base classes. However, ConfigurableVersionSelector is an internal
class
that was never part of public Aether API and cannot be provided without
conflicts. This appears to be a Maven 4 rc-5 bug that should be fixed in
the
final release.

Partial fix for M2E PDE target test failures - core p2 repository
functionality works correctly.

Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot]
<198982749+Copilot@users.noreply.github.com>
Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>
Reference maven-resolver-util directly
@laeubi

laeubi commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

/request-license-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants