Run the ant target that creates the war file


















We can configure maven-antrun-plugin so that it will copy that war file or ear file into server deployment folder. In my case, I have multi module project and one module is a web module. I should place the the maven-antrun-plugin into web module's pom. If you inspect the above snip of pom. It simply says that "execute this ant target just after the install life cycle phase" of the maven build.

With the execution of ' install ' , maven will the package the whole project into the local repository as a war file or ear file, for use as a dependency in other projects locally. Also this will create the same file in the target directory of your workspace as well. Our target is to copy that file from target director to server deployment folder with the build. Now build the your project or project module. You can navigate to your project directory or project module directory where our modified pom.

Run the following command. You can run that command in root project level which build the entire project, or you can run it for specific project module, which build only that project.

If you are using m2eclipse to build your project, sometime, you may encounter strange scenario as follows. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.

Email Required, but never shown. The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science.

Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Question feed. You could also type ant instead. Both will work,because info is the default target in the build file. Deepti Trivedi. Himanshu Vasishta. Pushpendu Mondal. Ridhi Arora. Manish Gupta. Ant - Build Files Advertisements. Previous Page. Next Page. Useful Video Courses.



0コメント

  • 1000 / 1000