I have the following deploy profiles in my POM
<profile>
<id>deployToProdOnRelease</id>
<activation>
<property>
<name>Maven.project.branch</name>
<value>release</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>upload_and_restart_service</id>
<phase>${cd_phase}</phase>
<configuration>
//upload several files and restart service
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-commons-net</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-jsch</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>jsch</groupId>
<artifactId>jsch</artifactId>
<version>0.1.29</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
</plugin>
</plugins>
</build>
</profile>
</profiles>
I want to deploy the jar from the desktop on this server , what is teh maven command to achieve this?
If I run the following
mvn deploy -Dmaven.project.branch=release
It will pick up the deploy settings from settings.xml and deploy to the repository as well.
So instead can I run the ant tasks in some other phase ? Like install ? Would I just need to change the {cd_phase} to install? and just run mvn install?