Hi,
I got all the stuff I wanted working… will post soln on monday, you will be suprised how easy it was.
As you said…
I suggest you look in the geoserver sources, it seems there
is most of what you need… I think you want to make something
separated from GeoServer that allows people customization without
needing to check out the sources, right?
This is true but is really a link in the chain for what I am trying to achieve. What I really want to do, is to EASILY associate my spatial web applications with a customized geoserver configuration/data release. In doing so, I can release a new instance of my spatial application and its supporting spatial services/data/config at the same time. FYI: I will most likely do this via an ear.
My multi-module maven project might look like:
-
mycompany.spatial:mycompany-spatial
-
mycompany.spatial:geoserver (this module produces a geoserver.war with my data/content)
-
mycomapny.spatial:phonebox-mapper-war (a web app that http calls the geoserver^)
-
mycomapny.spatial:atm-finder-war (another web app that http calls the geoserver^)
-
mycomapny.spatial:geo-tagger-war (yet another…)
-
mycompany.spatial:ear (an ear project that packs all of the above into a single release artifact)
And sure, you might want to add geotool’s as a dependency in the war’s so that they can talk nicely to geoserver.
The important fact, is that a customized geoserver can easily be embedded/consumed/deployed in the same development lifecycle as the web app that will be consuming its services. No messy forking of application and service lifecycles.
Futher more, the jetty runner can run a geoserver “out of the box”, so the non-savvy spatial developer has lower ramp up time writing their spatial webapp.
As far as releasing the application goes… you already do “mvn release:prepare release:perform” by the looks of it… so you already have a maven repository (http://repository.codehaus.org/org/geoserver/web/) there’s a few options, either a nodata classified release at the same time (I believe this is e-a-s-y). Or something that is definately easy is your “mvn install -DconfigId=myconfig -DconfigDirectory=/path/to/config/dir/parent” process “hard coded” to produce and empty data dir in a new module. “web-nodata” perhaps?
Anyway, what I have is working awesome and I will share when I’m back in the office on monday.
–AH
On Fri, Apr 18, 2008 at 5:57 PM, Andrea Aime <aaime@anonymised.com> wrote:
Andrew Hughes ha scritto:
Well, I most certainly have found some good news!
I’ll confirm this with some more testing…
If you have a maven war project with, a dependency on a war (ie geoserver)… the geoserver war’s contents are packed into the war as well. This means if you wanted to customize your own… all you would need to do would be to put your geoserver data in ./src/main/webapp/data/*
Hum, that’s what the config plugin we have in GeoServer does when
you run “mvn install -DconfigId=myconfig -DconfigDirectory=/path/to/config/dir/parent”
I assumed you already knew about this?
Yes, but this is your application lifecycle, not mine
It would be especially easy if there was a classified version of geoserver available in a maven repository (geoserver-1.6.3-nodata.war), which is easy enough for me to knock up for testing… but I don’t know how this effects your release mechanism if you want to do it in your project?
Hem… we definitely do not publish the .war now and I still don’t know
how this would happen. We do deploye on the codehaus repo and the web
module gets published as a jar (i.e. web-1.6.2.jar, 32MB… hmmm…):
http://repository.codehaus.org/org/geoserver/web/1.6.2/
Yet, if you don’t manually install anything,
by default you get the empty data dir (which is not the same a no data).
http://svn.codehaus.org/geoserver/trunk/geoserver/web/pom.xml = jar
^Seems odd. Plus I can’t see any other war pom’s in any other modules either.
Next, I will look at how to embed a jetty or tomcat to launch geoserver from the command line. mvn geoserver:start or something.
I suggest you look in the geoserver sources, it seems there
is most of what you need… I think you want to make something
separated from GeoServer that allows people customization without
needing to check out the sources, right?
Cheers
Andrea