<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>deploy</phase>
<configuration>
<target>
<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar" todir="${project.basedir}/../server/plug
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
After mvn install, I never see the jarfile copied from target/project.jar to ../server/plugins/project.jar.
Why isn't ant running?
Please see the Maven Lifecycle docs to see a list of the phases in Maven's default lifecycle. Note that
deployphase is afterinstall.The above POM shows the plugin execution is bound to the
deployphase, but the command run wasmvn install. So the execution doesn't run.You will either need to run
mvn deploy, or change the phase toinstallor earlier phase, to see this command running.