简体   繁体   中英

lombok dependency import error in intelliJ

Recently, I am reading Spring In Action . When it came to using lombok dependency, I've got stuck. When I import lombok like it is described in the book:

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <optional>true</optional>
</dependency>

IntelliJ IDEA throws following error:

fail to read artifact descriptor for org.projectlombok:lombok:jar:1.18.8

When I use the latest maven code snippet from the lombok website (which references lombok version 1.18.10, see below) the error is gone.

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.10</version>
    <scope>provided</scope>
</dependency>

But when I switch the lombok version back to 1.18.8 (see snippet below) the above-mentioned error also comes back. Why does this happen?

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.8</version>
    <scope>provided</scope>
</dependency>

It is possible, that your maven can't find the older lombok dependency locally. Try to update your maven project as described here .

If you get further problems with the same error message ( fail to read artifact descriptor ) check out this question .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM