You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Karl Heinz Marbaise (Jira)" <ji...@apache.org> on 2023/08/11 18:18:00 UTC
[jira] [Updated] (MDEP-878) Unexpected failure in mappers: no empty replacement or extension possible
[ https://issues.apache.org/jira/browse/MDEP-878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Karl Heinz Marbaise updated MDEP-878:
-------------------------------------
Description:
I have the following configuration:
{code:xml}
<artifactItem>
<groupId>eu.simuline.m2latex</groupId>
<artifactId>latex-maven-plugin</artifactId>
<version>${versionLatexPlugin}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>src/main/resources</outputDirectory>
<includes>.latexmkrc.raw</includes>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
<pattern>c.raw$</pattern>
<replacement>c</replacement>
</org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
</fileMappers>
</artifactItem>
{code}
As you can see, I tricked.
i wanted just to replace `.raw` by the empty string.
This was not possible and I think, an empty replacement is fully valid.
Also I would have used the `FileExtensionMapper`, but also this does not accept an empty extension.
Analogously I think, this should be allowed.
was:
I have the following configuration:
```
<artifactItem>
<groupId>eu.simuline.m2latex</groupId>
<artifactId>latex-maven-plugin</artifactId>
<version>${versionLatexPlugin}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>src/main/resources</outputDirectory>
<includes>.latexmkrc.raw</includes>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
<pattern>c.raw$</pattern>
<replacement>c</replacement>
</org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
</fileMappers>
</artifactItem>
```
As you can see, I tricked.
i wanted just to replace `.raw` by the empty string.
This was not possible and I think, an empty replacement is fully valid.
Also I would have used the `FileExtensionMapper`, but also this does not accept an empty extension.
Analogously I think, this should be allowed.
> Unexpected failure in mappers: no empty replacement or extension possible
> --------------------------------------------------------------------------
>
> Key: MDEP-878
> URL: https://issues.apache.org/jira/browse/MDEP-878
> Project: Maven Dependency Plugin
> Issue Type: New Feature
> Reporter: Ernst Reissner
> Priority: Major
>
> I have the following configuration:
> {code:xml}
> <artifactItem>
> <groupId>eu.simuline.m2latex</groupId>
> <artifactId>latex-maven-plugin</artifactId>
> <version>${versionLatexPlugin}</version>
> <type>jar</type>
> <overWrite>true</overWrite>
> <outputDirectory>src/main/resources</outputDirectory>
> <includes>.latexmkrc.raw</includes>
> <fileMappers>
> <org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
> <pattern>c.raw$</pattern>
> <replacement>c</replacement>
> </org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
> </fileMappers>
> </artifactItem>
> {code}
> As you can see, I tricked.
> i wanted just to replace `.raw` by the empty string.
> This was not possible and I think, an empty replacement is fully valid.
> Also I would have used the `FileExtensionMapper`, but also this does not accept an empty extension.
> Analogously I think, this should be allowed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)