Application-agnostic build script

I have a J2EE application that should be distributed to clients that will have the application servers of their choice. What is the recommended way to write a script assembly that compiles J2EE application sources (on client sites) so that they can ultimately deploy the application on their servers?

Also, which JARs should be used during the compilation process? Since this is intended for an agnostic script application server, is it recommended to use a JAR (say servlet.jar, jms.jar, ejb.jar, etc.) from the application server, instead of my clients downloading these JARs from a specific repository? Is there such a repository that is recommended for such JARs (JARs J2EE API)?

PS: EAR file cannot be created locally and sent to clients, since during each installation additional development will be performed to integrate with other systems, perform settings in the application, etc.

+3
source share
3 answers

Build the application locally and distribute the WAR / EAR files to the client.


Edit:

, , , . maven , , . , X Y pom.xml, X , .

, Maven, Ant Ivy .

+1

J2EE API Sun, , , , .

JAR, , , /WEB-INF/lib

+1

Basically, do not include container containers (servlet.jar, jms.jar, ejb.jar, etc.) in your EAR or WAR file.

If you are just talking about servlet.jar, the web container provides this - you should not include it in your war file.

If you create an EAR file, you must use an enterprise container and it will have JMS.jar and EJB.jar.

JMS on Tomcat will be a little more complicated - you will need people to install something like activemq on your servers.

0
source

Source: https://habr.com/ru/post/1716141/


All Articles