创建maven项目的时候,maven文件头报错:

Cannot detect Web Project version. Please specify version of Web Project through <version> configuration property of war plugin. E.g.: <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <version>3.0</version> </configuration> </plugin>

在project标签内加入以下代码即可解决报错:

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<version>3.1</version>
</configuration>
</plugin>
</plugins>
<finalName>webserver</finalName>
</build>

解决Maven web 项目 Cannot detect Web Project version. Please specify version of Web Project through ... 的错误的更多相关文章

  1. maven web 项目中启动报错 Java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

    主要原因是maven项目里面的jar包吗,没有导入到项目中 maven web 项目中启动报错 Java.lang.ClassNotFoundException: org.springframewor ...

  2. 解决maven web项目Cannot detect Web Project version. Please specify version of Web Project through...的错误

    前面已经创建maven web工程,但是问题来了,创建maven web工程之后会出现如下的错误,在pom.xml文件头部 有以下的错误 Description Resource Path Locat ...

  3. eclipse部署maven web项目到tomcat服务器时,没有将lib、web.xml复制过去的解决办法

    我这几天在写项目的时候发现自己以前的项目能够访问,隔一段时间写的这个项目却不能够访问,没有发现代码的逻辑错,但是就是访问不了jsp页面,项目一发布就是出现404错误,后来发现原来是发布到tomcat上 ...

  4. maven web 项目中启动报错java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener

    环境:Groovy/Grails Tool Suite 3.1.0.RELEASE(BASED ON ECLIPSE JUNO 3.8.1).JDK1.6.Maven3.05.Tomcat6 错误描述 ...

  5. 解决Maven管理项目update Maven时,jre自动变为1.5

    本文为博主原创,未经允许不得转载: 在搭建一个maven web项目时,项目已经按步骤搭建完好,之后项目上就报了一个错误. 在控制台看到错误提示如下:Dynamic Web Module 3.0 re ...

  6. eclipse生成的web项目在resin服务器上的发布(不能解析web.xml)

    首先报错误: web项目web.xml文件如下: <?xml version="1.0" encoding="UTF-8"?> <web-ap ...

  7. [JSP]解决Maven创建项目失败

    来源:http://lovespss.blog.51cto.com/1907593/522225 新建Maven项目时遇到这个错误: Unable to create project from arc ...

  8. 解决: maven编译项目报“非法字符: \65279 ”错误

    打包maven项目的时候,出现异常: [INFO] ------------------------------------------------------------------------ [ ...

  9. gradle web项目启动报错: java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener

    严重: Error configuring application listener of class org.springframework.web.util.IntrospectorCleanup ...

随机推荐

  1. MATLAB绘图hist

    刚登上号,已经学了一半了,就从现在开始写吧 以前学过的东西老忘,所以就注册个账号就当做记笔记吧 MATLAB在原来的数组中增加新行 A=[A;B]%B是要增加的行: hist使用方法 y=4*rand ...

  2. Divisor Subtraction

    Description You are given an integer number nn. The following algorithm is applied to it: if n=0, th ...

  3. 完全关闭及再次启动cdh集群

    关闭集群 - 关闭集群所有组件 关闭Cloudera Management Service 关闭cdh所有客户端节点 sudo /opt/cloudera-manager/cm-5.11.1/etc/ ...

  4. sql 约束Check中使用Case函数

    CHECK 约束用于限制列中的值的范围 在Check中使用Case函数在很多情况下都是非常不错的解决方法.可能有很多人根本就不用Check,那么我建议你在看过下面的例子之后也尝试一下在SQL中使用Ch ...

  5. 在win中,给powershell客户端,搭建sshd服务器。

    下载:https://github.com/PowerShell/Win32-OpenSSH/releases     问:为什么要用这个sshd?答:这是微软用,openssh官方的源码,源码网址: ...

  6. Selenium 工作原理

    Selenium是ThoughtWorks公司研发的一个强大的基于浏览器的开源自动化测试工具,它通常用来编写web应用的自动化测试.早期也即Selenium1.x时期主要使用Selenium RC(S ...

  7. CISCO 关闭4786端口解决方法

    先确认交换机是否支持smart install服务 检查命令如下: switch#show vstack config | inc Role Role:Client (SmartInstall ena ...

  8. Redis操作1

    本文章内容节选自<PHP MVC开发实战>一书第16.4.2章节. 一.概述 Redis是一个NoSQL数据库,由于其数据类型的差异,所以要在MVC框架中实现CURD操作,比较繁锁.事实上 ...

  9. C++算法之大数加法计算的代码

    如下代码段是关于C++算法之大数加法计算的代码,希望对大家有用. { int length; int index; int smaller; int prefix = 0; if(NULL == sr ...

  10. 练习 HashSet 去重复

    package com.rf.xs.list; import java.util.HashSet; public class Person { private String name; private ...