首页 > 技术文章 > maven报错:Cannot detect Web Project version. Please specify version of Web Project through Maven project property

yrxperfect 2017-10-19 14:29 原文

首先你要在build path里面修改你的项目的web version,现在至少都是3.0了,修改以后还需要修改你的jdk版本为1.8,然后在你的pom中指定的webversion

<properties>
        <webVersion>3.0</webVersion>
</properties>

之后加入一下代码:

在pom中加入

<build>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <version>3.0</version>
                </configuration>
            </plugin>
        </plugins>
    </build>

那是因为项目未指定maven war编译插件的错误

推荐阅读