I use vs code and have already installed "Lombok Annotations Support for VS Code". I use maven clear and then compile, and I got Compilation failure. Then when I try maven compile several seconds later, it build success. I do nothing between two maven compilation.
I check the error message, it seems that Lombok annotations don't work.Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile)
[ERROR] symbol: method setName(java.lang.String)
[ERROR] symbol: method setCustomerUrl
ERROR] required: no arguments
And when it build success, I got message
[INFO] Building demo 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ withjpa --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ withjpa --- [INFO] Nothing to compile - all classes are up to date [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS
And my pom.xml is
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <!-- or newer version -->
<configuration>
<source>1.8</source> <!-- depending on your project -->
<target>1.8</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
I am wondering that I should change the plugin version to old version ? But when I change it to 3.1.0 there is CoreException.
Here is my repo : https://github.com/lyl156/backend/blob/master/src/main/java/com/example/withjpa/domain/Category.java