Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Webservice Build Project

anja edited this page Jan 11, 2017 · 7 revisions
ℹ️
Before starting, please make sure you already set up the KnowledgeFinder requirements: KnowledgeFinder - Prerequisites
Also this webservice requires an instance of Apache Solr running with KnowledgeFinder - Dataimport.

Build Project

Clone

ℹ️
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.

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>${knowledgefinderII.path.prefix}knowledgefinder-config-${knowledgefinderII.instance.name}/portlet-config</module>-->
</modules>
...

Configurations

Set the path to your local liferay installation:

knowledgefinder-core/pom.xml

...
<properties>
    <knowledgefinderII.liferay.dir>/path/to/liferay/installation</knowledgefinderII.liferay.dir>
    ...
</properties>
...
ℹ️
Instead you can also add -DknowledgefinderII.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 II - 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.

Liferay Server for Development

Eclipse with Liferay IDE

Install Liferay IDE

  • optional: needed for having the liferay server option in eclipse

  • search in eclipse marketplace for liferay and install the Liferay IDE

Setup Server

  1. Open the Servers view

  2. Create a new server

  3. Select Liferay, Inc. → Liferay v6.2 CE Server (Tomcat 7)

  4. Provide your Liferay Tomcat directory

  5. Start the Server

ℹ️
If you encounter a java.lang.OutOfMemoryError on start up, add the VM argument "-XX:MaxPermSize=256m" to the servers run configuration.

Commandline

To fireup Liferay portal, see https://web.liferay.com/de/quick-start point 3

Clone this wiki locally