-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up IntelliJ IDEA
for developing DBpedia Spotlight.
from http://www.jetbrains.com/idea/download/index.html
Java (JDK) must be installed for installing IDEA. Download (http://www.oracle.com/technetwork/java/javase/downloads/index.html) and install the recent version.
If you are using Linux, you may have some difficulty to install the jdk. So follow this tutorial (for Ubuntu): http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html
(The guide below was created using version 11.1.1 of IDEA.)
On the start screen (when all projects are closed), on the top right corner:
Open Plugin Manager > Browse repositories > search for Scala > right-click on Scala > Download and install > Restart (For new version of IDEA,configure > plugins >search for Scala > right-click on Scala > Download and install > Restart).
Please install Maven3. Builds with Maven2 are not supported any more.
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 > [email protected]:dbpedia-spotlight/dbpedia-spotlight.git
File > New project... > Import project from external model > Maven > Root directory: $PATH_TO_DBPEDIA_SPOTLIGHT_CODE (For new version of IDEA,import project > choose path > Import project from external model > Maven) Tick "Import maven projects automatically"
Next > Next > Finish
Do Not build the project directly by Build->Rebuild Project. Otherwise, you would get building errors as shown in the following figure. Instead, go to right bar of Intellij, open 'Maven Projects', then open 'DBpedia Spotlight annotation framework (parent POM)' > 'Lifecycle' and double-click install.
IntelliJ should handle all Maven dependencies correctly. If it does not, build the project with Maven outside of IDEA.
If you use Mac OS X, you will likely have bad font rendering in IntelliJ. To fix this, edit the file /Applications/IntelliJ IDEA 11 CE.app/Contents/Info.plist
by adding -Dawt.useSystemAAFontSettings=lcd
to VMOptions
. For example:
<key>VMOptions.x86_64</key>
<string>-Xms128m -Xmx800m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=64m -XX:+UseCompressedOops -Dawt.useSystemAAFontSettings=lcd</string>