Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L ls.ext
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • digibib
  • ls.ext
  • Wiki
  • Development Services

Last edited by Petter Goksøyr Åsen Mar 29, 2017
Page history

Development Services

Setting up development in services

Services is a Java project with a Gradle build environment.

Pre-requisites

The following requirements must be met to develop Services:

  • 127.0.0.1 localhost xkoha catalinker patron_client fuseki services added to /etc/hosts WHY?
  • Git
  • Gradle (For installation, see below)
  • JDK 8 (One of Oracle JDK8 | OpenJDK)
  • Suitable IDE

Note on IDEs: Generally, we have used IntelliJ IDEA, which comes in both community and paid-for editions. Previously, we have used two open-source IDEs (Eclipse and Netbeans) without much problem, however, IntelliJ seems to have an edge as we can use it with both Java and Node/Javascript/JSX.

Yes, you can use vim, emacs, whatever, but then you know what you're doing and there isn't much we can do to help you.

Here, we'll cover setting up IntelliJ IDEA.

Getting the source

If you haven't already, clone the source with:

$ git clone https://github.com/digibib/ls.ext.git

Then, move to the redef/services folder

$ cd redef/services

Since we're using Gradle wrapper, you should be able to install Gradle simply by running the gradlew shell script:

$ ./gradlew

This will also build the project.

Importing the project into IntelliJ

In IntelliJ, if you have a project open, select File > New > Project from existing sources. If you have no project open, click Import project on the welcome splash screen.

At this point, you have two choices:

  • if you want to use IntelliJ for all development, simply choose the ls.ext root directory;
  • if you want to use IntelliJ only for Java development (i.e. if you're using IntelliJ community edition), choose the redef/services directory.

We will proceed as if we were using IntelliJ community edition and choose redef/services.

If IntelliJ guesses that the project is a Gradle project, you may not see the following dialogue, but select Import project from external model: Gradle:

image

In the next dialogue, select Use auto-import and ensure that Use gradle wrapper task configuration is selected.

image

This imports the project. Before we do anything else, check File > Project structure and ensure that the Java 8 SDK is selected and that the SDK default for Java 8 (Labdas, type annotations, etc.) is selected.

image

Running build tasks

Build tasks can be run from the command line or in IntelliJ directly via the Gradle project tab on the right-hand side of the IntelliJ desktop.

Setting up remote debugging

Click Run > Edit configurations, in the dialogue, click + in the top-left corner and select Remote.

In the Settings section, add Host: localhost and Port: 5070. (The port is defined in the dockerfile for services.)

image

Clone repository
  • Backup & restore
  • Catalinker
  • Development Patron client
  • Development Services
  • Documentation todo
  • HTTP flows
  • Home
  • JSON LD PATCH
  • Ontology
  • Patron Client todo
  • System component interfaces ports
  • System components overview
  • deichman stack