gradle versions of dependency documentation?

38 views
Skip to first unread message

Baron Fujimoto

unread,
Apr 13, 2021, 10:29:20 PM4/13/21
to CAS Community
I'm working on upgrading our old cas 5.x to a current 6.3 version. For our old cas, we used maven and pom.xml for the war overlay and dependencies. Apparently that's been deprecated in favor of gradle, but it looks like the documentation still uses XML. For example:


I think it's equivalent should now go in the dependencies block of build.gradle, but it's not clear how to specify the gradle version of this dependency there based on that documentation.


compile "org.apereo.cas:cas-server-support-ldap:${casServerVersion}"

Does this format generally hold true for translating such dependencies? I.e.:

compile ${groupId}:${artifactId}:${casServerVersion}

FWIW, I'm finding it challenging to use the CAS documentation as a starting point for these tasks, since many things don't seem to be included (e.g., without that blog post, I wouldn't have known about running "gradlew clean" to set gradle up, or even about gradlew itself, for that matter). Unless I missed it, I don't see any clear connection between these necessary steps.
--
Baron Fujimoto <ba...@hawaii.edu> :: UH Information Technology Services
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum

Mike Osterman

unread,
Apr 14, 2021, 12:00:29 AM4/14/21
to CAS Community
Hi Baron,

I too am working on 5.x to 6.3.x and have been getting help from Unicon.

While I'm not sure if "compile" works, here's what I picked up from working with them. Here are our dependencies:

implementation "org.apereo.cas:cas-server-webapp-init:${casServerVersion}"
implementation "org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-support-duo:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-support-saml-idp:${project.'cas.version'}"
implementation "org.apereo.cas:cas-server-support-saml:${project.'cas.version'}"

You can see where this starts in the base 6.3 build.gradle here on line 84: 

It looks like a lot of this is covered in the README.md at the root of the project:

Check out the "Adding Modules" section, which suggests:
dependencies {
    implementation "org.apereo.cas:cas-server-some-module:${project.casVersion}"
    ...
}

I'm not sure where the ${project.'cas.version'} syntax (slightly different from above) comes from, but it has been working for our build.

Good luck!
Mike



--
- 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+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAAjLUL0Nj-DGE_5Jn7mgfXbu1w83f9eqfW95ncd3TB17XdN1pQ%40mail.gmail.com.

Andy Ng

unread,
Apr 14, 2021, 2:42:12 AM4/14/21
to CAS Community, Mike Osterman
Hi Baron,

Agreed with Mike, as for compile v.s. implementation, for the use case of CAS build.gradle, you should use implementation


Cheers!
- Andy

Baron Fujimoto

unread,
Apr 14, 2021, 2:11:51 PM4/14/21
to CAS Community
Mahalo for the pointers! I guess I am conditioned to seek answers in the wiki documentation first. I'll have to train myself to also consult the README.md as well (though there still seems to be a gap between the two).

Reply all
Reply to author
Forward
0 new messages