Stephan Schroeder
06/22/2022, 12:12 PM<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/main/java</sourceDir>
</sourceDirs>
</configuration>
but what do I do if I have a multi-module project? ${project.basedir}/src/main/kotlin
lacks the module in it's path, doesn't it?Vampire
06/22/2022, 12:38 PMproject.basedir
should be the base dir of the according module.Stephan Schroeder
06/22/2022, 12:48 PM[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (java-compile) on project erezept-lib: Compilation failure
[ERROR] /home/stephan/workspace/erp-modul/erezept-lib/src/main/java/de/gematik/titus/erezept/service/PreconditionService.java:[319,27] error: cannot find symbol
[ERROR] symbol: variable JwtUtil
[ERROR] location: class PreconditionService
JwtUtil
is in the same package as PreconditionService
but in the Kotlin src-root. IntelliJ likes it, but mvn compile
leads to the error msg. I made sure to have the kotlin-maven-plugin right in front of the maven-compiler-plugin.Vampire
06/22/2022, 1:20 PMStephan Schroeder
06/22/2022, 2:45 PMVampire
06/22/2022, 6:00 PMAndreyVanDenHaag
06/23/2022, 5:15 AMStephan Schroeder
06/23/2022, 7:47 AMAndreyVanDenHaag
06/24/2022, 10:34 AMsourceDirs
What is the issue ?Vampire
06/24/2022, 10:39 AMproject.basedir
include the module directory or is it the directory of the parent project
2. why do his Java classes not find the Kotlin classes of the same moduleStephan Schroeder
06/28/2022, 9:22 AM[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (java-compile) on project erezept-lib: Compilation failure
[ERROR] /home/stephan/workspace/erp-modul/erezept-lib/src/main/java/de/gematik/titus/erezept/service/PreconditionService.java:[319,27] error: cannot find symbol
[ERROR] symbol: variable JwtUtil
[ERROR] location: class PreconditionService
PreconditionService
is still a Java-class. JwtUtil
was refactored to Kotlin, and since my config should be ok (but apparently it isn't), it shouldn't be an unfindable symbol during compilation.
When I Strg+click on "JwtUtil" with the the IntelliJ editor window showing the source of PreconditionSerice
, IntelliJ it jumps to the Kotlin file, no problem.