Hi,
I have a question regarding the lookup of custom Converter classes.
Here is the situation:
- add-on jmix-entity-soft-reference has a custom Converter: SoftReferenceConverter
- add-on jmix-taggable uses the Converter for the attribute Tagging::taggable
- the example application: jmix-taggable-example uses taggable (and therefore has also a transitive dependency to entity-soft-reference)
When performing compileJava
the following error occurs:
[jmix-taggable-example] ./gradlew compileJava main
> Task :compileJava
Enhancing entities in root project 'jmix-taggable-example' for source set 'main'
Project entities:
JPA: [de.diedavids.jmix.taggable.example.entity.Customer, de.diedavids.jmix.taggable.example.entity.Product, de.diedavids.jmix.taggable.example.entity.User];
DTO: [];
Project converters: [].
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> javassist.NotFoundException: de.diedavids.jmix.softreference.entity.SoftReferenceConverter
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 6s
1 actionable task: 1 executed
The Converter seems not be recognised.
By adding an explicit dependency to the entity-soft-reference project, the error goes away:
dependencies {
// ...
// added explicit dependency
implementation 'de.diedavids.jmix.softreference:jmix-entity-soft-reference-starter:1.1.0'
implementation 'de.diedavids.jmix.taggable:jmix-taggable-starter:1.0.0-SNAPSHOT'
}
Is there any reason, why transitive dependencies are not scanned for custom converters? What is the desired solution - to explicitly add this transtivice dependency?
Cheers
Mario