Search code examples
mavenartifact

build-helper-maven-plugin: deploy a file without version indicator


I have a project where I generate a pseudo binary executeable. I want maven to deploy this file alongside with the generated jars.

In general this works, but the deployed file also has a version tag like filename-x.z.y.

I have the following setup:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <version>3.2.0</version>
    <executions>
        <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
                <goal>attach-artifact</goal>
            </goals>
            <configuration>
                <artifacts>
                    <artifact>
                        <file>target/filename</file>
                        <type>.</type>                                  
                    </artifact>
                </artifacts>
            </configuration>
        </execution>
    </executions>
</plugin>

What I need is just filename without the version. Since I can not find any usefull documentation about the plugin I ask here for help.


Solution

  • For artifacts which will be deployed to a maven repository the naming rules are hard. You can not change the given format artifactId-version.Ext ...