| Author |
Config file
|
Anand Lachu
Greenhorn
Joined: Nov 05, 2012
Posts: 1
|
|
We are using maven build tool.
Currently we have our configuration inside war file, which contains all URLs
Requirement is that war file should not contain the configurations, should be outside war
Some one please help
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14486
|
|
Welcome to the JavaRanch, Anand!
Maven produces only one product per project (POM). If you use the WAR goal, that product will be the WAR and only the WAR - no external files.
What I generally do is create an OS install package, such as a Red Hat RPM. By configuring my POM to create the WAR as part of an RPM package, I can construct an OS deployable component (RPM) using only the Maven command "mvn clean package". The RPM's file list includes the config file prototypes and the RedHat Package Manager program will automatically copy them to their proper destinations - as it will for the WAR itself. You define what the "proper destinations are"; I normally copy the WAR to /opt/vendorname/productname, a Context file to my TOMCAT conf/Catalina/localhost directory, the config files to /etc/vendorname.d, and any workfiles to /var/lib/productname. Depending on project needs.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: Config file
|
|
|