i have gradle project subprojects, , servlet api 2.5. i've added servlet 3.0 , compile fine command line gradle. however, intelij loads servlet 2.5 classes first, unable compile.
how can manage dependency ordering within intelij?
it's there, might have missed it:
in intellij go to: file -> project structure -> modules (on left) -> dependencies (tab on right)
now can move order of dependencies , down using arrow buttons on right. should class loader order right compilation.
i'm not sure why leave both jars in there though, might want delete 1 of them. make sure scope "provided" , export button unchecked both of them (assuming you're creating war file).
we've found need go through 3 places intellij lists libraries , clean old jar files on every change build.gradle. need delete out multiple lib directories in our projects 'out' or 'build' dirs rid of old jars intellij seems incapable of cleaning itself. intellij integration gradle abysmal we're considering either going eclipse/sts or going maven! sad.
Comments
Post a Comment