Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2003 10:26:56 +0200
From:      Ernst de Haan <znerd@FreeBSD.org>
To:        java@FreeBSD.org, ports@FreeBSD.org
Subject:   Ports: Deploying WAR files
Message-ID:  <200307211026.56111.znerd@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Folks,


Does anyone have any ideas on deploying WAR files from a port? Some 
applications nowadays consist of a single WAR file. Should we not find a 
standard way to deploy these applications in an existing servlet container?

We could do the following:

1) dedicate a single directory for WAR files, e.g.:

   /usr/local/share/java/webapps

In this directory we could stick all WAR files that need to be deployed 
automatically.

2) we could set a variable to point to that location, in bsd.java.mk:

   WAR_DIR=${LOCALBASE}/share/java/webapps

3) we could modify the servlet container ports (www/orion, www/tomcat41, 
etc) to use ${WAR_DIR} as their primary location for WAR files. Either with 
a configuration setting or with a symbolic link.

4) Then we could introduce a variable SERVLET_CONTAINER and set it to the 
servlet container port to install when one is needed. By default it would 
be set to TOMCAT, but it could also be overridden in /etc/make.conf, to be 
set to ORION, for example.

5) Finally, we could specify that ports that install a WAR file must set 
USE_SERVLET_CONTAINER to YES. Then they could use WAR_DIR in the port 
Makefile to put the WAR file in. The ports system will add the appropriate 
servlet container as a runtime dependency (to RUN_DEPENDS).


Biggest issue with this is probably that it changes the existing servlet 
container ports.

And thoughts on this?


Ernst



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307211026.56111.znerd>