[GeoNetwork-devel] problem in extending harvester for SOS 2.0

Dear all,

I am new in multi-modular Maven projects and need to work on the geonetwork source code. I need to do this for my master study.
I want to add one harvester for SOS 2.0 which uses not only Gecapabilities but also DescribeSensor. So, what I have done so far is, I manually imported a metadata for my SOS with getCapabilities operation and also used SensorML schema profile to include DescribSensor operation. Both worked fine.
Now I want to develop a kind of harvester which take the GetCapabilities and populate the metadata for SOS and SensorML.
To do so, I thought I should work on the source code directly. I wanted to import the downloaded Geonetwork-Core using Spring Tool Suite - Eclipse (i worked with this for another project and it was very convenient).
I followed the Geonwtrok developer manual however, the description is quite abstract for how to import it into eclipse. I am able to run “mvn clean install -DskipTests” in command line and it works. However when i import it (after and before running the mvn install) I always receive plenty of errors. My steps are:
-import an existing maven project
-select all proejcts
-import them

I have couple of questions:

  1. should I select all projects or only the main pom.xml in the main directory? (i believe it should be all)
  2. I believe that after downloading Geonetwork from Github I should be able to directly import it into eclipse and then install it withing eclipse. Am I right? If not does it mean that it is better that I install it first through command line and then import it to the eclipse? [btw for both I receive lots of errors but different types.]
  3. What is the best way to work with the source code?

I know these questions may seem stupid, but please be patient with me and please advice me.
Your help will be very much appreciated.
Mani

p.s. I haven’t put anything regarding errors as I feel my general approach is wrong. Just to give an idea, in web project, in the pom.xml I have this error:
web.xml is missing and is set to true. Or in web-app/target/webapp/WEB-INF/config.spring.geonetwrok.xml there are no such resource to be imported:

... I mean in this folder there is no sub-folder with name "config-security"

Hi,

I am not sure I have all the info needed to help you, but let me try:

···

On Sun, Jul 1, 2018 at 10:33 AM, mane moshref via GeoNetwork-devel <geonetwork-devel@anonymised.comorge.net> wrote:

To do so, I thought I should work on the source code directly. I wanted to import the downloaded Geonetwork-Core using Spring Tool Suite - Eclipse (i worked with this for another project and it was very convenient).

I usually use the Web/Java developers version of Eclipse. Other versions may have plugins missing (like the maven plugin one). Not sure about your version.

I followed the Geonwtrok developer manual however, the description is quite abstract for how to import it into eclipse. I am able to run “mvn clean install -DskipTests” in command line and it works. However when i import it (after and before running the mvn install) I always receive plenty of errors. My steps are:
-import an existing maven project
-select all proejcts
-import them

Eclipse usually showss errors that aren’t really errors (like XSD errors because of relative paths to imports). Unless it is saying that it can’t build the project, that’s fine.

I have couple of questions:

  1. should I select all projects or only the main pom.xml in the main directory? (i believe it should be all)

I usually only import child projects. Eclipse treats each resources folders independently for each project, so you may find duplicated resources when you open the “search for resource” utility window if you also import the main parent project.

  1. I believe that after downloading Geonetwork from Github I should be able to directly import it into eclipse and then install it withing eclipse. Am I right? If not does it mean that it is better that I install it first through command line and then import it to the eclipse? [btw for both I receive lots of errors but different types.]

The steps are the ones you took. So unless your eclipse version is missing something, it should be fine.

  1. What is the best way to work with the source code?

Usually cloning from git.

I know these questions may seem stupid, but please be patient with me and please advice me.
Your help will be very much appreciated.
Mani

p.s. I haven’t put anything regarding errors as I feel my general approach is wrong. Just to give an idea, in web project, in the pom.xml I have this error:
web.xml is missing and is set to true. Or in web-app/target/webapp/WEB-INF/config.spring.geonetwrok.xml there are no such resource to be imported:

... I mean in this folder there is no sub-folder with name "config-security"

Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


GeoNetwork-devel mailing list
GeoNetwork-devel@…537…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Many many thanks Maria for your reply.
Sorry for my late response. Wanted to check everything and then put all my questions together here:

  • If I import the child projects, then I receive errors for all pom.xml => “plugin execution not covered by lifecycle configuration: org.zeroturnariznd:jrebel-maven-plugin:1.1.5:generate” which I assume happens because the parent pom is not imported.

  • except the error in pom.xml (the on mentioned above) I have many errors in xml and xsd files “cvc-attributes / cvc-datatype-valid / cvc-complex-type / …”

  • another error which I have is
    "Referenced file contains errors (http://springframework/schema/beans/spring-beans-4.3.xsd). For more information, right click on the message in the Problems View and select “Show Details…”

  • the last question, how should I run the project? I normally run the project (here web-app) right-click → run configurations → add a new maven config with the goal jetty:run. This works fine.

Just have one silly beginner question. I have never worked with multi-module maven project.
when I add some classes to other modules, what is the best and fastest way to test it in eclipse?

Many thanks again for your hints.
Best regards
Mani

On Monday, July 2, 2018, 8:32:07 AM GMT+2, María Arias de Reyna delawen@anonymised.com wrote:

Hi,

I am not sure I have all the info needed to help you, but let me try:

On Sun, Jul 1, 2018 at 10:33 AM, mane moshref via GeoNetwork-devel <geonetwork-devel@lists.sourceforge.net> wrote:

To do so, I thought I should work on the source code directly. I wanted to import the downloaded Geonetwork-Core using Spring Tool Suite - Eclipse (i worked with this for another project and it was very convenient).

I usually use the Web/Java developers version of Eclipse. Other versions may have plugins missing (like the maven plugin one). Not sure about your version.

I followed the Geonwtrok developer manual however, the description is quite abstract for how to import it into eclipse. I am able to run “mvn clean install -DskipTests” in command line and it works. However when i import it (after and before running the mvn install) I always receive plenty of errors. My steps are:
-import an existing maven project
-select all proejcts
-import them

Eclipse usually showss errors that aren’t really errors (like XSD errors because of relative paths to imports). Unless it is saying that it can’t build the project, that’s fine.

I have couple of questions:

  1. should I select all projects or only the main pom.xml in the main directory? (i believe it should be all)

I usually only import child projects. Eclipse treats each resources folders independently for each project, so you may find duplicated resources when you open the “search for resource” utility window if you also import the main parent project.

  1. I believe that after downloading Geonetwork from Github I should be able to directly import it into eclipse and then install it withing eclipse. Am I right? If not does it mean that it is better that I install it first through command line and then import it to the eclipse? [btw for both I receive lots of errors but different types.]

The steps are the ones you took. So unless your eclipse version is missing something, it should be fine.

  1. What is the best way to work with the source code?

Usually cloning from git.

I know these questions may seem stupid, but please be patient with me and please advice me.
Your help will be very much appreciated.
Mani

p.s. I haven’t put anything regarding errors as I feel my general approach is wrong. Just to give an idea, in web project, in the pom.xml I have this error:
web.xml is missing and is set to true. Or in web-app/target/webapp/WEB-INF/ config.spring.geonetwrok.xml there are no such resource to be imported:

... I mean in this folder there is no sub-folder with name "config-security"

Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


GeoNetwork-devel mailing list
GeoNetwork-devel@anonymised.com sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/geonetwork- devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/ projects/geonetwork