I have this task for the project with 4 nested subprojects using Maven:
Below POM will help to copy jar's file from project build directory to remote SFTP/FTP server.
Since I want to pass password from command prompt for security reason, I have used -Dftp.password=password After execution of above command all the jar files from maven project target folder will be deployed in MAVEN folder on server.com
org.apache.maven.plugins
maven-antrun-plugin
ftp
install
run
org.apache.ant
ant-jsch
1.9.4