[GeoNode-devel] RV: GeoExplorer Custmoization - RE: [GeoNode-users] GeoNode-GeoExplorer advice

David Alda Fernandez de Lezea dalda at hazi.eus
Mon Jan 25 01:18:58 PST 2016


Hi,

Any ideas on how to customize the GeoExplorer component?? Which Files do I have to edit? How can I re-build the component and publish it in GeoNode?

Help is much appreciated.

Thanks in advance.

Agur bero bat,


David Alda Fernández de Lezea
Área de Sistemas de Información Geográfica, Planificación Territorial y Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren Arloa.
dalda at hazi.eus | www.hazi.eus
T 945 003 240 – M 627 923 170 – F 945 003 290 
Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute – Araba
 
*********************  LEGE OHARRA   *******************   AVISOLEGAL   *******************   DISCLAIMER   *****************************
Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta kontserbatu gabe.
Este mensaje es personal y confidencial y su uso no autorizado está prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo, sin reenviarlo ni conservarlo.
This message is personal and confidential, unauthorised use is legally prohibited. If you are not the intended recipient, delete it without resending or backing it.

-----Mensaje original-----
De: geonode-devel [mailto:geonode-devel-bounces at lists.osgeo.org] En nombre de David Alda Fernandez de Lezea
Enviado el: viernes, 22 de enero de 2016 13:56
Para: geonode-devel at lists.osgeo.org
Asunto: [GeoNode-devel] GeoExplorer Custmoization - RE: [GeoNode-users] GeoNode-GeoExplorer advice

Hi,

I resend this email from the users list as I wanted to work on some modifications on the GeoExplorer element and after a tough process I've finally managed to make the app run (Yeeeha!), but on the way I've found several errors that I detail below (in my case I only wanted to work with GeoExplorer so some of the solutions provided "avoid" those problems in some way): 

[ERROR]
Failed to execute goal on project geoexplorer: Could not resolve dependencies for project org.opengeo:geoexplorer:jar:4-SNAPSHOT: Failure to find org.ringojs:ringojs:jar:0.8.1 in http://repo.opengeo.org/ was cached in the local repo.  http://repo.opengeo.org --> IT DOESN'T EXIST!

[SOLUTION]
Changed http://repo.opengeo.org/ for https://repo.boundlessgeo.com/main 

[ERROR]
Can't get http://www.nacis.org/naturalearth/50m/cultural/ne_50m_admin_0_countries.zip to C:\Datos\Proyectos\42_GEONODE\opengeo-suite\suite\geoserver\data_dir\externals\suite-data\default\ne_50m_admin_0_countries.zip --> IT DOESN'T EXIST!

[SOLUTION]
Edit the file suite\geoserver\data_dir\externals\suite-data\default\build.xml and comment the line in which appears the referenced file

  <!--<property name="ne_base_url" value="http://www.nacis.org/naturalearth/50m/cultural"/>-->

And change it for 

  <property name="ne_base_url" value="http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural"/>


[ERROR]
 suite-data\default\build.xml:31: Execute failed: java.io.IOException: Cannot run program "ogr2ogr" (in directory "C:\Datos\Proyectos\42_GEONODE\opengeo-suite\sui
te\geoserver\data_dir\externals\suite-data\default\workspaces\usa\data"): Create Process error=2, El sistema no puede encontrar el archivo especificado around Ant part ...<ant dir="externals/suite-data/default"/>... @ 4:44 in C:\Dat os\Proyectos\42_GEONODE\opengeo-suite\suite\geoserver\data_dir\target\antrun\bui
ld-main.xml
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)

Don't ask me why but it seems that the ogr2ogr program could not be found. It's just a geoserver's data_dir related issue, so I skip it.

[SOLUTION]

Comment the block in which appears de <exec></exec> tags on line 31 , file opengeo-suite\suite\geoserver\data_dir\externals\suite-data\default\build.xml

[ERROR] Failed to execute goal on project geowebcache: Could not resolve depende ncies for project org.opengeo:geowebcache:war:4-SNAPSHOT: Could not find artifac t org.geowebcache:geowebcache:war:1.5.1 in opengeo (https://repo.boundlessgeo.com/main/) -> [Help 1]

[SOLUTION]

As I only want to work with geoexplorer so I skip this module by executing the clean install with some extra parameters that exclude the project geowebcache

mvn -X clean install -pl !geowebcache

[ERROR] 

Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project geoexplorer: An Ant BuildException has occured: Java returned: -1 around Ant part ...<java fork="true" classname="org.ringojs.tools.launcher.Main" failonerror="true">... @ 40:84 in C:\Datos\Proyectos\42_GEONODE\opengeo-suite\suite\geoexplorer\target\antrun\build-main.xml

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project geoexplorer: An Ant BuildException has occured: Java returned: -1 around Ant part ...<java fork="true" classname="org.ringojs.tools.launcher.Main" failonerror="true">... 


   [java] Entry not found in assets: widgets/ClassificationPanel.js (C:\Datos\Proyectos\42_GEONODE\opengeo-suite\suite\geoexplorer\externals\buildkit\lib\buildkit\merge.js#85)
     [java] 	at C:\Datos\Proyectos\42_GEONODE\opengeo-suite\suite\geoexplorer\externals\buildkit\lib\buildkit\merge.js:85 (anonymous)
     [java] 	at C:\Datos\Proyectos\42_GEONODE\opengeo-suite\suite\geoexplorer\externals\buildkit\lib\buildkit\merge.js:28 (anonymous)
     [java] 	at C:\Datos\Proyectos\42_GEONODE\opengeo-suite\suite\geoexplorer\externals\buildkit\lib\buildkit\merge.js:99 (anonymous)
     [java] 	at C:\Datos\Proyectos\42_GEONODE\opengeo-suite\suite\geoexplorer\externals\buildkit\lib\buildkit\merge.js:110 (anonymous)
     [java] 	at C:\Datos\Proyectos\42_GEONODE\opengeo-suite\suite\geoexplorer\externals\buildkit\lib\buildkit\build.js:54 (main)
     [java] 	at C:\Datos\Proyectos\42_GEONODE\opengeo-suite\suite\geoexplorer\externals\buildkit\lib\buildkit\build.js:73
     [java]

[SOLUTION]

Remove reference in file suite\geoexplorer\buildjs.cfg references to widgets/ClassificationPanel.js


The final command outputs BUILD SUCCESS


[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] OpenGeo Suite ...................................... SUCCESS [  2.687 s] [INFO] OpenGeo Suite GeoServer ............................ SUCCESS [  3.653 s] [INFO] OpenGeo Suite GeoServer Externals .................. SUCCESS [  4.670 s] [INFO] OpenGeo Suite GeoServer Extensions ................. SUCCESS [  5.633 s] [INFO] GeoServer Data Directory ........................... SUCCESS [01:08 min] [INFO] OpenGeo Suite GeoServer Web Application ............ SUCCESS [  2.172 s] [INFO] OpenGeo Suite GeoServer Web Demo Module ............ SUCCESS [  9.857 s] [INFO] OpenGeo Suite GeoServer Web Theme Module ........... SUCCESS [  4.774 s] [INFO] OpenGeo Suite GeoServer Web App Module ............. SUCCESS [02:19 min] [INFO] OpenGeo Suite GeoExplorer .......................... SUCCESS [01:06 min] [INFO] OpenGeo Suite Dashboard ............................ SUCCESS [  2.296 s] [INFO] OpenGeo Suite Jetty Module ......................... SUCCESS [ 14.073 s] [INFO] OpenGeo Recipe Book ................................ SUCCESS [ 13.355 s] [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:37 min
[INFO] Finished at: 2016-01-22T12:23:25+01:00 [INFO] Final Memory: 60M/406M [INFO] ------------------------------------------------------------------------


Now that everything is built, run the command "ant debug" inside the geoexplorer directory and open a web browser and go to http://localhost:9080/ . You'll now see the composer.

So, finally, after having everything alright I'd like to know which files/folders should modify to add new functionalities and how to rebuild the lib.

Hope this process could help someone else.

Regards,

Agur bero bat,


David Alda Fernández de Lezea
Área de Sistemas de Información Geográfica, Planificación Territorial y Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren Arloa.
dalda at hazi.eus | www.hazi.eus
T 945 003 240 - M 627 923 170 - F 945 003 290 Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute - Araba
 
*********************  LEGE OHARRA   *******************   AVISOLEGAL   *******************   DISCLAIMER   ***************************** Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta kontserbatu gabe.
Este mensaje es personal y confidencial y su uso no autorizado está prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo, sin reenviarlo ni conservarlo.
This message is personal and confidential, unauthorised use is legally prohibited. If you are not the intended recipient, delete it without resending or backing it.


_______________________________________________
geonode-devel mailing list
geonode-devel at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geonode-devel


More information about the geonode-devel mailing list