slachiewicz opened a new pull request, #65:
URL: https://github.com/apache/maven-executor/pull/65
The only `ExecutorTool`, `ToolboxExecutorTool`, answers `localRepository()`,
`artifactPath()` and `metadataPath()` by running
`eu.maveniverse.maven.plugins:toolbox` through the Maven under test, so every
consumer that needs an artifact path resolves a non-ASF plugin into its test
local repository (#44). This is A7 in #49, and the base that the planned
test-support module (T1) builds `verifyArtifact*` and `deleteArtifacts` on.
`DefaultExecutorTool` computes the same answers without running Maven:
- **Local repository**, in order: a `-Dmaven.repo.local=` argument of the
request (the last one wins, also as `-D maven.repo.local=…`), the same in
`.mvn/maven.config`, the request's `maven.repo.local` JVM system property, this
JVM's `maven.repo.local`, `<localRepository>` of the user settings
(`-s`/`--settings`, else `~/.m2/settings.xml`, with `${user.home}`, `${env.X}`
and system properties interpolated), of the global settings (`-gs`, else
`conf/settings.xml` when the tool is given the installation), and finally
`~/.m2/repository` of the request's user home. A relative path is resolved
against the request's working directory.
- **Paths**, relative to the local repository like the toolbox ones, in the
default layout of Resolver's enhanced local repository manager: `G:A[:E[:C]]:V`
artifacts, including the base-version directory of timestamped snapshots, and
`[G]:[A]:[V]:[type]` metadata with `-local` or `-<repositoryId>` inserted into
the file name.
- `dump()` needs the Maven under test, so it throws; `ToolboxExecutorTool`
stays for that and as the authoritative provider when a split repository, a
custom layout or settings profiles matter. The class Javadoc says so.
Tests:
- `DefaultExecutorToolTest`: 12 unit tests for the lookup order and the
layout, no Maven needed.
- `DefaultExecutorToolMatchesToolboxTest`: runs both tools on Maven 3 and
Maven 4 and asserts the same local repository, artifact paths (jar, pom,
classifier, snapshot, timestamped snapshot, each installed and from a remote)
and metadata paths (group, artifact, version level, local and remote). It
caught one difference while writing this: an installed timestamped snapshot is
named after its base version, a downloaded one keeps the timestamp.
- `mvn verify` passes for the whole reactor.
`module-info` gains `requires java.xml` for reading settings. The class is
`@since 1.1.0`, the target #49 gives A7.
Closes #44
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]