Home  >  Q&A  >  body text

myeclipse - When creating a maven project, the maven requires java 1.6 or newer error message is reported?

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.

大家讲道理大家讲道理2712 days ago753

reply all(2)I'll reply

  • 阿神

    阿神2017-05-17 10:08:28

    Add another plugin maven-compile-plugin to make 1.6

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-17 10:08:28

    <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

    reply
    0
  • Cancelreply