Hi Kostas, interesting question. This seems to be more of a Gradle than CAS question, even though CAS seems to use "compileOnly" scope quite extensively for a reason I would also like to understand. Anyway, I think you can't go wrong with using "implementation" scope for all regular dependencies that are needed also in runtime (or during unit tests) as well. They should be present in the resulting CAS war anyway. Whilst the "compileOnly" scope should be really used just for libraries like Lombok or libraries which will be supplied by your application server. Or at least this answer to Is it recommended to use compileOnly over implementation if another module use implementation <https://discuss.gradle.org/t/is-it-recommended-to-use-compileonly-over-implementation-if-another-module-use-implementation-already/26699/2> says so. But the Gradle "world of scopes" is historically a pretty tricky thing...
Best regards Petr On Tuesday, 29 July 2025 at 04:55:32 UTC+2 Ray Bon wrote: > Kostas, > > More old school than an LLM; take the unmet dependency class and search > the Cas code base for the file (on github or a clone of the project). > > Ray > > ------------------------------ > *From:* [email protected] <[email protected]> on behalf of Kostas > Kalevras <[email protected]> > *Sent:* July 7, 2025 01:00 > *To:* CAS Community <[email protected]> > *Subject:* [cas-user] compileOnly and implementation dependencies > > Hello team > > We are using the sso-cas-overlay template along with our own code for > building CAS with multiple features enabled (JPA, LDAP, GAuth, OIDC, SAML, > REST protocols etc). > > Does anyone have a guide on how to determine which dependencies must be > added as implementation and which can be declared as only compileOnly? > Obviously those that are included in the documentation for enabling a > feature have already been declared as implementation but we are having a > bit of a hard time with cas-server-core-* and *-api dependencies (with a > few required to be added in build.gradle in order for our code to build) > > We have already run gradlew dependencies --configuration runtimeClasspath > and gradlew dependencies --configuration compileClasspath but it's not > extremely helpful. > > Any help will be appreciated > > -- > - Website: https://apereo.github.io/cas > - List Guidelines: https://goo.gl/1VRrw7 > - Contributions: https://goo.gl/mh7qDG > --- > You received this message because you are subscribed to the Google Groups > "CAS Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/a/apereo.org/d/msgid/cas-user/b1bc1ca7-b634-4618-8f4c-11e1ac620cd7n%40apereo.org > > <https://groups.google.com/a/apereo.org/d/msgid/cas-user/b1bc1ca7-b634-4618-8f4c-11e1ac620cd7n%40apereo.org?utm_medium=email&utm_source=footer> > . > -- - Website: https://apereo.github.io/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/ba5e2589-b920-4461-ac88-67fc64b22e58n%40apereo.org.
