maven项目出现红叉

 现象:maven项目出现红叉,同时项目中没出现代码错误

 解决方案:

  可尝试在本地maven项目pom.xml中添加如下:

<build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.6.2</version>
            <configuration>
              <source>1.7</source>
              <target>1.7</target>
            </configuration>
          </plugin>
        </plugins>
  </build>

猜你喜欢

转载自www.cnblogs.com/focusHots/p/11718810.html