I have a maven project and I would like maven to place or copy the final jar into a directory other than the project dir, in this case ${user.home}/.dir/, but I get following error:
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/edgelord/.dir/target).
Please verify you invoked Maven from the correct directory. -> [Help 1]
I tried it by modifying the maven-jar-plugin, the required section of my pom looks like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<finalName>e80</finalName>
<outputDirectory>${user.home}/.dir</outputDirectory>
<archive>
<manifest>
<mainClass>de.edgelord.edgyscript.e80.main.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
As you may have noticed, I also want to have the final jar to be called e80.jar