• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Maven项目配置依赖时报错Duplicated tag: ‘plugins‘...不会解决

武飞扬头像
def_skylly
帮助1

如题。配置新建的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)
学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhghbfge
系列文章
更多 icon
同类精品
更多 icon
继续加载