File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Config file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Config file" Watch "Config file" New topic
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: 15624
    
  15

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Config file
 
Similar Threads
how i can use a 3rd party build.xml in my own build file?
WAR file deployment and jboss-service.xml
Regarding WAR file
servlets
deleting war file from tomcat