Hi All, We are used to implement and deploy services into containers (Tomcat, JBoss, Wildfly, ...) as single WAR and for this kind of work we always implement starting from the BaseX WAR distribution.
Now, looking in depth into the structure of the WAR, we noted that all the third party JARs, BaseX common classes JAR and XQJ bridge JAR are located into WEB-INF/lib folder whereas HTTP related classes (filters, servlet, listener and so on) are located inside the WEB-INF/classes. Moreover a possibly useless (?) WEB-INF folder with another web.xml and another jetty.xml in the same WEB-INF/classes.
My question is: is there any reason why files in WEB-INF/classes are not “jarred” into a single archive and placed into WEB-INF/lib folder? Are there any cons doing that way according to your experience? The objective is to optimize the EAR content, where several WARs of services are packaged into a single EAR file, by factoring out all the JARs into the /lib folder of the EAR.
Thank you and regards,
Mauro
Hi Mauro,
The WAR package is built by running "mvn war:war" in the basex-api project directory [1]. There are no specific settings for WAR deployment in the pom.xml file, which is why all libraries and BaseX classes and are bundled without further modifications.
I guess it shouldn’t cause any troubles if the BaseX classes were zipped as well, and I agree that the WEB-INF can probably be dropped. If you are interested, feel free to add a pom.xml section for war deployment (and of course we invite you to give the result back to the community).
Hope this helps, Christian
[1] https://github.com/BaseXdb/basex/tree/master/basex-api
On Wed, Jun 27, 2018 at 12:30 PM Mauro Mugnaini themaxx76@gmail.com wrote:
Hi All, We are used to implement and deploy services into containers (Tomcat, JBoss, Wildfly, ...) as single WAR and for this kind of work we always implement starting from the BaseX WAR distribution.
Now, looking in depth into the structure of the WAR, we noted that all the third party JARs, BaseX common classes JAR and XQJ bridge JAR are located into WEB-INF/lib folder whereas HTTP related classes (filters, servlet, listener and so on) are located inside the WEB-INF/classes. Moreover a possibly useless (?) WEB-INF folder with another web.xml and another jetty.xml in the same WEB-INF/classes.
My question is: is there any reason why files in WEB-INF/classes are not “jarred” into a single archive and placed into WEB-INF/lib folder? Are there any cons doing that way according to your experience? The objective is to optimize the EAR content, where several WARs of services are packaged into a single EAR file, by factoring out all the JARs into the /lib folder of the EAR.
Thank you and regards,
Mauro
basex-talk@mailman.uni-konstanz.de