When I build my project, I run this command :
mvn clean package
I'd like the resulting jar file built in the default target directory, during the package
phase, be copied in another directory.
How can I do this with Maven?
By default the folder declared in Super POM, that have been inherited by your pom.
<build>
<directory>${project.basedir}/target</directory>
</build>
You can change it in your pom.xml the next way:
<build>
<directory>${project.basedir}/yourFolder</directory>
</build>