changeset 863:1afa4f5d4190

Removed duplicated mapfile path configurations and replaced absolute path definitions with relative ones (issue218, issue220). gnv-artifacts/trunk@1001 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 27 Apr 2010 12:52:37 +0000
parents 62cf1a5555b9
children 2b8707432121
files gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/conf.xml gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java
diffstat 3 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Tue Apr 27 10:11:30 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Apr 27 12:52:37 2010 +0000
@@ -1,3 +1,13 @@
+2010-04-27  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	  Issue218 & Issue220
+
+	* doc/conf/conf.xml: Removed duplicated mapfile path configurations and
+	  replaced absolute path definitions with relative ones.
+
+	* src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java:
+	  Changed XPath expression regarding the changes in conf.xml.
+
 2010-04-27  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	  Issue6
--- a/gnv-artifacts/doc/conf/conf.xml	Tue Apr 27 10:11:30 2010 +0000
+++ b/gnv-artifacts/doc/conf/conf.xml	Tue Apr 27 12:52:37 2010 +0000
@@ -500,7 +500,7 @@
         <!-- In this section the required Configuration for mapfile generation is
              given. -->
             <map-generator>
-            <mapfile path="/opt/artifacts/mapfiles/mapfile.map" />
+            <mapfile path="${artifacts.config.dir}/../mapfiles/mapfile.map" />
             <templates>
                 <path>${artifacts.config.dir}/maptemplates</path>
                 <maptemplate>mapfile.vm</maptemplate>
@@ -510,7 +510,6 @@
 
     <mapserver>
         <server path="http://denmark.atlas/cgi-bin/mapserv" />
-        <map path="/opt/artifacts/mapfiles/mapfile.map" />
     </mapserver>
 
     <velocity>
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java	Tue Apr 27 10:11:30 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/context/GNVArtifactContextFactory.java	Tue Apr 27 12:52:37 2010 +0000
@@ -149,7 +149,7 @@
      *
      */
     public final static String XPATH_MAP_PATH =
-        "/artifact-database/mapserver/map/@path";
+        "/artifact-database/gnv/map-generator/mapfile/@path";
 
     /**
      * Constructor
@@ -753,6 +753,7 @@
 
         String mapPath = (String) Config.getStringXPath(
             config, XPATH_MAP_PATH);
+        mapPath        = Config.replaceConfigDir(mapPath);
 
         if (serverPath != null && mapPath != null) {
             context.put(GNVArtifactContext.MAPSERVER_SERVER_PATH_KEY,serverPath);

http://dive4elements.wald.intevation.org