Hi there, I think I have fallen into another multi-project hell.
We hade a flat multi-project set up which seemed to cause issues so i decided to go for traditional hierarchical set up like this one.
main +-- build.gradle +-- settings.gradle +-- projectA (web app) +-- build.gradle (depends on B and C) +-- projectB (lib) +-- build.gradle (depends C) +-- projectC (another lib) +-- build.gradle
Now I am facing something very weird.
When building my projects (gradlew clean ;projectX:build) C compiles fine (and produces a jar) B seems to be comiling fine (but do not produce a jar file) A does not compile and complains it cannot find symbols from B.
If I remove all references to B in A (but kep references to C) it does compile fine.
Regardless of what I do (especially if I do a clean first), ProjectB:jar is always “UP-TO-DATE”…
Here is a typical ouput :
$ gradlew clean :projectA:build :clean :projectA:clean :projectC:clean :projectB:clean :projectC:compileJava :projectC:processResources :projectC:classes :projectC:jar :projectB:compileJava :projectB:processResources :projectB:classes :projectB:jar UP-TO-DATE ( <<<< always UP-TO-DATE !) :projectA:compileJava :projectA:processResources :projectA:classes :projectA:war :projectA:assemble :projectA:compileTestJava UP-TO-DATE :projectA:processTestResources UP-TO-DATE :projectA:testClasses UP-TO-DATE :projectA:test UP-TO-DATE :projectA:check UP-TO-DATE :projectA:build
I suspect that there is something wrong with project B but I just cannot figure out what…
Any help would be much appreciated, I spent the last 12 hours trying to sort this out and my eyes ache ;).
Many thanks in advance. JM