I am upgrading CAS from 3.x to 5.x. The CAS Overlay Installation: builds a war file of about 120 MB about 5 times larger than 3.x.
How can I skip the unused modules/jars from the war file in order to reduce the file size and deployment time? I only need to authenticate against a Database and AD/LDAP.
The build for CAS 5.3.x is based on Apache Maven, and Apache Maven has a concept for excluding dependencies. You can read more about this here. This means that you'd have to find the coordinates for dependencies you think you don't need and exclude from your deployment via exclusions tag. Furthermore, the Apache WAR plugin does allow you exclude files from the final packaging, which you might also be able to use to remove JARs, etc from the final web application artifact that you think you don't need. You can read more about that here.
Tweaking the internals and list of dependencies is a completely non-supported approach and may directly affect the stability and security of the deployment. Do so at your own risk.