Re. Gate Embedded - Problems with set up - SOLVED


jim.baird@...
 

Hi All

 

I have fixed this. In the windows command prompt I ran (in the root directory of the project):

 

mvn eclipse:clean

 

then

 

mvn eclipse:eclipse

 

Regards

 

Jim

 

From: James Baird <jimbobaird@...>
Sent: 09 July 2018 09:10
To: gate-users@groups.io
Subject: Gate Embedded - Problems with set up

 

Dear Group

 

I am trying to use GATE Embedded in an existing project but have encountered multiple problems in getting this set up.

 

I have a working version of GATE developer (8.5.1) installed on a Windows PC. I am using Maven.

 

I have tried to add the dependency

 

<dependency>

      <groupId>uk.ac.gate</groupId>

      <artifactId>gate-core</artifactId>

      <version>8.5.1</version>

      <scope>compile</scope>

    </dependency>

 

to the pom of my existing project and tried to run the test code below (and various other tests). The non-gate parts of the program run but there is no reaction to the GATE related commands.

 

try {

                          Gate.init();

                    } catch (GateException e2) {

                          // TODO Auto-generated catch block

                          e2.printStackTrace();

                    }

                    try {

                          Factory.newDocument("This is a document");

                    } catch (ResourceInstantiationException e2) {

                          // TODO Auto-generated catch block

                          e2.printStackTrace();

                    }

 

In earlier attempts (which I am unable to recreate) I received error messages that gate.home was not set and to use a -DGate.home command (or similar). I’m not sure where that needs to be done though.

 

I have tried using code in the project to System.setProperty("gate.home", "/some/directory"); but still get the error saying that hate.home is not set / can not be inferred. On Stackoverflow I have read that gate.home should point at the “plugins” folder (which I am not sure is right) and in other responses at the folder with the jars. I have tried all likely folders.

 

I note that in my install of GATE 8.5.1, there was no “plugins” folder and I have even tried adding one.

 

I have looked at the tutorials and wikis but have found no more detail on what folder this should be pointing at.

 

I have also tried importing the module 8 project in the developer tutorial and get similar error messages.

 

I am not that technical so it would be great to get some pointers that assume I know relatively little.

 

Thanks in advance

 

Jim


Ian Roberts
 

On Mon, Jul 9, 2018 at 09:37 am, <jim.baird@...> wrote:

The non-gate parts of the program run but there is no reaction to the GATE related commands.

For the code you've posted I wouldn't expect any "reaction" - your code just initialises GATE and creates a document but doesn't save a reference to that document to do anything else with it.  GATE 8.5 and later does not require a "gate.home" or a plugins folder (the Stack Overflow posts you've seen will refer to earlier versions of GATE) so that Maven dependency should be all you need to add.

If you want a tutorial to follow then the programming track section of the most recent training course (https://gate.ac.uk/wiki/TrainingCourseJune2018/) is the only one that has been updated for 8.5 - "module 8" sounds like a course from an earlier year, which will be for an old version of GATE.

Ian