I added the following two lines to Gradle and ran Gradle, but I got an error.
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' <--add to
annotationProcessor 'org.projectlombok:lombok:1.18.6' <--add to
}
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>
I don't know which measure I heard, but I did it from top to bottom and finally succeeded.
Check Enable annotation processing. Intellij IDEA -> Preferences -> Compiler -> Annotation Processors
Check Enable annotation processing. File -> Other Settings -> Default Settings -> Compiler -> Annotation Processors
Install the Lombok plugin Intellij IDEA -> Preferences -> Plugins ->Browse Repositories-> Search for "Lombok"-> install plugin -> Apply and restart IDEA
Check Work offline. Intellij IDEA -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle
After the above measures, when I executed the build, the following error occurred.
The following has been added to pom.xml. Reference: https://tyoshikawa1106.hatenablog.com/entry/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>
<!--from here-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.6</version>
<scope>provided</scope>
</dependency>
<!--Add up to here-->
</dependencies>
The build passed successfully.
Recommended Posts