Study http://jasig.github.io/cas/4.1.x/integration/Attribute-Resolution.html
From: [email protected] [mailto:[email protected]] On Behalf Of Yan Zhou Sent: Friday, April 15, 2016 1:33 PM To: CAS Community <[email protected]> Subject: [cas-user] CAS 4.1.8 snapshot overlay does not include commons-collections4 jar, runtime error Hi there, I am seeing a strange issue with Maven Overlay. Just thought to share, and you may be able to see what I missed. First of all, everything works fine when I do overlay on 4.1.5. But, when I do overlay on 4.1.8 snapshot (all I changed is the reference to CAS version), things start to break. I eventually track this down to a missing jar below. Even though CAS-core already included this jar, for some reason, when I overlay 4.1.8 snapshot, it is not being included (mvn dependency:tree does not have this jar), thus results in some real strange run-time error. <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-collections4</artifactId> <version>4.0</version> </dependency> I am glad my overlay on top of 4.1.8 snapshot is working now, after I explicitly include this jar above in my POM.xml. The following is my POM.xml for the overlay project, <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd <http://maven.apache.org/POM/4.0.0%20http:/maven.apache.org/xsd/maven-4.0.0.xsd%20> "> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.quest.hub.cas</groupId> <artifactId>cas-suite</artifactId> <version>1.0</version> </parent> <artifactId>cas-server</artifactId> <packaging>war</packaging> <name>cas server</name> <description>CAS Server Application</description> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <warName>cas</warName> <overlays> <overlay> <groupId>org.jasig.cas</groupId> <artifactId>cas-server-webapp</artifactId> <excludes> <exclude>WEB-INF/cas.properties</exclude> <exclude>WEB-INF/classes/log4j2.xml</exclude> </excludes> </overlay> </overlays> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.5</version> <configuration> <source>${java.source.version}</source> <target>${java.target.version}</target> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.jasig.cas</groupId> <artifactId>cas-server-webapp</artifactId> <version>${cas.version}</version> <type>war</type> <scope>runtime</scope> </dependency> <dependency> <groupId>org.jasig.cas</groupId> <artifactId>cas-server-support-generic</artifactId> <version>${cas.version}</version> <type>jar</type> </dependency> <dependency> <groupId>org.jasig.cas</groupId> <artifactId>cas-server-integration-memcached</artifactId> <version>${cas.version}</version> </dependency> <!-- this version of spring-data-jpa works with the spring dependencies in JASIG CAS POM.xml --> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-jpa</artifactId> <version>1.9.1.RELEASE</version> <!-- otherwise result in multiple SLF4J bindings --> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>4.3.10.Final</version> </dependency> <dependency> <groupId>org.jasig.cas</groupId> <artifactId>cas-server-support-jdbc</artifactId> <version>${cas.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.mchange</groupId> <artifactId>c3p0</artifactId> <version>0.9.5.2</version> </dependency> <!-- 4.1.8 snapshot does not include this in overlay, have to be added explicitly --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-collections4</artifactId> <version>4.0</version> </dependency> </dependencies> <properties> <cas.version>4.1.8-SNAPSHOT</cas.version> </properties> </project> Thanks, -- 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] <mailto:[email protected]> . Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/11a654d8-835f-4b5d-819d-ec2fb805ced4%40apereo.org <https://groups.google.com/a/apereo.org/d/msgid/cas-user/11a654d8-835f-4b5d-819d-ec2fb805ced4%40apereo.org?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/a/apereo.org/d/optout. -- 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]. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/020d01d1976f%2407c7e580%241757b080%24%40unicon.net. For more options, visit https://groups.google.com/a/apereo.org/d/optout.
