Maven 3 – How to deploy a WAR package

When you are using an auto deploy directory of an application server have you ever wondered how much time you waste while switching through windows while building and deploying web application while working on it? You can easily configure maven 3 to deploy WAR application package after it has been created. Just enter following code in your pom.xml file.
Replace [PACKAGE_FILE_NAME] with your WAR package name.
Replace [APPSERVER_AUTO_DEPLOY_DIRECTORY] with a path to your app servers auto deploy directory.


                            <copy file="target/[PACKAGE_FILE_NAME]"
                                todir="[APPSERVER_AUTO_DEPLOY_DIRECTORY]" />

This configuration is copying application package file to your application servers auto deploy directory.

One Response to "Maven 3 – How to deploy a WAR package"

  1. TUSHAR PATEL says:

    Thanks It is work for me.


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply to TUSHAR PATEL Cancel reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>