I would argue yes, in many cases it is… The problem seems to be that Maven does not take into account libs that are apart of the war, so if a dependency that's being added to the overlay pom conflicts with what's in the pom, then there are issues. This is not a thoroughly researched opinion, but just one from experience… If you look into the CAS MFA project you'll notice may times where this is needed because of the multiple overlays used by that. -- John Gasper IAM Consultant Unicon, Inc. PGP/GPG Key: 0xbafee3ef
From: <cas-user@apereo.org> on behalf of Jonathan Labin <jonathan.la...@gmail.com> Date: Thursday, March 24, 2016 at 6:33 PM To: CAS Community <cas-user@apereo.org> Cc: <jonathan.la...@gmail.com> Subject: Re: [cas-user] Jar version collision with Maven Overlay Sorry, i mean to ask if this is a *common* correction to need to make in an overlay project.... On Thursday, March 24, 2016 at 9:27:53 PM UTC-4, Jonathan Labin wrote: Is this a correction to need to make in an overlay project? It seems that you'd want the jars to be all populated from the pom to avoid just this situation. On Thursday, March 24, 2016 at 5:39:10 PM UTC-4, jgasper wrote: You can see how to keep various files from being included in the final build here: https://github.com/Unicon/unicon-cas-overlay/blob/master/pom.xml#L20-L46 You can also exclude the dependency itself: https://github.com/Unicon/unicon-cas-overlay/blob/master/pom.xml#L89-L104 If the undesired file is in the baseline cas.war you need to use the first method. If it is being pulled from a dependency, then I prefer using the latter. You can call `mvn dependency:tree` to find out what is contributing what. If it isn't listed then it is probably in the baseline cas.war. -- John Gasper IAM Consultant Unicon, Inc. PGP/GPG Key: 0xbafee3ef From: <cas-...@apereo.org> on behalf of Jonathan Labin <jonatha...@gmail.com> Date: Thursday, March 24, 2016 at 1:57 PM To: CAS Community <cas-...@apereo.org> Subject: [cas-user] Jar version collision with Maven Overlay I'm running CAS 4.1.3 and using the maven overlay from: https://github.com/Jasig/cas-overlay-template and I'm running into a problem where my resulting war file contains multiple versions of the same jar file. There are a few cases of this but the one giving me trouble right now is spring-core. person-directory-impl-1.7.1 brings in spring-context-4.2.4.RELEASE which of course leads to spring-core-4.2.4.RELEASE. However I'm finding that my resulting war also contains spring-core-4.1.8.RELEASE. I've tried adding a block to resolve this collision: <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>4.2.4.RELEASE</version> </dependency> </dependencies> </dependencyManagement> but it seems to have no effect. I noticed that cas-server-webapp-4.1.3.war contains spring-core-4.1.8.RELEASE. Is the cop of spring-core-4.1.8 that ultimately ends up in my war coming from thie cas-server-webapp-4.1.3.war and not the maven dependency tree? This would explain why my dependencyManagement block had no effect. If this is the case, how to I keep old versions of the colliding jars that are a part of the base war dependency from showing up in my final war built by the overlay task? 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 cas-user+u...@apereo.org. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. -- 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. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/. -- 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. Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.