Skip to content

Webservice Build Project

Sivasurya Santhanam edited this page Sep 24, 2018 · 7 revisions
ℹ️
Before starting, please make sure you already set up the KnowledgeFinder requirements: KnowledgeFinder - Prerequisites
ℹ️
To build the project, another configuration project is needed, e.g. the KnowledgeFinder example configuration. In the following the example configuration project is used to illustrate the set up. A list of configuration projects can be found at KnowledgeFinder - Instances.

Clone

You also need the knowledgefinder-core project: https://github.com/KnowledgeFinder/knowledgefinder-core.git

Build

Deactivate Portlet (optional)

Comment the usage of the module knowledgefinder-webapp/portlet (only if you want to run the webservice without the portlet/visualization):

knowledgefinder-webapp/pom.xml

...
<modules>
    ...
    <!--<module>portlet</module>
    <module>${knowledgefinder.path.prefix}knowledgefinder-config-${knowledgefinder.instance.name}/portlet-config</module>-->
</modules>
...

Configurations

Set the path to your local liferay installation:

knowledgefinder-webapp/pom.xml

...
<properties>
    <knowledgefinder.liferay.dir>/path/to/liferay/installation</knowledgefinder.liferay.dir>
    ...
</properties>
...
ℹ️
Instead you can also add -Dknowledgefinder.liferay.dir=/path/to/liferay/installation to your maven goal. This will overwrite the variable set in the properties.

Solr

This webservice requires a instance of Apache Sol running with KnowledgeFinder - Solr Index. The connection information needs to be configured in the webservice.properties in your webservice configuration project. For an example configuration see the documentation of the KnowledgeFinder example project.

Maven

  • Command line:

    cd ./knowledgefinder-webapp/
    mvn clean install

    If Maven runs out of memory set the environment variable MAVEN_OPTS e. g. to -Xmx512m.

  • Eclipse:

    • Add new Maven Run Configuration with base directory ${workspace_loc:/knowledgefinder-webapp}, goal clean install to build the webservice project.

Add auto deploy

run the maven-liferay plugin

  • Command line:

    cd ./knowledgefinder-webapp/
    mvn liferay:deploy

    If Maven runs out of memory set the environment variable MAVEN_OPTS e.g. to -Xmx512m.

  • Eclipse:

    • Add new Maven Run Configuration with base directory ${workspace_loc:/knowledgefinder-webapp}, goal liferay:deploy to build the webservice project.