slachiewicz opened a new issue, #13309:
URL: https://github.com/apache/maven/issues/13309
### Description
Porting the estate to the Maven 4 API (#13302) showed code on the current
Maven 3 lines that is buggy, more complicated than it needs to be, or will make
the later port harder. This issue tracks the changes that can land on the Maven
3 lines now: they behave the same on Maven 3, and each one shrinks or removes
part of the future Maven 4 port. Every item comes from a finished port; its
findings are on #13302.
Kinds: **bug** (found by a port, fix it now), **cleanup**
(behaviour-neutral, smaller port later), **deprecation** (announce now what
Maven 4 removes, so users get a release of warning), **seam** (a small internal
refactor so the port only swaps one method body).
### Status
#### Done
| Repository | Kind | Change | Link |
|---|---|---|---|
| maven-doxia-sitetools | seam | Resolve each site descriptor locale through
one helper | apache/maven-doxia-sitetools#703 |
| maven-doxia-sitetools | seam | Request skin and site descriptor artifacts
from Resolver directly | apache/maven-doxia-sitetools#704 |
| maven-doxia-sitetools | seam | Match skin prerequisites with Resolver's
generic version scheme | apache/maven-doxia-sitetools#706 |
| maven-doxia-sitetools | cleanup | Run `SiteToolTest` offline from a seeded
local repository | apache/maven-doxia-sitetools#702 |
| maven-reporting-impl | cleanup | Replace the deprecated API used in
`AbstractMavenReport` | apache/maven-reporting-impl#251 |
| plexus-archiver | bug | Archivers created without a container can unpack
(`ServiceLoaderArchiverManager`) | codehaus-plexus/plexus-archiver#500 |
| maven-dependency-tree | cleanup | Planned-retirement notice: the Maven 4
port showed it is mostly redundant with Resolver |
apache/maven-dependency-tree#151 |
#### In progress
| Repository | Kind | Change | Link |
|---|---|---|---|
| maven-scm | cleanup | Build an `ScmManager` without Sisu through
`ServiceLoader` | apache/maven-scm#1418 |
| maven-dependency-plugin | cleanup | Replace maven-dependency-tree with
Maven Resolver | apache/maven-dependency-plugin#1712 |
| maven-project-info-reports-plugin | cleanup | Replace
maven-dependency-tree with Maven Resolver |
apache/maven-project-info-reports-plugin#670 |
#### To do
| Repository | Kind | Change |
|---|---|---|
| maven-common-artifact-filters | bug |
`ArtifactTransitivityFilter.transitiveArtifacts` is never initialised, so its
constructor throws `NullPointerException` on the first resolved dependency |
| maven-resolver-ant-tasks | bug | `AntRepoSys.getSettings()` throws
`NullPointerException` when `settings.xml` cannot be read |
| maven-release | bug | The forked build's `release-settings*.xml` is
written with `FileWriter`, in the platform charset, under a UTF-8 header |
| maven-archetype | bug | `DefaultPomManager` merges dependencies in
`HashMap` order |
| maven-enforcer | bug | `EnforcerRuleUtils.resolvePlugins` changes the
effective model's `Plugin` objects in place |
| maven-toolchains-plugin | bug | Toolchain discovery returns nothing when
one JDK cannot be read, instead of skipping that JDK |
| maven-reporting-exec | bug | `setReportPlugins` shares the model's report
list instead of copying it |
| maven-acr-plugin | bug | The user's `excludes` list is changed in place |
| maven-reporting-impl, maven-rar-plugin | cleanup | `${basedir}` →
`${project.basedir}` in parameter defaults of mojos that require a project |
| maven-jdeps-plugin, maven-jmod-plugin, maven-jdeprscan-plugin | cleanup |
Drop the reflection around `ToolchainManager.getToolchains`, which the
interface has |
| maven-archetype, maven-plugin-tools | cleanup | Replace plexus-velocity's
`VelocityComponent` with a plain `VelocityEngine` |
| maven-plugin-tools | cleanup | Unpack sources jars with `java.util.zip`
instead of plexus-archiver's `ArchiverManager` |
| maven-surefire | cleanup | Create plexus-java's `LocationManager` with
`new` instead of injecting it |
| maven-changelog-plugin, maven-toolchains-plugin | cleanup | `@Component` →
`@Inject` |
| several (acr, ejb, rar, reporting-impl, enforcer, release, archetype) |
cleanup | plexus-utils → JDK where the semantics are identical |
| maven-ejb-plugin, maven-rar-plugin | cleanup | Unit tests on JUnit 5
without `AbstractMojoTestCase` |
| maven-rar-plugin | cleanup | An IT with real dependencies: no IT had one,
so a port that copied nothing stayed green |
| maven-reporting-impl | deprecation | Protected fields `reactorProjects`,
`repoSession`, `remoteProjectRepositories`, `siteTool`, `siteRenderer` in
favour of getters; five report plugins read them directly |
| maven-doxia-sitetools | deprecation | `Artifact`-based skin methods in
`SiteRenderer` and `SiteRenderingContext`, with File/Path overloads |
| maven-mapping | deprecation | Document only the file-name tokens that
survive; `ArtifactHandler` tokens such as `@{packaging}@` stop resolving on
Maven 4 |
| maven-plugin-tools | deprecation |
`PluginToolsRequest.get/setRepoSession`,
`PluginHelpGenerator.setVelocityComponent` |
| maven-release | deprecation | `DefaultReleaseManagerListener(Log)` in
favour of slf4j overloads |
| maven-enforcer | deprecation | Make the existing warning for
`EnforcerRule`, `EnforcerRule2` and `EnforcerRuleHelper` name enforcer 4.0.0 as
the removal point |
| maven-gpg-plugin, maven-jarsigner-plugin | deprecation | `settings`
parameters in favour of the session's settings |
| maven-indexer | seam | Replace `ArtifactContext.getPomModel()` with a
small value type (name, description, packaging); indexer-core then drops
`maven-model` and needs no Maven 4 port |
| maven-enforcer, maven-release, maven-archetype | seam | One helper per
repository for the original model and project file |
| maven-release | seam | `Pom*` view interfaces over the DomTrip classes |
| maven-reporting-exec | seam | `coreSession(request)` /
`coreProject(request)` helpers |
| maven-dependency-analyzer | seam | Collect dependencies directly instead
of the `DependencyGraphProject extends MavenProject` workaround |
| maven-scm-publish-plugin | seam | Inline `getConfiguredRepository` with an
injected `SettingsDecrypter` and drop maven-release-manager |
#### Not now
These wait for an API request on #13302 and must not be deprecated before a
replacement exists: maven-common-artifact-filters `actTransitively`;
maven-dependency-tree premanaged getters and collector setters; enforcer rules
`requireUpperBoundDeps`, `banDynamicVersions` and `requireProfileIdsExist`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]