Skip to content
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

querybean-generator incremental annotation processing not working in gradle #3404

Open
chenkd opened this issue May 15, 2024 · 8 comments
Open

Comments

@chenkd
Copy link

chenkd commented May 15, 2024

Expected behavior

incremental annotation processing and just compile Main class

Actual behavior

The ebean class is also compiled

Steps to reproduce

Examples used https://github.com/ebean-orm/examples/tree/master/basic-gradle-java
Every time I modify a class that is not related to ebean and compile, it will trigger the enhancement of querybean, causing the ebean class to be recompiled.

This problem greatly affects development efficiency, causing hot deployment to not take effect or be very slow.

Task ':compileJava' is not up-to-date because:
  Input property 'stableSources' file C:\Users\18868\Documents\ckd\project\source\examples\basic-gradle-java\src\main\java\org\example\Main.java has changed.
Created classpath snapshot for incremental compilation in 0.013 secs.
Compiling with toolchain 'C:\Program Files\Java\jdk-17.0.4.1'.
Compiling with JDK Java compiler API.
Incremental compilation of 6 classes completed in 0.91 secs.
Class dependency analysis for incremental compilation took 0.008 secs.
Calling enhancer outputDir:C:\Users\18868\Documents\ckd\project\source\examples\basic-gradle-java\build\generated\sources\annotationProcessor\java\main  extraClassPath:[file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/avaje/composite/logback/1.1/logback-1.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/postgresql/postgresql/42.5.1/postgresql-42.5.1.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean/13.11.0/bc1d9006ceef392f7545a302b19d1d4d25bdf7c4/ebean-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-core/13.11.0/ebean-core-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-core-type/13.11.0/ebean-core-type-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-all/13.11.0/1f08eebf78dbb84c5db6a6b537360be0490fdbab/ebean-platform-all-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-hsqldb/13.11.0/67684e026510420a2239f0ebeb7b357357acd9ff/ebean-platform-hsqldb-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-h2/13.11.0/ebean-platform-h2-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-clickhouse/13.11.0/f179dc70dc6114acdaa8c6e4a3e1e528bae65384/ebean-platform-clickhouse-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-db2/13.11.0/35a56df04f972bd459c145acef913c6ae1f95912/ebean-platform-db2-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-hana/13.11.0/19a00d87abe8f9f1fd4e84bd292ec88c3a8fc555/ebean-platform-hana-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-mariadb/13.11.0/aa05d618c5a094077855ef704a3bd905e21a981e/ebean-platform-mariadb-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-mysql/13.11.0/ebean-platform-mysql-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-nuodb/13.11.0/62e19d272a47483aec213c0a73f2788429519437/ebean-platform-nuodb-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-oracle/13.11.0/9671f0c0a483457e0757cb3961c6e8dc4f5d8278/ebean-platform-oracle-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-postgres/13.11.0/ebean-platform-postgres-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlanywhere/13.11.0/8414ebde9d63848f2c287253e903dee153c8afe3/ebean-platform-sqlanywhere-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlite/13.11.0/e90af0adee226ca4db531efd126f66b5d192bb44/ebean-platform-sqlite-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlserver/13.11.0/cf66a146c35b2b9797708a8a18ada57bce61794/ebean-platform-sqlserver-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-api/13.11.0/ebean-api-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-joda-time/13.11.0/ee02482afa5d0069baf77bf58b27fc5625c74abb/ebean-joda-time-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-jackson-jsonnode/13.11.0/2d9d4405676d1a6c4fca912903b021a699fa0758/ebean-jackson-jsonnode-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-jackson-mapper/13.11.0/708de9b046bdf0704149fd24afd769a54198cb51/ebean-jackson-mapper-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-datasource/8.4/ebean-datasource-8.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-querybean/13.11.0/ebean-querybean-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-applog-slf4j/1.0/avaje-applog-slf4j-1.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-config/2.4/avaje-config-2.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-datasource-api/8.4/ebean-datasource-api-8.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-ddl-runner/2.2/ebean-ddl-runner-2.2.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-applog/1.0/avaje-applog-1.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-lang/1.1/avaje-lang-1.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/persistence-api/3.0/persistence-api-3.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-annotation/8.3/ebean-annotation-8.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-types/3.0/ebean-types-3.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/classpath-scanner/7.1/classpath-scanner-7.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-migration-auto/1.2/ebean-migration-auto-1.2.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-externalmapping-api/13.11.0/ebean-externalmapping-api-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/antlr/antlr4-runtime/4.8-1/antlr4-runtime-4.8-1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/joda-time/joda-time/2.11.1/joda-time-2.11.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/classpath-scanner-api/7.1/classpath-scanner-api-7.1.jar, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/annotationProcessor/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/headers/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/tmp/compileJava/previous-compilation-data.bin, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/annotationProcessor/java/main/]
ebean-agent version:unknown enhancement:141 resources:[META-INF/ebean-version.mf, META-INF/ebean-generated-info.mf]
Calling enhancer outputDir:C:\Users\18868\Documents\ckd\project\source\examples\basic-gradle-java\build\classes\java\main  extraClassPath:[file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/avaje/composite/logback/1.1/logback-1.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/postgresql/postgresql/42.5.1/postgresql-42.5.1.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean/13.11.0/bc1d9006ceef392f7545a302b19d1d4d25bdf7c4/ebean-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-core/13.11.0/ebean-core-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-core-type/13.11.0/ebean-core-type-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-all/13.11.0/1f08eebf78dbb84c5db6a6b537360be0490fdbab/ebean-platform-all-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-hsqldb/13.11.0/67684e026510420a2239f0ebeb7b357357acd9ff/ebean-platform-hsqldb-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-h2/13.11.0/ebean-platform-h2-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-clickhouse/13.11.0/f179dc70dc6114acdaa8c6e4a3e1e528bae65384/ebean-platform-clickhouse-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-db2/13.11.0/35a56df04f972bd459c145acef913c6ae1f95912/ebean-platform-db2-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-hana/13.11.0/19a00d87abe8f9f1fd4e84bd292ec88c3a8fc555/ebean-platform-hana-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-mariadb/13.11.0/aa05d618c5a094077855ef704a3bd905e21a981e/ebean-platform-mariadb-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-mysql/13.11.0/ebean-platform-mysql-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-nuodb/13.11.0/62e19d272a47483aec213c0a73f2788429519437/ebean-platform-nuodb-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-oracle/13.11.0/9671f0c0a483457e0757cb3961c6e8dc4f5d8278/ebean-platform-oracle-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-postgres/13.11.0/ebean-platform-postgres-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlanywhere/13.11.0/8414ebde9d63848f2c287253e903dee153c8afe3/ebean-platform-sqlanywhere-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlite/13.11.0/e90af0adee226ca4db531efd126f66b5d192bb44/ebean-platform-sqlite-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlserver/13.11.0/cf66a146c35b2b9797708a8a18ada57bce61794/ebean-platform-sqlserver-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-api/13.11.0/ebean-api-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-joda-time/13.11.0/ee02482afa5d0069baf77bf58b27fc5625c74abb/ebean-joda-time-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-jackson-jsonnode/13.11.0/2d9d4405676d1a6c4fca912903b021a699fa0758/ebean-jackson-jsonnode-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-jackson-mapper/13.11.0/708de9b046bdf0704149fd24afd769a54198cb51/ebean-jackson-mapper-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-datasource/8.4/ebean-datasource-8.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-querybean/13.11.0/ebean-querybean-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-applog-slf4j/1.0/avaje-applog-slf4j-1.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-config/2.4/avaje-config-2.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-datasource-api/8.4/ebean-datasource-api-8.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-ddl-runner/2.2/ebean-ddl-runner-2.2.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-applog/1.0/avaje-applog-1.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-lang/1.1/avaje-lang-1.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/persistence-api/3.0/persistence-api-3.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-annotation/8.3/ebean-annotation-8.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-types/3.0/ebean-types-3.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/classpath-scanner/7.1/classpath-scanner-7.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-migration-auto/1.2/ebean-migration-auto-1.2.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-externalmapping-api/13.11.0/ebean-externalmapping-api-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/antlr/antlr4-runtime/4.8-1/antlr4-runtime-4.8-1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/joda-time/joda-time/2.11.1/joda-time-2.11.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/classpath-scanner-api/7.1/classpath-scanner-api-7.1.jar, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/annotationProcessor/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/headers/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/tmp/compileJava/previous-compilation-data.bin, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/annotationProcessor/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/]
ebean-agent version:unknown enhancement:141 resources:[META-INF/ebean-version.mf, META-INF/ebean-generated-info.mf]
ebean-enhance> loaded resources [META-INF/ebean-version.mf, META-INF/ebean-generated-info.mf]
ebean-enhance>    QueryBeans (1)  pkgs[org/example/domain/query] beans[QCustomer]
ebean-enhance> Query Callers (1)  pkgs[org/example/domain/finder] beans[CustomerFinder]
Calling enhancer outputDir:C:\Users\18868\Documents\ckd\project\source\examples\basic-gradle-java\build\generated\sources\headers\java\main  extraClassPath:[file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/avaje/composite/logback/1.1/logback-1.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/postgresql/postgresql/42.5.1/postgresql-42.5.1.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean/13.11.0/bc1d9006ceef392f7545a302b19d1d4d25bdf7c4/ebean-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-core/13.11.0/ebean-core-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-core-type/13.11.0/ebean-core-type-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-all/13.11.0/1f08eebf78dbb84c5db6a6b537360be0490fdbab/ebean-platform-all-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-hsqldb/13.11.0/67684e026510420a2239f0ebeb7b357357acd9ff/ebean-platform-hsqldb-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-h2/13.11.0/ebean-platform-h2-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-clickhouse/13.11.0/f179dc70dc6114acdaa8c6e4a3e1e528bae65384/ebean-platform-clickhouse-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-db2/13.11.0/35a56df04f972bd459c145acef913c6ae1f95912/ebean-platform-db2-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-hana/13.11.0/19a00d87abe8f9f1fd4e84bd292ec88c3a8fc555/ebean-platform-hana-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-mariadb/13.11.0/aa05d618c5a094077855ef704a3bd905e21a981e/ebean-platform-mariadb-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-mysql/13.11.0/ebean-platform-mysql-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-nuodb/13.11.0/62e19d272a47483aec213c0a73f2788429519437/ebean-platform-nuodb-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-oracle/13.11.0/9671f0c0a483457e0757cb3961c6e8dc4f5d8278/ebean-platform-oracle-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-postgres/13.11.0/ebean-platform-postgres-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlanywhere/13.11.0/8414ebde9d63848f2c287253e903dee153c8afe3/ebean-platform-sqlanywhere-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlite/13.11.0/e90af0adee226ca4db531efd126f66b5d192bb44/ebean-platform-sqlite-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlserver/13.11.0/cf66a146c35b2b9797708a8a18ada57bce61794/ebean-platform-sqlserver-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-api/13.11.0/ebean-api-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-joda-time/13.11.0/ee02482afa5d0069baf77bf58b27fc5625c74abb/ebean-joda-time-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-jackson-jsonnode/13.11.0/2d9d4405676d1a6c4fca912903b021a699fa0758/ebean-jackson-jsonnode-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-jackson-mapper/13.11.0/708de9b046bdf0704149fd24afd769a54198cb51/ebean-jackson-mapper-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-datasource/8.4/ebean-datasource-8.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-querybean/13.11.0/ebean-querybean-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-applog-slf4j/1.0/avaje-applog-slf4j-1.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-config/2.4/avaje-config-2.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-datasource-api/8.4/ebean-datasource-api-8.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-ddl-runner/2.2/ebean-ddl-runner-2.2.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-applog/1.0/avaje-applog-1.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-lang/1.1/avaje-lang-1.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/persistence-api/3.0/persistence-api-3.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-annotation/8.3/ebean-annotation-8.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-types/3.0/ebean-types-3.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/classpath-scanner/7.1/classpath-scanner-7.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-migration-auto/1.2/ebean-migration-auto-1.2.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-externalmapping-api/13.11.0/ebean-externalmapping-api-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/antlr/antlr4-runtime/4.8-1/antlr4-runtime-4.8-1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/joda-time/joda-time/2.11.1/joda-time-2.11.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/classpath-scanner-api/7.1/classpath-scanner-api-7.1.jar, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/annotationProcessor/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/headers/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/tmp/compileJava/previous-compilation-data.bin, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/annotationProcessor/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/headers/java/main/]
ebean-agent version:unknown enhancement:141 resources:[META-INF/ebean-version.mf, META-INF/ebean-generated-info.mf]
Calling enhancer outputDir:C:\Users\18868\Documents\ckd\project\source\examples\basic-gradle-java\build\tmp\compileJava\previous-compilation-data.bin  extraClassPath:[file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/avaje/composite/logback/1.1/logback-1.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/postgresql/postgresql/42.5.1/postgresql-42.5.1.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean/13.11.0/bc1d9006ceef392f7545a302b19d1d4d25bdf7c4/ebean-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-core/13.11.0/ebean-core-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-core-type/13.11.0/ebean-core-type-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-all/13.11.0/1f08eebf78dbb84c5db6a6b537360be0490fdbab/ebean-platform-all-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-hsqldb/13.11.0/67684e026510420a2239f0ebeb7b357357acd9ff/ebean-platform-hsqldb-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-h2/13.11.0/ebean-platform-h2-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-clickhouse/13.11.0/f179dc70dc6114acdaa8c6e4a3e1e528bae65384/ebean-platform-clickhouse-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-db2/13.11.0/35a56df04f972bd459c145acef913c6ae1f95912/ebean-platform-db2-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-hana/13.11.0/19a00d87abe8f9f1fd4e84bd292ec88c3a8fc555/ebean-platform-hana-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-mariadb/13.11.0/aa05d618c5a094077855ef704a3bd905e21a981e/ebean-platform-mariadb-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-mysql/13.11.0/ebean-platform-mysql-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-nuodb/13.11.0/62e19d272a47483aec213c0a73f2788429519437/ebean-platform-nuodb-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-oracle/13.11.0/9671f0c0a483457e0757cb3961c6e8dc4f5d8278/ebean-platform-oracle-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-platform-postgres/13.11.0/ebean-platform-postgres-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlanywhere/13.11.0/8414ebde9d63848f2c287253e903dee153c8afe3/ebean-platform-sqlanywhere-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlite/13.11.0/e90af0adee226ca4db531efd126f66b5d192bb44/ebean-platform-sqlite-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-platform-sqlserver/13.11.0/cf66a146c35b2b9797708a8a18ada57bce61794/ebean-platform-sqlserver-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-api/13.11.0/ebean-api-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-joda-time/13.11.0/ee02482afa5d0069baf77bf58b27fc5625c74abb/ebean-joda-time-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-jackson-jsonnode/13.11.0/2d9d4405676d1a6c4fca912903b021a699fa0758/ebean-jackson-jsonnode-13.11.0.jar, file:/C:/Users/18868/.gradle/caches/modules-2/files-2.1/io.ebean/ebean-jackson-mapper/13.11.0/708de9b046bdf0704149fd24afd769a54198cb51/ebean-jackson-mapper-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-datasource/8.4/ebean-datasource-8.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-querybean/13.11.0/ebean-querybean-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-applog-slf4j/1.0/avaje-applog-slf4j-1.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-config/2.4/avaje-config-2.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-datasource-api/8.4/ebean-datasource-api-8.4.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-ddl-runner/2.2/ebean-ddl-runner-2.2.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-applog/1.0/avaje-applog-1.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/avaje-lang/1.1/avaje-lang-1.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/persistence-api/3.0/persistence-api-3.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-annotation/8.3/ebean-annotation-8.3.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-types/3.0/ebean-types-3.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/classpath-scanner/7.1/classpath-scanner-7.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-migration-auto/1.2/ebean-migration-auto-1.2.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/ebean/ebean-externalmapping-api/13.11.0/ebean-externalmapping-api-13.11.0.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/org/antlr/antlr4-runtime/4.8-1/antlr4-runtime-4.8-1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/joda-time/joda-time/2.11.1/joda-time-2.11.1.jar, file:/C:/Users/18868/Documents/ckd/soft/apache-maven-3.6.2/repo/io/avaje/classpath-scanner-api/7.1/classpath-scanner-api-7.1.jar, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/annotationProcessor/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/headers/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/tmp/compileJava/previous-compilation-data.bin, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/annotationProcessor/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/classes/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/generated/sources/headers/java/main/, file:/C:/Users/18868/Documents/ckd/project/source/examples/basic-gradle-java/build/tmp/compileJava/previous-compilation-data.bin]
ebean-agent version:unknown enhancement:141 resources:[META-INF/ebean-version.mf, META-INF/ebean-generated-info.mf]

BUILD SUCCESSFUL in 1s
@rob-bygrave
Copy link
Contributor

incremental annotation processing

Ultimately the ebean-gradle-plugin IS doing incremental annotation processing. This issue is specifically that the ebean-gradle-plugin is invoking the "build time enhancement" for partial/incremental compiles (as well as full compiles).

In that sense the question becomes, is it possible for the ebean-gradle-plugin to detect if gradle is performing a full compile or partial/incremental compile and hence only invoke the "build time enhancement" for full compiles.

Are you able to research that @chenkd and find out how the ebean-gradle-plugin can detect the type of compile being performed?

@jnehlmeier
Copy link

In that sense the question becomes, is it possible for the ebean-gradle-plugin to detect if gradle is performing a full compile or partial/incremental compile and hence only invoke the "build time enhancement" for full compiles.

The querybean annotation processor does support Gradle's incremental annotation processing feature using the aggregation category. I assume it is that category because it also emites the single registry class containing all available entities to avoid classpath scanning later on. Otherwise if could probably also be isolating. So if we change a file unrelated to ebean then Gradle should be able to skip the ebean annotation processor.

The Gradle ebean plugin on the other hand registeres doLast actions on several compilation tasks and enhances classes on the fly so that gradle will register the enhanced classes as task output and up-to-date checks work correctly. So the Gradle ebean plugin will execute after all annotation processors have been executed and you cannot skip the enhancement just by detecting if Gradle does an incremental compile or not. You need to know the concrete files.

So the real question is if the Gradle ebean plugin can see the 5 out of 1000 files that Gradle wants to recompile incrementally and only apply the enhancement logic to these 5 files or if the Gradle ebean plugin blindly walks through all 50 entities in the project because they are in the output folder / ebean registry class?

@rob-bygrave
Copy link
Contributor

rob-bygrave commented May 15, 2024

So the real question is if the Gradle ebean plugin can see the 5 out of 1000 files that Gradle wants to recompile incrementally and only apply the enhancement logic to these 5 files

Not really in that it literally can just not enhance them based on the assumption that - This is an IDE build and hence there is an ebean-agent registered to enhance at class at load time (e.g. the IntelliJ IDEA plugin which registers ebean-agent as a Java agent when running tests etc).

To be clear, this is how it all works with maven and IntelliJ. We literally do NOT do any build time enhancement on partial compiles when we use maven and IntelliJ.

That is, we only really need to perform build time enhancement for full-compilation such that the final artifact can be shipped with classes that are already enhanced.

We can and do support the cases where (A) No enhancement has occurred and (B) Some classes are enhanced and not others ... when we are developing and using the IntelliJ ebean plugin (as this will detect if classes are enhanced or not at class load time and perform the enhancement on those classes that need enhancement at that time). When we are not using the IntelliJ ebean plugin we should register the ebean-agent explicitly instead.

So my expectation is that yes if we know gradle is doing a partial compile we can simply NOT perform any enhancement (with the view that you are using something like IntelliJ IDEA with the ebean plugin and that will perform any enhancement necessary at class load time).

@jnehlmeier
Copy link

IMHO a plugin for a build tool should not assume anything. It should always produce a working build. It is quite dangerous to assume that the ebean-agent is active in one way or the other while editing files and recompile the project. The "IDE" could very well be textedit, neovim, nano, whatever. It could also be a CI environment that caches the state of the last build and incrementally compiles changes introduced by newer commits without any IDE but just Gradle + Gradle ebean plugin.

So the best a build tool plugin should do is to check the files the build tool wants to recompile. Nothing more and nothing less.

@jnehlmeier
Copy link

By the way I am using IntelliJ + Gradle incremental compile and never installed the IntelliJ Ebean plugin as I never had the need for it. IntelliJ delegates to Gradle when running tests and query beans are provided by annotation processor that can be run independently so you can use the generated code in the IDE. To build the project Gradle is required as it contains all the build logic, so building with IntelliJ isn't really possible anyways.

@rob-bygrave
Copy link
Contributor

As I see it, if we can detect gradle partial compile then we can at least try this approach and confirm that it works as expected. I'd be confident of that based on the fact that this is how it works for the maven case.

If it proved to work out in reality in terms of pros vs cons then we could keep it and allow people to turn it on.

IMHO a plugin for a build tool should ...

I'm happy for someone to have a crack at that sort of improvement to ebean-gradle-plugin. One day we might get there but we need to be aware of the complexity involved so I'm personally aiming for the simple approach first and see what that give us. If someone puts there hand up to work on this that would be great.

[Gradle] ... building with IntelliJ isn't really possible

Yes.

never installed the IntelliJ Ebean plugin as I never had the need for it

Yes, and if we have this option for ebean-gradle-plugin and we enable it then we'd need to use the IntelliJ Ebean plugin.

@chenkd
Copy link
Author

chenkd commented May 16, 2024

Sorry, I'm new to using ebean, I really like the ebean style.
My development environment is IntelliJ + Gradle. Every time I recompile, the enhancement of all classes with @entity annotations is triggered. However, this is not the case in IntelliJ + Maven(Only the modified parts are compiled each time).

After experiments, I found that this can avoid the full compilation of the ebean class in gradle.
Extract the @entity class into module A, and module B depends on module A. At this time, modifying the classes in module B will not trigger compilation in module A.

@jnehlmeier
Copy link

Extract the @entity class into module A, and module B depends on module A. At this time, modifying the classes in module B will not trigger compilation in module A.

Yes, that is a workaround because in that case Gradle itself will already figure out that it does not need to recompile module A at all. Thus Ebean Plugin is not triggered at all by Gradle. I use this setup too, but for a different reason. In general I don't like extracting entities into their own module because you quickly need a third module to avoid dependency loops if the entity does more than just getter/setters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants