About Maven's plugin Maven-war-plugin

Source: Internet
Author: User

In the project release, you may encounter this situation, I hope that the project source code to maintain the same premise, you want to be able to target different operating environment to obtain the corresponding running package. (e.g. War pack)

Basic Configuration : (including the configuration of the jar that does not want to enter the war package )

<build><filters><!--filter file, usually a property file (in the form of a name-value pair)--><filter>src/main/webapp/meta-inf/ auto-config.properties</filter><!--<filter>${user.home}/antx.properties</filter>--> </filters><finalName>communitytag</finalName><plugins><plugin><groupId> Org.apache.maven.plugins</groupid><artifactid>maven-war-plugin</artifactid><version> 2.1-alpha-1</version><configuration><!--to filter out the jar that does not want to be punched in. War package, note: This place, the original path should be web-inf/lib/ Anaalyzer-2.0.4.jar, but after many experiments, can not do so, as to what happened, do not understand. Verified by the multi-party no results for the moment, although it seems very ugly, but always solve the problem it--><warsourceexcludes>*/lib/analyzer-2.0.4.jar</warsourceexcludes ><webResources><resource>< the directory of the!--meta-profile, relative to the path of the Pom.xml file--><directory>src/main/webapp/ web-inf</directory><!--whether to filter the file, that is, whether to start Auto-config function--><filtering>true</filtering><! --Target path--><targetpath>web-inf</targetpath></resource></webresouRces></configuration></plugin></plugins></build> 

  

Reference: http://nileader.blog.51cto.com/1381108/449956

Maven-war-plugin Official website: http://maven.apache.org/plugins/maven-war-plugin/

About Maven's plugin Maven-war-plugin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.