Andrew Hughes ha scritto: > Hi All, > > I've tried to find the "best fit" solution to what I think is a fairly > common problem: > > My WebApp (war) needs to call a customized geoserver. Specifically, I > want my geoserver deployed with my own data, styles, user/pass eta eta > eta.... > > From everything I can see, I should configure the appserver to have > -DGEOSERVER_DATA_DIR and that's the "customized" config I require (can > redeploy a new zip to the machine eta eta eta). However, this isn't the > easiest thing to do from an operational sense... it would be much easier > if I could deploy my geoserver_data within the geoserver.war itself. > After all, its what war's are there for. > > So, I've given this some thought and seen a similar approach in other > projects. Maven mojo plugins often download resources from zip's, unpack > them, use the contents of the unpacked artifact, repackage and then > release/distrubute/deployed eta eta eta. > > If geoserver.war is available in a maven repository(?) it can be > downloaded (version specific) as a plugin dependency, it can be unpacked > (target/geoserver/*), and the contents of the data dir can be replaced > by the contents the client user wants/has. This means that I can release > my own spatial data and server with all the benefits of svn, geoserver > and Maven's lifecycle. It also means that the war can be packed inside > an ear to be coupled with your applications versioning/release cycle eta > eta eta (another great way to deploy an application that is dependent on > a specific geoserver version or config). > > I'm sure there are other ways around this too, where I might checkout > geoserver src as a module in my own project, and customize it there.... > from a "once off" perspecitve that might be a "quicker"... but doesn't > represent an easy solution for the next person that wants to do this. It > also makes versioning of the geoserver dependency painful.
We don't have any support for fiddling with the generated .war, and it's not published on any repository either afaik... how would you depend on a .war? Maven dependency mechanism is made for classpath dependencies. Anyways, if you check out the sources, you can build geoserver with mvn clean install -DconfigDirectory=/path/to/the/parent/of/the/data/dir -DconfigId=dataDirName and you'll get a geoserver.war that has the data dir you pointed the build at Cheers Andrea ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
