Slackbot
06/27/2022, 7:04 AMVampire
06/27/2022, 9:26 AMAs there is two times the same FQCN, I'd say this is a class loader problem. YourCopy codeof type xxx.ManifestService using a provider of type xxx.ManifestService.
ConfigureManifestTask is coming from a different class loader than your ManifestService class and thus it cannot assign it as Java sees the ManifestService class the variable has as different from the ManifestService instance you give it.Vampire
06/27/2022, 9:26 AMVampire
06/27/2022, 9:30 AMR and sub-projects A and B, then apply plugin X containing ManifestService and ConfigureManifestTask to A and B, then the classes are on different class loaders and thus incompatible.
If then A is evaluated it registers the service with its class. Then B is evaluated and gets the service A has registered which is incompatible with it's own ConfigureManifestTask.Vampire
06/27/2022, 9:30 AMX to the class path of R as it would then be in a class loader that is the parent of both of the other class loaders and would fix the problem.tomas-mrkvicka
06/27/2022, 9:43 AMX to :R:A and :R:B and run jar task from within the R. configureManifest task run as expected and altered manifests within :R:A and :R:B. So no problem with different class loaders here. Then I applied spring boot gradle plugin (without any configuration applied) to :R:B and tried to run jar the same way I did before and bum, the exception is back.tomas-mrkvicka
06/27/2022, 9:44 AMX to :R without applying it..tomas-mrkvicka
06/27/2022, 9:57 AMVampire
06/27/2022, 10:15 AMtomas-mrkvicka
06/27/2022, 10:45 AM