I have custom library which I want to push to my local repository using maven install plugin. I want maven-install-plugin to push this .jar - just as if I would use this command:
mvn install:install-file -Dfile=custom.jar -DgroupId=test -DartifactId=test -Dversion=1.0 -Dpackaging=jar
To achieve this, I created the following pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>smart-card-library-packaging</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>resources/test.jar</file>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
</configuration>
</execution>
</executions>
</plugin>
However, I noticed that when I try to use mvn install:install-file -Dfile=custom.jar -DgroupId=test -DartifactId=test -Dversion=1.0 -Dpackaging=jar
- then the original file (test.jar) is pushed to the repository as it is. And when I user the plugin, it actually creates another test.jar which contains the original one. So the original one is under test-1.0.jar/test.jar and test-1.0.jar is pushed to my repo. However, this is not what as I need just to push the original file to the repo (as if I were running the script above). I tried to remove <packaging>
tag but maven gave an error <packaging>
should be defined. Could someone please give a hint about what's wrong with my configuration?