Two typical solutions to deal with it, the right depends on your use case. I've done it both ways. If your use case is a full "product", you could create an assembly that would package everything, including the tomcat and the startup scripts into a single archive such as zip or tar. Or, if you can mix and match the settings and the war, the property files and a start-up script would be in their own module. For your clients, you'd give yet another script that is as simple as possible, which would automatically fetch the settings module archive and the war from your Maven repository and then deploy them, either always getting the latest or asking for a version number.
Kalle On Wed, Feb 25, 2009 at 12:52 PM, Steve Cohen <[email protected]>wrote: > What is the general Maven view on where resources like launcher shell > scripts and properties files belong vis-a-vis Maven and Eclipse? > > Our application is structurally a web app although it is not primarily > served over the Web. It runs under Tomcat, so that a minor use case, > implemented in terms of servlets, can be handled, although the bulk of > interactions with the application do not come through http. Because of > this, we make little distinction between the Web Application and Tomcat > itself. No other web apps run on this Tomcat instance and we start and stop > it by starting and stopping Tomcat, using a commons-daemon shell script, so > that the application restarts whenever the server might be rebooted, and so > it can also be started and stopped manually. Many configuration parameters > and system properties essential for running this application are defined in > this script, as well as a mechanism that determines which configuration to > launch (dev, test, production) based on the uname of the server. Thus there > is one launch script that works on all tiers. > > This shell script should live, in the Maven/Eclipse view, where? Presently > it lives in the Web App project in a non-standard directory that does not > get deployed inside the war file that is generated from the Web App project. > It lives there for conceptual reasons, although its route to deployment is > entirely different and manual. Surely, where it lives is not the right > place, but what is? In a separate Eclipse/Maven project? > > A similar question arises with properties files. They are deployed outside > the war, but need to get deployed manually to directories known by code in > the war. > > Is there a "maven way" to handle such chicken-egg anomalies? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
