Name Type Since Description 默认值
cacheFile File 2.1-alpha-1 包含webapp结构的文件缓存 ${project.build.directory}/war/work/webapp-cache.xml.
outputDirectory String - 用于输出WAR的目录 ${project.build.directory}.
warSourceDirectory File - WAR中包含额外文件的单个目录.这里是你放置JSP文件的地方 ${basedir}/src/main/webapp.
webappDirectory File - 构建webapp的目录 ${project.build.directory}/${project.build.finalName}.
workDirectory File - 解压WAR可选相关内容的目录 ${project.build.directory}/war/work.

war包插件:
既然是web项目,就需要打war包,那就需要这个插件:

     <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<warName>platform</warName>
<webappDirectory>${project.build.directory}/platform</webappDirectory>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>

<encoding>${project.build.sourceEncoding}</encoding>强制字符集编码
<warName>platform</warName>war包名字——platform.war

<webappDirectory>${project.build.directory}/platform</webappDirectory>产生war前,用于存放构建war包的目录——target/platform。

<warSourceDirectory>WebContent</warSourceDirectory>:我把web工程搞成了eclipse下的WTP类型。我不喜欢maven产生的webapp目录,更喜欢WebContent!

maven-war-plugin的更多相关文章

  1. maven jetty plugin

    转载:http://blog.163.com/xueling1231989@126/blog/static/1026408072013101311395492/ 前言: 在 maven 下测试调试时, ...

  2. Maven War包 POM配置文件

    如何为你的Web程序(war包设定配置文件) 约定 http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering ...

  3. 学习Maven之Maven Enforcer Plugin

    1.Maven Enforcer plugin是什么鬼? 在说这个插件是什么前我们先思考这么一个问题:当我们开发人员进入项目组进行开发前,要准备开发环境,而领导总是会强调工具的统一,编译环境的统一.比 ...

  4. [Maven] - Eclipse "maven compiler plugin" 冲突解决

    刚安装最新的Maven 3.2.5,在eclipse中使用maven的Run As->Maven Install,总会提示: Failed to execute goal org.apache. ...

  5. Maven Archetype Plugin

    使用Archetype的一般步骤 命令——mvn archetype:generate 输入命令后,Archetype插件会输出一个Archetype列表供用户选择:选择自己想要使用的Archetyp ...

  6. [Apache Maven Shade Plugin] [example] [001] 官方例子:includes-excludes

    链接地址:[Selecting Contents for Uber JAR](http://maven.apache.org/plugins/maven-shade-plugin/examples/i ...

  7. 施用 maven shade plugin 解决 jar 或类的多版本冲突

    施用 maven shade plugin 解决 jar 或类的多版本冲突   使用 maven shade plugin 解决 jar 或类的多版本冲突java 应用经常会碰到的依赖的三方库出现版本 ...

  8. 解决Maven出现Plugin execution not covered by lifecycle configuration 错误

    http://blog.163.com/xh_ding/blog/static/1939032892015222368827/ 解决Maven出现Plugin execution not covere ...

  9. Jenkins安装maven integration plugin失败解决方法

    最近装了一个jenkins准备搞一个自动化测试的持续集成,但是在安装maven integration这个插件时报错,试了几次都是失败! 错误原因如下: javadoc安装失败: java.io.IO ...

  10. 记录一次maven打包时将test目录下的类打包到jar中,Maven Assembly Plugin的使用

    今天有人问我打包后找不到主类,运行的类写在test中.按照常规,test目录下的文件不会打包到jar包中.(但是我测试一个springboot工程就可以,这里之后再研究) 具体解决如下 第一步:在po ...

随机推荐

  1. iptables基本命令到深入

    1.关闭firewalld,安装iptables-server并启动服务 systemctl stop firewalld systemctl disable firewalld yun -y ins ...

  2. PostgreSQL 循环导出schema的脚本

    需要备份的schema列表 $ cat need_backup_schema.txt pipeline_na_16q3_v4 pipeline_na_16q4_v8 pipeline_na_16q4_ ...

  3. Count Different Palindromic Subsequences

    Given a string S, find the number of different non-empty palindromic subsequences in S, and return t ...

  4. Kubernetes基石-pod容器

    引用三个问题来叙述Kubernetes的pod容器 1.为什么不直接在一个Docker容器中运行所有的应用进程. 2.为什么pod这种容器中要同时运行多个Docker容器(可以只有一个) 3.为什么k ...

  5. Vue.js学习笔记-script标签在head和body的区别

    初学JavaScript,项目需要没有系统学习,只能边查资料边码代码,埋下的坑不知道有多少,还是建议时间充足的情况下系统的将Javascript学习一遍 ,涉及的HTML知识也务必了解. 问题 最开始 ...

  6. pycharm连接mysql是出现Connection to orm02@127.0.0.1 failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.

    下面这个问题反正我是遇到了,也是难为我好几天,于是我决定发一个教程出来给大家看看!希望能帮助你们 原因: 可能是数据库的版本与本机装的驱动不匹配导致的, 解决方案一: 在 url 后面街上一句 因为笔 ...

  7. JWT的认识和session的区别

    1.前后端分离框架中前端和后端域名不同,不能跨域请求,加上移动端无cookie,所以无法使用session.2.基于token的认证和传统的session认证的区别: 传统的session认证: 我们 ...

  8. T100——英文版凭证报表

    范例:cxrr001 效果:增加英文版报表选择 1.azzi301,复制cxrr001_g01,把样板编号改为cxrr001_g01_01: 2.下载cxrr001_g01的GR样板,把cxrr001 ...

  9. nginx-consul-template

    概述Consul-template 是 HashiCorp 基于 Consul 所提供的可扩展的工具,通过监听 Consul中的数据变化,动态地修改一些配置文件中地模板.常用于在 Nginx.HAPr ...

  10. 在Windows平台上运行Tomcat

    从之前的学习中知道,可以调用Bootstrap类将Toomcat作为一个独立的应用程序来运行,在Windows平台上,可以调用startup.bat批处理文件来启动Tomcat,或运行shutdown ...