Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why first line in pom.xml in spring-boot Application showing error... <?xml version="1.0" encoding="UTF-8"?>

Tags:

spring-boot

<?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>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.5.RELEASE</version>
    </parent>
    <groupId>com.app</groupId>
    <artifactId>Demo</artifactId>
    <version>1.0</version>
    <name>Demo</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>
like image 462
Mahendra Kumar Avatar asked May 30 '19 17:05

Mahendra Kumar


People also ask

How do you fix the first line error in POM xml?

Right click on Springboot Application>>Maven>>update project. The error sign from your pom. xml will go away.

Why am I getting error at parent tag in POM xml?

Just go to Project Tab on Eclipse and Select Clean. Then Eclipse will automatically remove the Maven Dependencies and re-build your project. By then, the error may be gone.

How do I fix POM xml error in eclipse?

Additionally,right click on the pom. xml file in the 'project explorer' > click on 'validate'. This should remove the red-error mark on file, if there are no problems in the XML configuration.

What is the meaning of xml version 1.0 encoding UTF 8?

version="1.0" means that this is the XML standard this file conforms to. encoding="utf-8" means that the file is encoded using the UTF-8 Unicode encoding.


1 Answers

This happening with 2.1.5.RELEASE. Add the following entry to your pom to fix that issue.

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

Why does change from Spring boot version 2.1.4 to 2.1.5 gives unknown configuration Maven error?

like image 53
Atul Kulkarni Avatar answered Oct 02 '22 15:10

Atul Kulkarni