Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring-Webapps: shared resources and separated development/maven modules?

I have two WARs, each one using Hibernate-Search+Lucene. As far as I understand it, that setup would produce two separate Hibernate und Lucene instances if loaded separately into tomcat etc.

The two WARs are generated by two separate maven modules. I want to keep that separation.

How do I merge the separate instances in production?

I thought about the maven-shade-plugin to merge the WARs. Is there a better of doing that, ie. a more automatic/more standard way?

like image 963
user1050755 Avatar asked Dec 04 '25 15:12

user1050755


1 Answers

Look at Maven WAR Overlays. What is the reason for defining two separate WAR files? General idea is to have Base WAR (shared resources?) and two customized WARs (diffs) for diffrent environment with Maven Overlays.

like image 191
MariuszS Avatar answered Dec 07 '25 05:12

MariuszS



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!