Why am I getting Unknown error in line 1 of pom.xml?

后端 未结 18 1342
悲&欢浪女
悲&欢浪女 2020-12-02 06:43

Getting unknown error at Line 1 in pom.xml in Eclipse IDE. It was working fine till yesterday, but all of a sudden after updating my project from master and aft

相关标签:
18条回答
  • 2020-12-02 07:01

    For me I changed in the parent tag of the pom.xml and it solved it change 2.1.5 to 2.1.4 then Maven-> Update Project

    0 讨论(0)
  • 2020-12-02 07:02

    While I cannot reproduce your error (as none of your team mates can either), I have a suggestion, that might help you.

    Have you heard of the Byte Order Mark? As it appears on line 1 it is a likely candidate for your troubles. Maybe you changed a setting somewhere that somehow leads to the error. This quote from the Wikipedia article is particularly relevant I think:

    BOM use is optional. Its presence interferes with the use of UTF-8 by software that does not expect non-ASCII bytes at the start of a file but that could otherwise handle the text stream.

    0 讨论(0)
  • 2020-12-02 07:03

    Following actions worked for me.

    1.Go to Project in toolbar -> Unchecked "Build Automatically"

    2.In POM File,Downgrade the spring-boot version to 2.1.4 RELEASE.

    3.Right Click on Project name -> Select Maven -> Click on "Update Project". ->OK Wait till all the maven dependency to get downloaded(Need internet).

    0 讨论(0)
  • I updated spring tool suits by going help > check for update.

    0 讨论(0)
  • 2020-12-02 07:05

    answer according to current status

    This issue got fixed:

    Please install the m2e connector for mavenarchiver plugin 0.17.3 from https://download.eclipse.org/m2e-wtp/releases/1.4/


    obsolete answer

    A less profound change than a downgrade from Spring Boot 2.1.5.RELEASE to 2.1.4.RELEASE would be downgrading only the affected Maven JAR Plugin from 3.1.2 to 3.1.1 as long as this bug exists:

    <properties>
        <!-- ... -->
        <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
    </properties>
    
    0 讨论(0)
  • 2020-12-02 07:05

    Add 3.1.1 in to properties like below than fix issue

    <properties>
            <java.version>1.8</java.version>
            <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
    </properties>
    

    Just Update Project => right click => Maven=> Update Project

    0 讨论(0)
提交回复
热议问题