Visitar URL original
Accept the documented @{token}@ syntax in outputFileNameMapping by slachiewicz · Pull Request #671 · apache/maven-war-plugin · GitHub
Skip to content

Accept the documented @{token}@ syntax in outputFileNameMapping - #671

Merged
slachiewicz merged 1 commit into
4.0.xfrom
agent/file-name-mapping-4x
Oct 26, 2026
Merged

slachiewicz merged 1 commit into
4.0.xfrom
agent/file-name-mapping-4x

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

The Maven 4 port evaluates outputFileNameMapping with StringSearchInterpolator("@{", "}"), so the documented @{token}@ syntax keeps an @ after every token: @{artifactId}@-@{version}@.@{extension}@ becomes lib@-1.0@.jar@. The port had changed the two mapping tests to the undocumented @{artifactId}.@{extension} form, which hid it.

This uses the same FileNameMapping as the Maven 3 line (#670), adapted to the Maven 4 Artifact, restores the documented syntax in those tests, and ports the mapping unit tests. As on the Maven 3 line, the two default mappings become one and each final name is computed once.

Verified: the two WarExplodedMojoTest mapping tests fail on the current 4.0.x code and pass with this change; mvn verify -Prun-its on Maven 4.0.0-rc-7 → 76 tests, 35 ITs, BUILD SUCCESS.

The Maven 4 port evaluated mappings with StringSearchInterpolator("@{", "}"), which leaves an @ after every token of a documented mapping such as @{artifactId}@.@{extension}@. Use the same FileNameMapping as the Maven 3 line.
@slachiewicz slachiewicz added the bug Something isn't working label Oct 26, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review October 26, 2026 14:59
@slachiewicz
slachiewicz merged commit d906bb3 into 4.0.x Oct 26, 2026
11 of 13 checks passed
@slachiewicz
slachiewicz deleted the agent/file-name-mapping-4x branch October 26, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant