Hi,

AFAIK, just specifying the library without the version *should *be 
sufficient:

     implementation "org.apache.shiro:shiro-core" 

Because like for the other libraries from your example, the version of the 
dependency is already specified in the imported CAS BOM (e.g. 
cas-server-support-bom-6.6.15.pom 
<https://repo1.maven.org/maven2/org/apereo/cas/cas-server-support-bom/6.6.15/cas-server-support-bom-6.6.15.pom>).
 
The BOM is imported by the following line in the CAS overlay's build.gradle 
<https://github.com/apereo/cas-overlay-template/blob/6.6/build.gradle#L256C38-L256C75>
:

    implementation 
enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")

You can see e.g. 
https://docs.gradle.org/current/userguide/platforms.html#sub:bom_import for 
how this works.

(Ad lombokVersion: As this special, compile-only, library is not specified 
in the BOM, I'm doing the same, i.e. I copy the version manually to my 
project.)

I hope this helps
Petr

On Tuesday 6 February 2024 at 05:36:17 UTC+1 Ray Bon wrote:

> Yan,
>
> You  can put the version into gradle.properties (I put this at the bottom 
> of my file):
>
> lombokVersion=1.18.30
> ...
>
> In build.gradle:
>
> compileOnly "org.projectlombok:lombok:${lombokVersion}"
> testCompileOnly("org.projectlombok:lombok:${lombokVersion}")
>
> If the library is included in cas, then you  do not need to use 
> implementation.
>
>
> Ray
>
> On Mon, 2024-02-05 at 08:22 -0800, Yan Zhou wrote:
>
> Notice: This message was sent from outside the University of Victoria 
> email system. Please be cautious with links and sensitive information.
>
>
> HI there, 
>
> with CAS 6.6.x overlay, I need to create my own authentication handler, 
> which uses Apache Shiro's hash service, etc., it comes with CAS, but I have 
> to explicitly list them in my project dependency so my code can compile. 
>
> looks like the following,  Note that I first find out CAS is using 
> shiro-core 1.9.1 and then explicitly include it in build.gradle, is there a 
> better way to manage this (such as I do Not have to explicitly include 
> shiro dependency by specific version# ? this makes it difficult for 
> upgrade.)
>
> implementation "org.apereo.cas:cas-server-support-jdbc"
> implementation "org.apereo.cas:cas-server-support-jdbc-authentication"
> implementation "org.apache.shiro:shiro-core:1.9.1"
> implementation "org.apereo.cas:cas-server-support-ldap"
>
> Thanks,
> Yan
>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/ee197a1b-f4bc-49f9-8f06-d41c88ab8776n%40apereo.org.

Reply via email to