From 31de65134acd0ce7c4c93e1e205bd0152b5a5ed6 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Thu, 6 Aug 2026 19:44:55 +0200 Subject: [PATCH 1/2] Rename the site documents ahead of converting them A pure rename, so that git records it and `git log --follow` and `git blame` still reach the history of each page after the conversion that follows. The content is still APT at this point and the site does not build between the two commits. --- src/site/{apt/index.apt.vm => markdown/index.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/site/{apt/index.apt.vm => markdown/index.md} (100%) diff --git a/src/site/apt/index.apt.vm b/src/site/markdown/index.md similarity index 100% rename from src/site/apt/index.apt.vm rename to src/site/markdown/index.md From 85bb12f0b75abbb53e58e70fe0c016cf91378b5c Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Thu, 6 Aug 2026 19:44:55 +0200 Subject: [PATCH 2/2] Port the index page from APT to Markdown Converted with doxia-converter and then cleaned up by hand: - <<>> becomes backticks, <> becomes **bold**, {{{url}text}} becomes [text](url) - the ASF license header becomes a single block HTML comment - the page needs no Velocity, so it is a plain .md and the title, which was ${project.name}, is now spelled out Verified by building the site before and after: the rendered page is unchanged apart from / becoming / and quotes in prose picking up the Markdown module's typographic substitution. --- src/site/markdown/index.md | 100 +++++++++++++++---------------------- 1 file changed, 41 insertions(+), 59 deletions(-) diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index 7b34e2a..2b8e734 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -1,46 +1,35 @@ - ------ - Introduction - ------ - Dennis Lundberg - ------ - 2013-08-09 - ------ - - ~~ Licensed to the Apache Software Foundation (ASF) under one - ~~ or more contributor license agreements. See the NOTICE file - ~~ distributed with this work for additional information - ~~ regarding copyright ownership. The ASF licenses this file - ~~ to you under the Apache License, Version 2.0 (the - ~~ "License"); you may not use this file except in compliance - ~~ with the License. You may obtain a copy of the License at - ~~ - ~~ http://www.apache.org/licenses/LICENSE-2.0 - ~~ - ~~ Unless required by applicable law or agreed to in writing, - ~~ software distributed under the License is distributed on an - ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~~ KIND, either express or implied. See the License for the - ~~ specific language governing permissions and limitations - ~~ under the License. - -${project.name} - - These classes originate from the file name mapping code in the Maven WAR Plugin. - - The goal is to provide a shared component for all plugins that need to do - mapping. - - -* MappingUtils - - This class has a single method, <<>>, that takes an - expression and an <<>> as parameters. It returns a <<>> - which is the result of interpolating the values from the <<>> - object into the expression. - - Here is a bit of code from the WAR Plugin showing how you can use it: - -+----- + + +# Apache Maven Mapping + +These classes originate from the file name mapping code in the Maven WAR Plugin. + +The goal is to provide a shared component for all plugins that need to do mapping. + +## MappingUtils + +This class has a single method, `evaluateFileNameMapping`, that takes an expression and an `Artifact` as parameters. It returns a `String` which is the result of interpolating the values from the `Artifact` object into the expression. + +Here is a bit of code from the WAR Plugin showing how you can use it: + +```unknown protected String getFileName( Artifact artifact ) { if ( getOutputFileNameMapping() != null ) @@ -62,27 +51,20 @@ ${project.name} return MappingUtils.evaluateFileNameMapping( MappingUtils.DEFAULT_FILE_NAME_MAPPING, artifact ); } } -+----- - - Have a look at the - {{{http://maven.apache.org/plugins/maven-war-plugin/examples/file-name-mapping.html}documentation for Maven WAR Plugin}} - for some examples of expressions that can be used. - -* DashClassifierValueSource +``` - This is an implementation of the <<>> interface, and can be used - for interpolation. <<>> uses it internally. It adds these two - tokens to an <<>>: +Have a look at the [documentation for Maven WAR Plugin](http://maven.apache.org/plugins/maven-war-plugin/examples/file-name-mapping.html) for some examples of expressions that can be used. - * <<>> +## DashClassifierValueSource - * <<>> +This is an implementation of the `ValueSource` interface, and can be used for interpolation. `MappingUtils` uses it internally. It adds these two tokens to an `Interpolator`: - [] +- `dashClassifier` +- `dashClassifier?` - You can invoke it like this: +You can invoke it like this: -+----- +```unknown Interpolator interpolator = StringSearchInterpolator()); interpolator.addValueSource( new DashClassifierValueSource( artifact.getClassifier() ) ); -+----- +```