Maven copy artifact to different directory than the local repository

The maven-jar-plugin creates the artifacts jar into ${} (by default target/). The maven-install-plugin copies this file to the local Maven repository (by default %user.home%/.m2/repository).

Sometimes it is wanted to additionally copy this artifact into another location. For example to deploy the artifact to a server. Two possibilities come to my mind to solve this problem:

For example, one could copy all *.jar files in the target directory like this:

<description>Copy artifact to another directory</description>

Suggested from me at stackoverflow.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.