告诉maven,我真的不需要web.xml
<!-- 告诉maven,我真的不需要web.xml --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> <properties> <!-- 文件拷贝时的编码 --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <!-- 编译时的编码 --> <maven.compiler.encoding>UTF-8</maven.compiler.encoding> <!-- jdk编译版本 --> <java.version>1.7</java.version> <!-- 代表项目不需要web.xml --> <failOnMissingWebXml>false</failOnMissingWebXml> </properties>