myeclipse - When creating a maven project, the maven requires java 1.6 or newer error message is reported?
大家讲道理
大家讲道理 2017-05-17 10:06:28
0
2
816

My computer is mac myeclipse is 2015 javase-1.7

I right-click to create a maven project->check create a simple project...
Click next
The Group Id entered is com.atguigu
Artifact Id entered is ssm-crud
Packaging: war
Click finish
The generated maven project will have errors directly,
The error is pom.xml

The error reported is:
Cannot detect Web Project version. Please specify version of Web Project through <version> configuration property of war

  1. E.g.: <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <version>3.0</version> </configuration> </
    plugin>

Write in the pom file
<build>

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

</build>
After
update project
After
Report maven requires java 1.6 or newer error

Please give me some advice.

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
阿神

Add another plugin maven-compile-plugin to make 1.6

过去多啦不再A梦

<build>

<plugins>  
    <!-- define the project compile level -->  
    <plugin>  
        <groupId>org.apache.maven.plugins</groupId>  
        <artifactId>maven-compiler-plugin</artifactId>  
        <version>2.3.2</version>  
        <configuration>  
            <source>1.7</source>  
            <target>1.7</target>  
        </configuration>  
    </plugin>  
</plugins>  

</build>There are a lot of questions this evening. If you have any questions, go to Baidu first. If you can’t find the answer, ask again. You can practice your information query skills

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template