[Geoserver-devel] Building Geoserver minimal war

Hi,

just started playing a bit with geoserver. How do you build the version with minimal configuration?
I see the minimal.zip, basic.zip, cite.zip etc. Properties in the web project but I don't know
how to get a deployable war with these configuration options?
The war:war target leaves me with a 36m war which contains all sorts of sample data etc...

I want to include geoserver in my existing spring-webapp to display some geodata with openlayers.

Regards,

Nils

Hi,
to change the configuration you have to specify its name on the -DconfigId Java option.
For example, if you would like to compile GeoServer using the minimal configuration, just write the following command line:

mvn -DconfigId=minimal clean install

Once the process is done, you can find the WAR file into the web/target directory.

On 1/17/07, Nils Liebelt <nils.liebelt@anonymised.com> wrote:

Hi,

just started playing a bit with geoserver. How do you build the version
with minimal configuration?
I see the minimal.zip, basic.zip, cite.zip etc. Properties in the web
project but I don’t know
how to get a deployable war with these configuration options?
The war:war target leaves me with a 36m war which contains all sorts of
sample data etc…

I want to include geoserver in my existing spring-webapp to display some
geodata with openlayers.

Regards,

Nils


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Eng. Alessio Fabiani
Vice President/CTO GeoSolutions

http://www.geo-solutions.it


Hi,

here's is the catalog from the build:

<?config.xml version="1.0" encoding="UTF-8"?>
<catalog>

<datastores>
</datastores>

<namespaces>
</namespaces>

<styles>
</styles>

</catalog>

Regards,

Nils

Alessio Fabiani schrieb:

Can you send me your WEB-INF/catalog.xml file? I'll send you back a fresh new one which should let you start-up an empty GeoServer
. Moreover be sure to delete every info.xml file you can find into the data directory.

On 1/19/07, *Nils Liebelt* <nils.liebelt@anonymised.com <mailto:nils.liebelt@anonymised.com>> wrote:

    Hi,

    I guess I have to correct myself. The building part was easy but
    left me
    with a war where the context won't start up. But well it was the trunk
    so I checked out the 1.4.0tagged release from
    https://svn.codehaus.org/geoserver/tags/1.4.0/ and run the "mvn
    install"
    on the web-project which terminates succesful but when deployiing on
    Tomcat (apache-tomcat-5.5.20 on the jvm 1.5 sun jre) I get
    following NPE
    (Stacktrace below). So my question how do I build a "running"
    version of
    the geoserver.war?

    Regards,

    Nils

    INFO: Deploying web application archive geoserver.war
    19.01.2007 11:55:19 org.springframework.web.context.ContextLoader
    initWebApplicationContext
    INFO: Root WebApplicationContext: initialization started
    19.01.2007 11:55:19
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader
    loadBeanDefinitions
    INFO: Loading XML bean definitions from URL
    [jar:file:/opt/tomcat/current/webapps/geoserver/WEB-INF/lib/main-1.4.0.jar!/applicationContext.xml]
    19.01.2007 11:55:20
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader
    loadBeanDefinitions
    INFO: Loading XML bean definitions from URL
    [file:/opt/tomcat/current/webapps/geoserver/WEB-INF/classes/applicationContext.xml]
    19.01.2007 11:55:20
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader
    loadBeanDefinitions
    INFO: Loading XML bean definitions from URL
    [jar:file:/opt/tomcat/current/webapps/geoserver/WEB-INF/lib/data-1.4.0.jar!/applicationContext.xml]
    19.01.2007 11:55:20
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader
    loadBeanDefinitions
    INFO: Loading XML bean definitions from URL
    [jar:file:/opt/tomcat/current/webapps/geoserver/WEB-INF/lib/wfs-1.4.0.jar!/applicationContext.xml]
    19.01.2007 11:55:20
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader
    loadBeanDefinitions
    INFO: Loading XML bean definitions from URL
    [jar:file:/opt/tomcat/current/webapps/geoserver/WEB-INF/lib/wms-1.4.0.jar!/applicationContext.xml]
    19.01.2007 11:55:20
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader
    loadBeanDefinitions
    INFO: Loading XML bean definitions from URL
    [jar:file:/opt/tomcat/current/webapps/geoserver/WEB-INF/lib/validation-1.4.0.jar!/applicationContext.xml]
    19.01.2007 11:55:20
    org.springframework.context.support.AbstractRefreshableApplicationContext

    refreshBeanFactory
    INFO: Bean factory for application context [Root
    WebApplicationContext]:
    org.springframework.beans.factory.support.DefaultListableBeanFactory
    defining beans
    [config,geoServer,globalConfig,data,dataConfig,dataRegisterar,dataConfigRegisterar,globalConfigRegisterar,geoServerRegisterar,speedServiceStrategy,fileServiceStrategy,bufferServiceStrategy,partialBufferServiceStrategy,applicationState,applicationStateRegisterar,catalog,serviceFinder,wfs,wfsConfig,wfsRegisterar,wfsConfigRegisterar,wfsAbstractService,wfsService,wfsGetCapabilities,wfsDescribeFeatureType,wfsGetFeature,wfsLockFeature,wfsGetFeatureWithLock,wfsTransaction,wms,wmsConfig,wmsRegisterar,wmsConfigRegisterar,wmsAbstractService,wmsService,wmsGetCapabilities,wmsDescribeFeatureType,wmsGetFeatureInfo,wmsGetLegendGraphic,wmsGetMap,wmsGetMapLegacy,wmsPutStyles,kmlReflector,PNGMapProducerFactory,JAIMapProducerFactory,SVGMapProducerFactory,GIFMapProducerFactory,KMLMapProducerFactory,KMZMapProducerFactory,PDFMapProducerFactory,validation,validationConfig,validationRegisterar,validationConfigRegisterar];

    root of BeanFactory hierarchy
    19.01.2007 11:55:20
    org.springframework.context.support.AbstractApplicationContext refresh
    INFO: 54 beans defined in application context [Root
    WebApplicationContext]
    19.01.2007 11:55:20 org.springframework.core.CollectionFactory
    <clinit>
    INFO: JDK 1.4+ collections available
    19.01.2007 11:55:20
    org.springframework.context.support.AbstractApplicationContext
    initMessageSource
    INFO: Unable to locate MessageSource with name 'messageSource': using
    default
    [org.springframework.context.support.DelegatingMessageSource@anonymised.com..]
    19.01.2007 11:55:20
    org.springframework.context.support.AbstractApplicationContext
    initApplicationEventMulticaster
    INFO: Unable to locate ApplicationEventMulticaster with name
    'applicationEventMulticaster': using default
    [org.springframework.context.event.SimpleApplicationEventMulticaster@...1036...
    ]
    19.01.2007 11:55:20
    org.springframework.ui.context.support.UiApplicationContextUtils
    initThemeSource
    INFO: Unable to locate ThemeSource with name 'themeSource': using
    default
    [org.springframework.ui.context.support.ResourceBundleThemeSource@anonymised.com1037...
    ]
    19.01.2007 11:55:20
    org.springframework.beans.factory.support.DefaultListableBeanFactory
    preInstantiateSingletons
    INFO: Pre-instantiating singletons in factory
    [org.springframework.beans.factory.support.DefaultListableBeanFactory
    defining beans
    [config,geoServer,globalConfig,data,dataConfig,dataRegisterar,dataConfigRegisterar,globalConfigRegisterar,geoServerRegisterar,speedServiceStrategy,fileServiceStrategy,bufferServiceStrategy,partialBufferServiceStrategy,applicationState,applicationStateRegisterar,catalog,serviceFinder,wfs,wfsConfig,wfsRegisterar,wfsConfigRegisterar,wfsAbstractService,wfsService,wfsGetCapabilities,wfsDescribeFeatureType,wfsGetFeature,wfsLockFeature,wfsGetFeatureWithLock,wfsTransaction,wms,wmsConfig,wmsRegisterar,wmsConfigRegisterar,wmsAbstractService,wmsService,wmsGetCapabilities,wmsDescribeFeatureType,wmsGetFeatureInfo,wmsGetLegendGraphic,wmsGetMap,wmsGetMapLegacy,wmsPutStyles,kmlReflector,PNGMapProducerFactory,JAIMapProducerFactory,SVGMapProducerFactory,GIFMapProducerFactory,KMLMapProducerFactory,KMZMapProducerFactory,PDFMapProducerFactory,validation,validationConfig,validationRegisterar,validationConfigRegisterar];

    root of BeanFactory hierarchy]
    19.01.2007 11:55:20 org.vfny.geoserver.global.xml.XMLConfigReader
    loadGlobal
    KONFIG: logging level is CONFIG
    19.01.2007 11:55:20 org.vfny.geoserver.global.xml.XMLConfigReader
    loadGlobal
    KONFIG: maxFeatures is 1000000
    19.01.2007 11:55:20 org.vfny.geoserver.global.xml.XMLConfigReader
    loadGlobal
    KONFIG: numDecimals returning is 8
    19.01.2007 11:55:20 org.vfny.geoserver.global.xml.XMLConfigReader
    loadGlobal
    KONFIG: charSet is UTF-8
    19.01.2007 11:55:20 org.vfny.geoserver.global.xml.XMLConfigReader
    loadWFS
    KONFIG: reading srsXmlStyle: [srsXmlStyle: null]
    19.01.2007 11:55:20 org.vfny.geoserver.global.xml.XMLConfigReader
    loadBaseMapLayers
    INFO: No baseMap groups defined yet
    19.01.2007 11:55:20 org.vfny.geoserver.global.xml.XMLConfigReader
    loadCatalog
    KONFIG: Loading configuration file:
    /opt/tomcat/current/webapps/geoserver/WEB-INF/catalog.xml
    19.01.2007 11:55:20
    org.springframework.beans.factory.support.AbstractBeanFactory
    destroySingletons
    INFO: Destroying singletons in factory
    {org.springframework.beans.factory.support.DefaultListableBeanFactory
    defining beans
    [config,geoServer,globalConfig,data,dataConfig,dataRegisterar,dataConfigRegisterar,globalConfigRegisterar,geoServerRegisterar,speedServiceStrategy,fileServiceStrategy,bufferServiceStrategy,partialBufferServiceStrategy,applicationState,applicationStateRegisterar,catalog,serviceFinder,wfs,wfsConfig,wfsRegisterar,wfsConfigRegisterar,wfsAbstractService,wfsService,wfsGetCapabilities,wfsDescribeFeatureType,wfsGetFeature,wfsLockFeature,wfsGetFeatureWithLock,wfsTransaction,wms,wmsConfig,wmsRegisterar,wmsConfigRegisterar,wmsAbstractService,wmsService,wmsGetCapabilities,wmsDescribeFeatureType,wmsGetFeatureInfo,wmsGetLegendGraphic,wmsGetMap,wmsGetMapLegacy,wmsPutStyles,kmlReflector,PNGMapProducerFactory,JAIMapProducerFactory,SVGMapProducerFactory,GIFMapProducerFactory,KMLMapProducerFactory,KMZMapProducerFactory,PDFMapProducerFactory,validation,validationConfig,validationRegisterar,validationConfigRegisterar];

    root of BeanFactory hierarchy}
    19.01.2007 11:55:20 org.springframework.web.context.ContextLoader
    initWebApplicationContext
    SCHWERWIEGEND: Context initialization failed
    org.springframework.beans.factory.BeanCreationException : Error
    creating
    bean with name 'config' defined in URL
    [jar:file:/opt/tomcat/current/webapps/geoserver/WEB-INF/lib/main-1.4.0.jar!/applicationContext.xml]:
    Initialization of bean failed; nested exception is
    org.springframework.beans.factory.BeanInitializationException: Error
    creating xml config reader; nested exception is
    org.vfny.geoserver.global.ConfigurationException:
    java.lang.NullPointerException
    org.springframework.beans.factory.BeanInitializationException : Error
    creating xml config reader; nested exception is
    org.vfny.geoserver.global.ConfigurationException:
    java.lang.NullPointerException
    org.vfny.geoserver.global.ConfigurationException:
    java.lang.NullPointerException
        at
    org.vfny.geoserver.global.xml.XMLConfigReader.loadCatalog(XMLConfigReader.java:300)
        at
    org.vfny.geoserver.global.xml.XMLConfigReader.load(XMLConfigReader.java:195)
        at
    org.vfny.geoserver.global.xml.XMLConfigReader
    .<init>(XMLConfigReader.java:145)
        at
    org.vfny.geoserver.global.Config.setApplicationContext(Config.java:43)
        at
    org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization
    (ApplicationContextAwareProcessor.java:84)
        at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:248)

        at
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:362)
        at
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean
    (AbstractBeanFactory.java:226)
        at
    org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
        at
    org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
    (DefaultListableBeanFactory.java:275)
        at
    org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
        at
    org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh
    (AbstractRefreshableWebApplicationContext.java:134)
        at
    org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
        at
    org.springframework.web.context.ContextLoader.initWebApplicationContext
    (ContextLoader.java:156)
        at
    org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
        at
    org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java
    :3763)
        at
    org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
        at
    org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at
    org.apache.catalina.core.ContainerBase.addChild
    (ContainerBase.java:739)
        at
    org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at
    org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
        at
    org.apache.catalina.startup.HostConfig.deployWARs
    (HostConfig.java:698)
        at
    org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at
    org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at
    org.apache.catalina.startup.HostConfig.lifecycleEvent
    (HostConfig.java:310)
        at
    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at
    org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
        at org.apache.catalina.core.StandardHost.start
    (StandardHost.java:718)
        at
    org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at
    org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at
    org.apache.catalina.core.StandardService.start
    (StandardService.java:450)
        at
    org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
        at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke (Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
    Caused by: java.lang.NullPointerException
        at
    org.vfny.geoserver.global.xml.XMLConfigReader.loadFeatureTypes(XMLConfigReader.java:1024)
        at
    org.vfny.geoserver.global.xml.XMLConfigReader.loadCatalog(XMLConfigReader.java:297)
        ... 38 more
    19.01.2007 11:55:20 org.apache.catalina.core.StandardContext start
    SCHWERWIEGEND: Error listenerStart

    Alessio Fabiani schrieb:
    > Yes, but you have to manually edit the GeoServer config files.
    >
    > However it depends on what kind of data you need to handle.
    Consider
    > that the GeoServer WMS uses the WFS as vectorial data provider and
    > WCS as raster data provider; so you cannot have just the WMS service
    > up, you need at least one of the others too.
    >
    > Remember that using the GEOSERVER_DATA_DIR environment variable,
    which
    > can be setted even inside the web.xml, you can move all the
    GeoServer
    > data to another path, and leave on the server just the core
    libraries
    > and code.
    >
    > On 1/17/07, *Nils Liebelt* < nils.liebelt@anonymised.com
    <mailto:nils.liebelt@anonymised.com>
    > <mailto:nils.liebelt@anonymised.com
    <mailto:nils.liebelt@anonymised.com>>> wrote:
    >
    > Hi,
    >
    > that worked well! But I have to strap it a bit more. I see
    all those
    > struts config for the WebGui etc. I don't need it that. All
    I want
    > to do
    > is make my webapp respond to few wms-urls. Is there like a
    minimal
    > ApplicationContext or web.xml . I could just use as starting
    point?
    >
    > Regards,
    >
    > Nils
    >
    > Alessio Fabiani schrieb:
    > > Hi,
    > > to change the configuration you have to specify its name
    on the
    > > -DconfigId Java option.
    > > For example, if you would like to compile GeoServer using the
    > minimal
    > > configuration, just write the following command line:
    > >
    > > mvn -DconfigId=minimal clean install
    > >
    > > Once the process is done, you can find the WAR file into the
    > > web/target directory.
    > >
    > > On 1/17/07, *Nils Liebelt* < nils.liebelt@anonymised.com
    <mailto:nils.liebelt@anonymised.com>
    > <mailto:nils.liebelt@anonymised.com
    <mailto:nils.liebelt@anonymised.com>>
    > > <mailto: nils.liebelt@anonymised.com
    <mailto:nils.liebelt@anonymised.com>
    > <mailto:nils.liebelt@anonymised.com
    <mailto:nils.liebelt@anonymised.com>>>> wrote:
    > >
    > > Hi,
    > >
    > > just started playing a bit with geoserver. How do you
    build the
    > > version
    > > with minimal configuration?
    > > I see the minimal.zip, basic.zip, cite.zip etc. Properties
    > in the web
    > > project but I don't know
    > > how to get a deployable war with these configuration
    options?
    > > The war:war target leaves me with a 36m war which
    contains all
    > > sorts of
    > > sample data etc...
    > >
    > > I want to include geoserver in my existing
    spring-webapp to
    > > display some
    > > geodata with openlayers.
    > >
    > > Regards,
    > >
    > > Nils
    > >
    > -------------------------------------------------------------------------
    > >
    > > Take Surveys. Earn Cash. Influence the Future of IT
    > > Join SourceForge.net's Techsay panel and you'll get the
    > chance to
    > > share your
    > > opinions on IT & business topics through brief surveys
    - and
    > earn
    > > cash
    > >
    > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;
    > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;&gt;
    > > <
    > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;
    > <
    http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;&gt;&gt;
    > > _______________________________________________
    > > Geoserver-devel mailing list
    > > Geoserver-devel@lists.sourceforge.net
    <mailto:Geoserver-devel@lists.sourceforge.net>
    > <mailto:Geoserver-devel@lists.sourceforge.net
    <mailto:Geoserver-devel@lists.sourceforge.net>>
    > > <mailto:Geoserver-devel@lists.sourceforge.net
    <mailto:Geoserver-devel@lists.sourceforge.net>
    > <mailto:Geoserver-devel@lists.sourceforge.net
    <mailto:Geoserver-devel@lists.sourceforge.net>>>
    > > https://lists.sourceforge.net/lists/listinfo/geoserver-devel
    > > <
    https://lists.sourceforge.net/lists/listinfo/geoserver-devel&gt;
    > >
    > > --
    > > -------------------------------------------------------
    > > Eng. Alessio Fabiani
    > > Vice President/CTO GeoSolutions
    > >
    > > http://www.geo-solutions.it < http://www.geo-solutions.it>
    > >
    > > ---------------------------------------------------------
    >
    > --
    > -------------------------------------------------------
    > Eng. Alessio Fabiani
    > Vice President/CTO GeoSolutions
    >
    > http://www.geo-solutions.it
    >
    > ---------------------------------------------------------

--
-------------------------------------------------------
Eng. Alessio Fabiani
Vice President/CTO GeoSolutions

http://www.geo-solutions.it

---------------------------------------------------------