-
Notifications
You must be signed in to change notification settings - Fork 269
Setting up IntelliJ IDEA
For developing DBpedia extraction-framework on Ubuntu. (The guide below was created using version 15.0 of IDEA.)
- From http://www.jetbrains.com/idea/download/index.html download the Community version available for Ubuntu(Linux).
- Go the the downloaded path
- Unpack the
idea-12.0.tar.gz
file using the following command:tar -zxvf idea-12.0.tar.gz
- Go to the
/bin
sub-directory (if needed, change permission of the ofidea.sh
file using commandchmod +x idea.sh
) - Run
idea.sh
from thebin
sub-directory using command./idea.sh
On the start screen, at the top left corner: Go to Open > Settings > IDE Settings > Plugins > Browse Repositories > search for Scala > right-click on Scala > Download and install > Restart
Please install Maven3. Builds with Maven2 are no longer supported.
You will need to set up M2_HOME (yes, even if it is Maven3) as an environment variable in your ~/.bashrc
and/or ~/.profile
, or the path to your Maven home directory in IDEA under File > Settings > Maven > Maven home directory
VCS > Checkout from version control > Git > https://github.com/dbpedia/extraction-framework.git
File > New project... > Import project from external model > Maven > Root directory: $PATH_TO_DBPEDIA_EXTRACTION_FRAMEWORK_CODE
Tick "Import maven projects automatically"
Next > Next >
Please select project SDK: add Java JDK (1.7)
-> Finish
-
Run -> Edit Configurations... ->
-
click "+" -> Application -> Set the parameters for download:
-
Name:
Download
-
Main class:
org.dbpedia.extraction.dump.download.Download
(type it yourself) -
Program arguments:
config = "your config file name"
(config=download.minimal.properties
for example) -
Working directory:
path-to-your-extraction-framework/extraction-framework/dump
-
Use classpath of module:
dump
-
Name:
-
click "+" -> Application -> Set the following parameters:
-
Name:
Extraction
-
Main class:
org.dbpedia.extraction.dump.extract.Extraction
(type it yourself) -
Program arguments : your config file name (
extraction.default.properties
for example) -
Working directory :
path-to-your-extraction-framework/extraction-framework/dump
-
Use classpath of module :
dump
-
Name:
-
click "+" -> Application -> Set the following:
-
Name:
Server
-
Main class:
org.dbpedia.extraction.server.Server
-
VM options:
-XX:+UseConcMarkSweepGC
-
Program arguments: server configuration file (for example
server.default.properties
) -
Working directory:
path-to-your-extraction-framework/extraction-framework/server
-
Use classpath of module:
server
-
Name:
-
click OK
-
Save this configuration , select it when running run or Debug from the interface next time (next to the run green button above).
-
Make sure you update your paths inside your configuration files, for example, in
download.minimal.properties
, replacebase-dir
by your target folder. This step is mandatory in order to avoid errors when running the project. -
Another step to avoid missing mapping file errors is to download those missing files. You can get them following these steps (in your
extraction-framework
path):1. cd core 2. ../run download-mappings
-
Also, you could try limiting the languages to one only e.g.
en
instead of@mappings
in your language configuration file:# List of languages, e.g. 'en,de,fr' or '@mappings' languages=@mappings
-
Or change the
mappingsDir
to something that does not exists to force downloading from the server:# ontology file. if it doesn't exist, load from server ontologyFile=../doesnotexists/ontology.xml # mappings dir. if it doesn't exist, load from server mappingsDir=../doesnotexists/mappings
Now, you are good to go!