How to create a developer workspace for Kitodo.Production with Eclipse on Windows
- Make sure you have Java SE Development Kit in at least version 8 installed
- Make sure you have Git installed
- Make sure you have Maven installed
- Make sure you have Eclipse IDE for Java EE Developers installed
Make sure the Maven
bin directory is on your
PATH, and that
JAVA_HOME points to the root directory of the JDK (not the JRE). Right-click the start menu, select System, Extended system settings, Environment variables to do so. Be careful when you try to add an entry to the path: Click New, then type at least one character into the appearing text box before clicking Browse…. Otherwise, instead, the last entry in the list will be replaced. You need to restart an open
cmd.exe window for the changes to take effect.
Make sure the path of your Eclipse Workspace does not contain any dot. To check this, right-click on your Eclipse workspace folder in Windows Explorer, select Properties, Security, and examine the object name. If necessary, move your workspace or create a new one in a suitable location.
Get the source code
Create the data-file structure
Create the data-file structure required by Kitodo.Production (outside the Eclipse workspace):
mkdir config debug logs messages metadata modules plugins plugins\command plugins\import plugins\opac plugins\step plugins\validation rulesets scripts temp users xslt
modules.xml and all
Kitodo\src\main\resources\ into the
Copy the contents of
Kitodo\rulesets\ to the
Create the following four batch files with the following content in the in the
Kitodo\src\main\resources\ to the folder
In the source directory that you just cloned, create a folder named
local-config. Copy the following files there:
Edit the following parameters your copy of
kitodo_config.properties to point to the data directories you created. Use forward slashes as separators, and end the path entries with a forward slash. You need to edit the following parameters:
Kitodo\src\main\resources\log4j.xml so that
<Property name="filename"> points to your
On the command line, change to the directory you just cloned and execute the following command:
mvn clean install
Set up the database
Create the MqSQL Database and the user:
create database kitodo; grant all privileges on kitodo.* to kitodo@localhost identified by ´kitodo´; flush privileges;
default.sql from the folder
Kitodo\setup into the database. There will be warnings because the scripts handle some cases for backward compatibility. You can safely ignore them.
Then, change into the subfolder Kitodo-DataManagement and execute the following command to migrate your database:
mvn clean install -Pflyway
Exclude the Eclipse
.project and runtime files from Git
- Go to the file system and find the
.gitfolder in the project folder in your Eclipse workspace. By default, this folder is hidden, so you need to configure your Explorer to show hidden files and folders to see it.
- Find the
infosubfolder in that folder, o create it if it is missing.
- Find or create a file named
- List any files and directories you need to exclude in that file.
- Sometimes you need to restart Eclipse for changes to take effect.
**/.classpath **/.project **/.settings
Eclipse’s Maven import will create a lot of projects in your workspace which all need a bit of configuration, as listed below. You can simplify this by creating a new workspace and only configure the workspace settings once accordingly.
Add projects: In Eclipse, select File, Import, Maven, Existing Maven project. Point the root directory to your project directory and import all projects.
Tomcat: You have to increase the Tomcat startup time-out. You can do so from the server in the Servers view. If the Tomcat is not yet listed, select Window, Preferences, Server, Runtime Environments and add it there. Double-click the server in the Servers view, extend the time-out on the appearing page under Timeouts. You have to click save for the changes to take effect. I also recommend to open the launch configuration (from the same page), Arguments, and add
-Xmx3g to VM arguments.
Code formatter: Import
config\Kitodo-IDE-formatting-Eclipse.xml and set the code formatter to use the imported Kitodo-Java Formatter Settings.
Imports: The project has decided not to import packages, but only to explicitly import used classes, and to sort them alphabetically. Go to the Organize Imports page, remove all packages to be handled specially from the list, and set the both Number of inputs needed values to something like
Checkstyle: Get the Checkstyle plug-in and configure it to use the config file
Prepare the web application
For any further steps and thoughout all development, make sure Elasticsearch is running. You start it by running
elasticsearch.bat in the bin folder of the unzipped installation.
In Eclipse, right-click on the kitodo project, select run as, run on server, to launch Kitodo.Production in your Tomcat.
Access the web application under http://localhost:8080/kitodo and log in as user
testadmin with password
From the navigation menu, select Indexing. First, create the elasticsearch mapping by clicking the corresponding button on the top of the page. Then, create the whole index by clicking on the start indexing button on the bottom of the page. When this has finished, you have to log out and back into the web application.