Build CAS as executable JAR file

72 views
Skip to first unread message

newbee

unread,
Jul 19, 2018, 7:56:09 AM7/19/18
to CAS Community
Hi All,

I am using CAS 5.2.5. I am able to build the WAR file successfully. 

I have a different need for our project. I would like to build CAS as executable JAR file. Is this possible please?

I tried changing the packaging to jar in pom.xml and creating a shaded jar using maven. But that jar does not work.

Thanks,

Ray Bon

unread,
Jul 19, 2018, 12:47:20 PM7/19/18
to cas-...@apereo.org
In build.sh file there is a run option, Build and run cas.war via Java (i.e. java -jar target/cas.war).
Will this do what you want?
If not provide more details on your objective.

Ray
-- 
Ray Bon
Programmer analyst
Development Services, University Systems
2507218831 | CLE 019 | rb...@uvic.ca

Chia-Ying (David) Yang

unread,
Jul 19, 2018, 2:05:02 PM7/19/18
to cas-...@apereo.org
Usually to build a Spring Boot executable JAR file is to set <executable>true</executable> under the spring-boot-maven-plugin section in pom.xml.  I tried that plus changing layout and packaging to jar, but still cannot run the resulting jar or war file by itself.  Spewed out infinite loop stack trace.

A little more digging seems to suggest war overlay does not play nicely with Spring Boot executable pacakaging in general, see: https://github.com/spring-projects/spring-boot/issues/1030

So you may have to resort to Ray's suggestion of running the war file via java -jar, or deploy the war file to a container of your choice.

David
--
- 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/1532018836.2880.26.camel%40uvic.ca.

Reply all
Reply to author
Forward
0 new messages