Closed voduku closed 3 years ago
Hello, first you need to run mvn initialize. It installs unshaded Lombok to local maven repository.
I just tried that but it didn't fix it. Below is a picture
Can you build the project with command line according to instructions? Have you tried to refresh maven deps in IDEA after running mvn initialize?
that button
Yea I tried following your instruction first before asking here. I just tried reload as well. Is you project strucutre anything special?
Could you please clarify, if you you successfully build the project with command line?
Sorry, the project failed at lombok-presence-checker-test when running mvn clean install. The method has... wasn't generated
Could you please provide me with maven log? Starting with mvn initialize and then mvn clean install?
Here are the logs. Also, since com.sun.tools:javac
is not maven central, I have to add
<compilerArgs>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
</compilerArgs>
PS D:\git\lombok-presence-checker> mvn initialize
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.projectlombok:lombok-unshaded:jar:1.18.16
[WARNING] 'version' contains an expression but should be a constant. @ org.projectlombok:lombok-unshaded:${lombok.version}, D:\git\lombok-presence-checker\lombok-unshaded\pom.xml, line 14, column 14
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] lombok-presence-checker [pom]
[INFO] lombok-unshaded [jar]
[INFO] lombok-presence-checker [jar]
[INFO] lombok-presence-checker-test [jar]
[INFO]
[INFO] ------< com.github.kokorin.lombok:lombok-presence-checker-parent >------
[INFO] Building lombok-presence-checker 0.0.1 [1/4]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] -----------------< org.projectlombok:lombok-unshaded >------------------
[INFO] Building lombok-unshaded 1.18.16 [2/4]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] ---------< com.github.kokorin.lombok:lombok-presence-checker >----------
[INFO] Building lombok-presence-checker 0.0.1 [3/4]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- download-maven-plugin:1.3.0:wget (default) @ lombok-presence-checker ---
[INFO] File already exist, skipping
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install-file (install-javac-tools) @ lombok-presence-checker ---
[INFO] pom.xml not found in javac-1.6.0.18.jar
[INFO] Installing D:\git\lombok-presence-checker\lombok-presence-checker\target\download\javac-1.6.0.18.jar to C:\Users\doxua\.m2\repository\com\sun\tools\javac\1.6.0.18\javac-1.6.0.18.jar
[INFO]
[INFO] -------< com.github.kokorin.lombok:lombok-presence-checker-test >-------
[INFO] Building lombok-presence-checker-test 0.0.1 [4/4]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] lombok-presence-checker 0.0.1 ...................... SUCCESS [ 0.008 s]
[INFO] lombok-unshaded 1.18.16 ............................ SUCCESS [ 0.006 s]
[INFO] lombok-presence-checker 0.0.1 ...................... SUCCESS [ 0.561 s]
[INFO] lombok-presence-checker-test 0.0.1 ................. SUCCESS [ 0.006 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.705 s
[INFO] Finished at: 2021-06-19T13:57:09-04:00
[INFO] ------------------------------------------------------------------------
PS D:\git\lombok-presence-checker> mvn clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.projectlombok:lombok-unshaded:jar:1.18.16
[WARNING] 'version' contains an expression but should be a constant. @ org.projectlombok:lombok-unshaded:${lombok.version}, D:\git\lombok-presence-checker\lombok-unshaded\pom.xml, line 14, column 14
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] lombok-presence-checker [pom]
[INFO] lombok-unshaded [jar]
[INFO] lombok-presence-checker [jar]
[INFO] lombok-presence-checker-test [jar]
[INFO]
[INFO] ------< com.github.kokorin.lombok:lombok-presence-checker-parent >------
[INFO] Building lombok-presence-checker 0.0.1 [1/4]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ lombok-presence-checker-parent ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ lombok-presence-checker-parent ---
[INFO] Installing D:\git\lombok-presence-checker\pom.xml to C:\Users\doxua\.m2\repository\com\github\kokorin\lombok\lombok-presence-checker-parent\0.0.1\lombok-presence-checker-parent-0.0.1.pom
[INFO]
[INFO] -----------------< org.projectlombok:lombok-unshaded >------------------
[INFO] Building lombok-unshaded 1.18.16 [2/4]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ lombok-unshaded ---
[INFO] Deleting D:\git\lombok-presence-checker\lombok-unshaded\target
[INFO]
[INFO] --- maven-dependency-plugin:2.8:unpack (unpack-lombok) @ lombok-unshaded ---
[INFO] Configured Artifact: org.projectlombok:lombok:?:jar
[INFO] Unpacking C:\Users\doxua\.m2\repository\org\projectlombok\lombok\1.18.16\lombok-1.18.16.jar to D:\git\lombok-presence-checker\lombok-unshaded\target\unpack with includes "" and excludes ""
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ lombok-unshaded ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\git\lombok-presence-checker\lombok-unshaded\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ lombok-unshaded ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (unshade-lombok) @ lombok-unshaded ---
[INFO] Executing tasks
main:
[copy] Copying 770 files to D:\git\lombok-presence-checker\lombok-unshaded\target\classes
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ lombok-unshaded ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\git\lombok-presence-checker\lombok-unshaded\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ lombok-unshaded ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ lombok-unshaded ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ lombok-unshaded ---
[INFO] Building jar: D:\git\lombok-presence-checker\lombok-unshaded\target\lombok-unshaded-1.18.16.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ lombok-unshaded ---
[INFO] Installing D:\git\lombok-presence-checker\lombok-unshaded\target\lombok-unshaded-1.18.16.jar to C:\Users\doxua\.m2\repository\org\projectlombok\lombok-unshaded\1.18.16\lombok-unshaded-1.18.16.jar
[INFO] Installing D:\git\lombok-presence-checker\lombok-unshaded\pom.xml to C:\Users\doxua\.m2\repository\org\projectlombok\lombok-unshaded\1.18.16\lombok-unshaded-1.18.16.pom
[INFO]
[INFO] ---------< com.github.kokorin.lombok:lombok-presence-checker >----------
[INFO] Building lombok-presence-checker 0.0.1 [3/4]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ lombok-presence-checker ---
[INFO] Deleting D:\git\lombok-presence-checker\lombok-presence-checker\target
[INFO]
[INFO] --- download-maven-plugin:1.3.0:wget (default) @ lombok-presence-checker ---
[INFO] Got from cache: C:\Users\doxua\.m2\repository\.cache\download-maven-plugin\javac-1.6.0.18.jar_52ce2aeffbc3d5e21092598f0d0b025e
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install-file (install-javac-tools) @ lombok-presence-checker ---
[INFO] pom.xml not found in javac-1.6.0.18.jar
[INFO] Installing D:\git\lombok-presence-checker\lombok-presence-checker\target\download\javac-1.6.0.18.jar to C:\Users\doxua\.m2\repository\com\sun\tools\javac\1.6.0.18\javac-1.6.0.18.jar
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ lombok-presence-checker ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ lombok-presence-checker ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to D:\git\lombok-presence-checker\lombok-presence-checker\target\classes
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (shade-lombok-classes) @ lombok-presence-checker ---
[INFO] Executing tasks
main:
[move] Moving 4 files to D:\git\lombok-presence-checker\lombok-presence-checker\target\classes
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ lombok-presence-checker ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\git\lombok-presence-checker\lombok-presence-checker\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ lombok-presence-checker ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ lombok-presence-checker ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ lombok-presence-checker ---
[INFO] Building jar: D:\git\lombok-presence-checker\lombok-presence-checker\target\lombok-presence-checker-0.0.1.jar
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ lombok-presence-checker ---
[INFO] Installing D:\git\lombok-presence-checker\lombok-presence-checker\target\lombok-presence-checker-0.0.1.jar to C:\Users\doxua\.m2\repository\com\github\kokorin\lombok\lombok-presence-checker\0.0.1\lombok-presence-checker-0.0.1
.jar
[INFO] Installing D:\git\lombok-presence-checker\lombok-presence-checker\pom.xml to C:\Users\doxua\.m2\repository\com\github\kokorin\lombok\lombok-presence-checker\0.0.1\lombok-presence-checker-0.0.1.pom
[INFO]
[INFO] -------< com.github.kokorin.lombok:lombok-presence-checker-test >-------
[INFO] Building lombok-presence-checker-test 0.0.1 [4/4]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ lombok-presence-checker-test ---
[INFO] Deleting D:\git\lombok-presence-checker\lombok-presence-checker-test\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ lombok-presence-checker-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\git\lombok-presence-checker\lombok-presence-checker-test\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ lombok-presence-checker-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ lombok-presence-checker-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\git\lombok-presence-checker\lombok-presence-checker-test\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ lombok-presence-checker-test ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to D:\git\lombok-presence-checker\lombok-presence-checker-test\target\test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassAndFieldTest.java:[38,32] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassAndFieldTest.java:[40,31] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerWithMapStructTest.java:[40,31] cannot find symbol
symbol: method hasName()
location: variable dto of type com.github.kokorin.lombok.PresenceCheckerWithMapStructTest.UserDto
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerWithMapStructTest.java:[41,31] cannot find symbol
symbol: method hasValue()
location: variable dto of type com.github.kokorin.lombok.PresenceCheckerWithMapStructTest.UserDto
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerWithMapStructTest.java:[50,30] cannot find symbol
symbol: method hasName()
location: variable dto of type com.github.kokorin.lombok.PresenceCheckerWithMapStructTest.UserDto
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerWithMapStructTest.java:[51,30] cannot find symbol
symbol: method hasValue()
location: variable dto of type com.github.kokorin.lombok.PresenceCheckerWithMapStructTest.UserDto
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnBooleanFieldTest.java:[38,32] cannot find symbol
symbol: method hasBWrapper()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnBooleanFieldTest.java:[40,31] cannot find symbol
symbol: method hasBWrapper()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnBooleanFieldTest.java:[45,32] cannot find symbol
symbol: method hasBPrimitive()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnBooleanFieldTest.java:[47,31] cannot find symbol
symbol: method hasBPrimitive()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnFieldWithSetterTest.java:[33,32] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnFieldWithSetterTest.java:[35,31] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnFieldTest.java:[37,32] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnFieldTest.java:[39,31] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassTest.java:[37,32] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassTest.java:[39,31] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerIsNotGeneratedForGeneratedFieldsTest.java:[57,32] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassWithSetterTest.java:[33,32] cannot find symbol
symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassWithSetterTest.java:[35,31] cannot find symbol
symbol: method hasName()
[INFO] 19 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] lombok-presence-checker 0.0.1 ...................... SUCCESS [ 0.174 s]
[INFO] lombok-unshaded 1.18.16 ............................ SUCCESS [ 3.020 s]
[INFO] lombok-presence-checker 0.0.1 ...................... SUCCESS [ 1.239 s]
[INFO] lombok-presence-checker-test 0.0.1 ................. FAILURE [ 0.795 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.338 s
[INFO] Finished at: 2021-06-19T13:57:58-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:testCompile (default-testCompile) on project lombok-presence-checker-test: Compilation failure: Compilation failure:
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassAndFieldTest.java:[38,32] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassAndFieldTest.java:[40,31] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerWithMapStructTest.java:[40,31] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] location: variable dto of type com.github.kokorin.lombok.PresenceCheckerWithMapStructTest.UserDto
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerWithMapStructTest.java:[41,31] cannot find symbol
[ERROR] symbol: method hasValue()
[ERROR] location: variable dto of type com.github.kokorin.lombok.PresenceCheckerWithMapStructTest.UserDto
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerWithMapStructTest.java:[50,30] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] location: variable dto of type com.github.kokorin.lombok.PresenceCheckerWithMapStructTest.UserDto
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerWithMapStructTest.java:[51,30] cannot find symbol
[ERROR] symbol: method hasValue()
[ERROR] location: variable dto of type com.github.kokorin.lombok.PresenceCheckerWithMapStructTest.UserDto
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnBooleanFieldTest.java:[38,32] cannot find symbol
[ERROR] symbol: method hasBWrapper()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnBooleanFieldTest.java:[40,31] cannot find symbol
[ERROR] symbol: method hasBWrapper()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnBooleanFieldTest.java:[45,32] cannot find symbol
[ERROR] symbol: method hasBPrimitive()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnBooleanFieldTest.java:[47,31] cannot find symbol
[ERROR] symbol: method hasBPrimitive()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnFieldWithSetterTest.java:[33,32] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnFieldWithSetterTest.java:[35,31] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnFieldTest.java:[37,32] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnFieldTest.java:[39,31] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassTest.java:[37,32] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassTest.java:[39,31] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerIsNotGeneratedForGeneratedFieldsTest.java:[57,32] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassWithSetterTest.java:[33,32] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] /D:/git/lombok-presence-checker/lombok-presence-checker-test/src/test/java/com/github/kokorin/lombok/PresenceCheckerOnClassWithSetterTest.java:[35,31] cannot find symbol
[ERROR] symbol: method hasName()
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :lombok-presence-checker-test
Actually, I figured out why it failed. It was because of the processors below. But Intellij is still not picking up lombok-unshade even tho the build is successful
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
Here is the jar file in my .m2 lombok-unshaded-1.18.16.zip
Sorry, I didn't get you: have you solved the issue? If not please provide all info about your set up: jdk version, Lombok version and so on. Also it's not clear where you got mapstruct dependency
My issue is with intellij not detecting lombok-unshaded. I have not fix that issue. I am using jdk 11, lombok 1.18.16, latest intellij. The mapstruct dep that you see is from one of my project. I copied so that it fixed com.sun.tools not avialble in jdk 11
You don't need sun tools, it's required to build.
Actually I don't understand where you have a problem: with lombok-presence checker build or with your project. Actually you don't need to build this project yourself, use maven central dependency.
I am trying to extend your project. not just using it.
Ah, are you able to build original project
No, not with java 11
What JDK do you use? Oracle, Adopt or anything els
I use Oracle jdk-11.0.9
Could you try adopt open jdk 8?
The reason why the build fails is because tools.jar was removed in jdk 9 and I am using 11, But that can be overcome by adding the code below in maven-compiler-plugin
then the build will be successful. Since I want to extend the project, I have to use lombok-unshaded but it is very hard if the IDE (Intellij) can't pick it up as I showed in the picture above where all the lombok imports are red
<compilerArgs>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>--add-exports</arg>
<arg>jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
</compilerArgs>
I found the fix to the IDE issue. To delete .iml files and reimport. Thanks for you help @kokorin
Javac tools is installed at initialize
phase. In your logs I see the following:
[INFO] --- download-maven-plugin:1.3.0:wget (default) @ lombok-presence-checker ---
[INFO] File already exist, skipping
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install-file (install-javac-tools) @ lombok-presence-checker ---
[INFO] pom.xml not found in javac-1.6.0.18.jar
[INFO] Installing D:\git\lombok-presence-checker\lombok-presence-checker\target\download\javac-1.6.0.18.jar to C:\Users\doxua\.m2\repository\com\sun\tools\javac\1.6.0.18\javac-1.6.0.18.jar
It says that javac-1.6.0.18.jar
has already been downloded and installed to Maven repository with
<groupId>com.sun.tools</groupId>
<artifactId>javac</artifactId>
<version>1.6.0.18</version>
At the same time I 100% sure that build & tests pass with JD( 7,8,11 and 14. Check github actions
Sorry, didn't mention you last comment. Glad it works for you.
Hi, I am trying to play with your repo but Intellij can't seem to pick up lombok-unshade in lombok-presence-checker. Every imports are red and I can't figure it out.