-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotation processors not run for hot reload of multi module maven project #10833
Comments
@Postremus Thanks for reporting this! Unfortunately, this is a long standing (unresolved) issue: #1502 |
Sorry, I just realized that you are already using the I'll reopen this so that @aloubyansky can have a look. But I suppose this will be tricky since |
Yes, it's a good one. We need to properly setup the classpath for each module. |
Each module now contains a list of dependencies, so individual class paths are respected. Partially Fixes quarkusio#10833, as this will now work when quarkus:dev is run from the root, but not when it is run from a sub folder. As we currently can't resolve the dependencies of the other project.
Each module now contains a list of dependencies, so individual class paths are respected. Partially Fixes quarkusio#10833, as this will now work when quarkus:dev is run from the root, but not when it is run from a sub folder. As we currently can't resolve the dependencies of the other project.
Each module now contains a list of dependencies, so individual class paths are respected. Partially Fixes quarkusio#10833, as this will now work when quarkus:dev is run from the root, but not when it is run from a sub folder. As we currently can't resolve the dependencies of the other project.
Each module now contains a list of dependencies, so individual class paths are respected. Partially Fixes quarkusio#10833, as this will now work when quarkus:dev is run from the root, but not when it is run from a sub folder. As we currently can't resolve the dependencies of the other project.
Have you ever tried this? |
Closing this one. This is deprecated now that one is supposed to declare annotation processors using the compiler plugin |
If I define the annotationProcessorPaths on the compiler-plugin of different modules, they are not executed by the quarkus dev mode hot reload. If I define my compiler-plugin configuration additionally on the module housing my quarkus-maven-plugin, then the annotation processors are executed for each hot reload. @famod fyi
|
Describe the bug
I have a multi module maven project with the following structure:
project:
The service modul has a provided dependency to an annotation processor - hibernate-jpamodelgen to be exact.
During a normal "mvn compile", the annotation processor is run, and the static metamodel gets generated.
Now, i started dev mode.
If I change one of my entity classes, the annotation processor is not run again during hot reload.
As a workaround, I can add all annotation processors to the "web" project. The are then run correctly during dev mode reload.
Alternatively, I could also change the ap to compile scope in the service project, which hints at class path problems.
Expected behavior
Compilation is done with the correct class path of a specific module. All annotation processors of a module are executed.
Actual behavior
Annotation processor is not run on dev mode hot reload.
To Reproduce
ap-test.zip
mvn clean compile quarkus:dev
on the main project (ap-test), and open http://localhost:8080/hello in your browser[id, ID]
. These are all fields currently in the static metamodel of the ExampleEntity class. The metamodel gets generated by the annotion processor.If you now restart dev mode (
mvn clean compile quarkus:dev
), the change in metamodel is shown.If you change the hibernate-jpamodelgen to compile scope, it is correctly re run on hot reload.
Environment (please complete the following information):
uname -a
orver
:Linux martin 5.4.0-40-generic Arc - request context propagation #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
java -version
:openjdk 11.0.7 2020-04-14 LTS
OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)
1.6.0.Final
mvnw --version
orgradlew --version
):Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/martin/.sdkman/candidates/maven/current
Java version: 11.0.7, vendor: Azul Systems, Inc., runtime: /home/martin/.sdkman/candidates/java/11.0.7-zulu
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-40-generic", arch: "amd64", family: "unix"
The text was updated successfully, but these errors were encountered: