lombok을 Gradle에서 설치할 수 없습니다.
사건
Gradle에 아래와 같은 2행 추가해, Gradle 실행했지만 에러가 나온다.
dependencies {
    compile("org.springframework.boot:spring-boot-starter-web")
    testCompile('org.springframework.boot:spring-boot-starter-test')
    testCompile('com.jayway.jsonpath:json-path')
    compileOnly 'org.projectlombok:lombok:1.18.6' <--追加
    annotationProcessor 'org.projectlombok:lombok:1.18.6' <--追加
}
 오류 1
Warning:<i><b>root project 'complete': Unable to resolve additional project configuration.</b>
Details: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':runtimeClasspath'.
Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download spring-boot-starter-web.jar (org.springframework.boot:spring-boot-starter-web:2.1.3.RELEASE): No cached version available for offline mode</i>
 대책 1
어떤 대책이 들었는지 모르겠지만 위에서부터 순서대로 하고 마지막에 성공했습니다.
dependencies {
    compile("org.springframework.boot:spring-boot-starter-web")
    testCompile('org.springframework.boot:spring-boot-starter-test')
    testCompile('com.jayway.jsonpath:json-path')
    compileOnly 'org.projectlombok:lombok:1.18.6' <--追加
    annotationProcessor 'org.projectlombok:lombok:1.18.6' <--追加
}
Warning:<i><b>root project 'complete': Unable to resolve additional project configuration.</b>
Details: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':runtimeClasspath'.
Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download spring-boot-starter-web.jar (org.springframework.boot:spring-boot-starter-web:2.1.3.RELEASE): No cached version available for offline mode</i>
대책 1
어떤 대책이 들었는지 모르겠지만 위에서부터 순서대로 하고 마지막에 성공했습니다.
Intellij IDEA -> Preferences -> Compiler -> Annotation Processors
 파일 -> 기타 설정 -> 기본 설정 -> 컴파일러 -> 주석 처리기

 Intellij IDEA -> Preferences -> Plugins -> Browse Repositories-> Search for "Lombok"-> install plugin -> Apply and restart IDEA
 Intellij IDEA -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle
 오류 2
위의 조치 후 빌드를 실행하면 다음 오류가 발생했습니다.
 
 대책 2
pom.xml에 다음을 추가했습니다.
참고 : htps : // 조카와 1106. 하테나 bぉg. 코m/엔트리/2015/11/15/220056
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- ここから -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.6</version>
            <scope>provided</scope>
        </dependency>
        <!-- ここまで追加 -->
    </dependencies>
무사히 빌드가 통과했습니다.
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(lombok을 Gradle에서 설치할 수 없습니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/kondoakio/items/606111abf11efa7fc62e
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
pom.xml에 다음을 추가했습니다.
참고 : htps : // 조카와 1106. 하테나 bぉg. 코m/엔트리/2015/11/15/220056
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- ここから -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.6</version>
            <scope>provided</scope>
        </dependency>
        <!-- ここまで追加 -->
    </dependencies>
무사히 빌드가 통과했습니다.
Reference
이 문제에 관하여(lombok을 Gradle에서 설치할 수 없습니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/kondoakio/items/606111abf11efa7fc62e텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)