After a deep research on internet I haven't found the option to install a new artifact into a Maven repository without a file extension.
Up to version 2.5.2 of the Maven Install Plugin it would just get the "packaging" as the artifact file extension, but then I found this on the Apache issues portal: https://issues.apache.org/jira/browse/MINSTALL-121. It actually makes a lot of sense not to use the "packaging" as the file extension, but then I thought I could probably install a new artifact without any extension as my aftifact is actually a binary executable file, and the following is what I got.
I'm generating a file with the following name in my POM file:
<resultFolder>${project.build.directory}${file.separator}bin${file.separator}mac</resultFolder>
<resultName>${project.build.finalName}</resultName>
This file is basically:
/Users/rafaelruizpalacios/go/src/github.com/MidVision/rd/go/bin/mac/rdcli-1.2-SNAPSHOT
Then I have the following in my POM file to install the file into the repository:
<execution>
<id>install-mac</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${project.build.directory}${file.separator}bin${file.separator}mac${file.separator}${project.build.finalName}</file>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}-mac</artifactId>
<version>${project.version}</version>
<packaging>bin</packaging>
</configuration>
</execution>
With the version 2.5.2 of the Maven Install Plugin I would get the file:
/Users/rafaelruizpalacios/.m2/repository/com/midvision/plugins/rdcli-mac/1.2-SNAPSHOT/rdcli-mac-1.2-SNAPSHOT.bin
With the "bin" extension, but now that I'm trying to use the latest version 3.0.1, and considering MINSTALL-121, what I get is:
/Users/rafaelruizpalacios/.m2/repository/com/midvision/plugins/rdcli-mac/1.2-SNAPSHOT/rdcli-mac-1.2-SNAPSHOT.2-SNAPSHOT
It is basically getting the substring after the last dot of the file name, "2-SNAPSHOT", as the file extension.
My question is then: is it just not feasible or recommendable to install artifacts without file extension or is this possibly another issue in the plugin?
Thanks! :-)