maven pom.xml写标签<pluign>直接标红
现在使用的是pom.xml-4.0.0
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<pluginRepositories></pluginRepositories>
<groupId>org.example</groupId>
<artifactId>exe-demo</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<plugin>
原来的代码会在标红
</plugin>
</project>
修改后:需要<bulid> 和<plugin> 标签
(喵的我看别人导入插件都是直接<plugin> 标签,我一个新手我哪知道,找半天解决办法,后来我还是看提示去官网看的文档才知道,知道一早就去看了,哎,写个blog吐槽一下,避坑!)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<pluginRepositories></pluginRepositories>
<groupId>org.example</groupId>
<artifactId>exe-demo</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
</plugin>
</plugins>
</build>
</project>