Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple annotations found error comes when adding dependency in pom.xml while creating spring, hibernate with maven

I am creating a sample project with maven for spring and hibernate. I am very new to this development. After placing the dependency such as

<dependencies>
    <dependency>
        <groupid>org.hibernate</groupid>
        <artifactid>hibernate-core</artifactid>
        <version>3.3.1.GA</version>
    </dependency>

    <dependency>
        <groupid>org.springframework</groupid>
        <artifactid>spring</artifactid>
        <version>${springVersion}</version>
    </dependency>

In eclipse it gives an error as Multiple annotations found at this line:

- Project build error: 'dependencies.dependency.groupId' for null:null:jar is 
 missing.
- Project build error: 'dependencies.dependency.artifactId' for null:null:jar is 
 missing.

I guess, the jar files for spring and hibernate are missing. Can someone let me know how to resolve this issue.

like image 621
sunil Avatar asked May 20 '26 15:05

sunil


1 Answers

Because your pom.xml has the invalid format

It should be

  • <groupId> instead of <groupid>
  • <artifactId> instead of <artifactid>

You can check the correct format of pom.xml at here

like image 163
Ken Chan Avatar answered May 23 '26 08:05

Ken Chan