Ok Guys... Here Goes....
apologies this is off the top of my head and on not on my dev machine to
test right now...
1. Create a copy of geoserver, with an empty data dir. - geoserver
"nodata". (In future this should be in a public repo already)
1. download geoserver.war (I used v1.6.3)
2. extract the contents with jar -xvf geoserver.war
3. take a backup of the /data dir.... cp -Rv ./data /tmp/. (you
will need this later)
4. remove the contents of the data dir... rm -rf ./data/*
5. remove original geoserver.war rm -rf geoserver.war
6. repack into new war, without data.. jar -cvf jar -xvf
geoserver-1.6.0-nodata.war *
2. Install the nodata geoserver in the local maven repo
(~/.m2/repository/) (In future this should be in a public repo already)
1. mvn install:install-file -Dfile=geoserver-1.6.3-nodata.war
-DgroupId=org.geoserver -DartifactId=geoserver -Dversion=1.6.3
-Dpackaging=war -Dclassifier=nodata -DgeneratePom=true
-DcreateChecksum=true
3. Create a Maven project that uses the above.... and containts
geoserver_data_dir contents. (In future this is the only part required by a
developer if geoserver-nodata is hosted in a public repo - in fact a
customer archetype could fix this too).
1. mkdir ./mygeoserver
2. mkdir(s) ./mygeoserver/src/main/webapp/data
3. cp -Rv /tmp/data/. (this is the backup you took earlier)
4. create ./mygeoserver/pom.xml (attached below)
4. Run your geoserver
1. cd ./mygeoserver
2. mvn clean install jetty:run-war -Pjetty.port=2468
3. open a browser up to http://localhost:2468/geoserver
ALL DONE! Now your geoserver is reading/writing/messing with data in the
./src/main/webapp/data/ dir.. and that means you can check that into your
scm. It also means you can do filter building on things, multi module
projects, staged releases, profile builds... it goes on and on - all good
reasons to do this.
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>mygeoserver</artifactId>
<groupId>yourGroupId</groupId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>mygeoserver</name>
<description>Customized geoserver type 'mvn install jetty:run-war
-Djetty.port=2468' and goto http://localhost:2468.</description>
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
<contextPath>/geoserver</contextPath>
<systemProperties>
<systemProperty>
<name>GEOSERVER_DATA_DIR</name>
<value>${basedir}/src/main/webapp/data</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.geoserver</groupId>
<artifactId>geoserver</artifactId>
<version>1.6.3</version>
<classifier>nodata</classifier>
<type>war</type>
</dependency>
</dependencies>
</project>
On Wed, Apr 16, 2008 at 9:30 AM, Andrew Hughes <[EMAIL PROTECTED]> wrote:
> Releasing/Deploying a war to a repository is 'default' behaviour of the
> 'mvn release:prepare release:perform' goals - providing the
> <packaging>war</packaging>.
>
> One thing that was an annoying problem is the 30MB release, but we might
> be able to save 7MB of that by removing ./data. I had a small think about
> this, and it *should* be possible to release two instances of the geoserver
> war. One version as it is now, and another with a classifier=nodata,
> resulting in geoserver-1.6.0-nodata.war. This can be the dependency that the
> "standalone/out the box"...
>
> <dependency>
> <groupId>geoserver</groupId>
> <artifactId>geoserver</artifactId>
> <version>1.6.0</version>
> <classifier>nodata</classifier>
> </dependency>
>
> Anyway, its all talk for now... but food for thought.
>
> --AH
>
>
>
> On Tue, Apr 15, 2008 at 10:56 PM, Andrea Aime <[EMAIL PROTECTED]> wrote:
> > Andrew Hughes ha scritto:
> > ...
> >
> >
> > > Hum, ok, but I don't know how to push a .war onto a repository...
> I'm
> > > not even sure we would like to do so. Each .war is 30MB, we'd have
> to
> > > make sure the .war are pushed onto the repo only during the release
> > > process (as opposed to publishing them daily as we for, for
> instance,
> > > with the geotools jars)
> > >
> > >
> > > I would have to say, that this *should* really only be used with
> releases
> > and not SNAPSHOTS, but of course we all like to test.
> > >
> >
> > Very much agreed... thought I have no idea how to make a .war be
> deployed,
> > nor how to make an artifact be deployed only during the release...
> probably
> > using some profile...
> >
> >
> >
> > > Hum, this sounds like a good candidate for a community module.
> > > Interested in working on it and providing some guidance on how to
> > > use it in the
> > > wiki?
> > >
> > >
> > > I will try to find some time to see how complex this is in the next
> couple
> > of days.
> > >
> >
> > Nice. Looking forward to hear your findings.
> > 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