如题。配置新建的maven项目的pom.xml文件时总报错:Duplicated tag: ‘plugins’ (position: START_TAG seen …\n\n … @52:22)
下面是pom.xml文件
<?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>
<groupId>org.example</groupId>
<artifactId>mr0001</artifactId>
<version>1.0-SNAPSHOT</version>
<name>mr00001</name>
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<hadoop.version>2.7.2</hadoop.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<version>${hadoop.version}</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>
jar-with-dependencies
</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
我自己上网查是说plugins这样的标签重复了,有重复的归到一起就好了。但我就一组,没有重复呀…
要怎么能不报错呢
=2020.5.3上午错误更新=
睡了一觉早上发现,变成artifactId标签重复了…
Duplicated tag: ‘artifactId’ (position: START_TAG seen …\n\n\n\n … @54:33)