maven pom排序问题

yacmzcpb  于 2021-06-29  发布在  Java
关注(0)|答案(0)|浏览(227)

大家好,在一个javamaven项目中工作,我有一个modelversion,但是当我尝试清理安装pom时,pom给了我一个错误声明

The xml element <modelVersion> should be placed before <parent>

目前,我已经将modelversion放在parent之前,但仍然看到了相同的错误。
聚甲醛:

<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.test.maven</groupId>
        <artifactId>maven-base-pom</artifactId>
        <version>5.3.1</version>
    </parent>

    <groupId>com.test.icdev</groupId>
    <artifactId>test-control-mcl-tests</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>${project.artifactId}</name>
    <url>${dist.site.url}</url>

    <modules>
        <module>common-data-insertion</module>
    </modules>
    <properties>
        <maven.buildNumber.skip>true
        </maven.buildNumber.skip>
        ......
    </properties>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题