Skip to content

Building the Eclipse Plugin

Preparing an Environment

Info

All builds and mirrors for Eclipse IDE itself may be found on release's page.

We will assume that our build directory is /build/eclipse. All necessary tools, directories and prerequisite will be place there. Thus, go to this directory first:

$ mkdir /build/eclipse
$ cd /build/eclipse

Also create a directory for storing downloaded Maven packages:

$ mkdir /build/eclipse/repository

Download and extract Maven:

$ wget https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
$ tar -xf apache-maven-3.5.4-bin.tar.gz

Download and extract JDK 11 to /build/eclipse/jdk.

Download and extract Eclipse 2020.03 with CDT for Linux:

$ wget https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2020-03/R/eclipse-cpp-2020-03-R-incubation-linux-gtk-x86_64.tar.gz
$ tar -xf eclipse-cpp-2020-03-R-incubation-linux-gtk-x86_64.tar.gz

Download and extract Eclipse 2020.03 with CDT for Windows:

wget https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2020-03/R/eclipse-cpp-2020-03-R-incubation-win32-x86_64.zip
tar -xf eclipse-cpp-2020-03-R-incubation-win32-x86_64.zip

Clone a plugin's repository:

$ git clone https://github.com/foss-for-synopsys-dwc-arc-processors/arc_gnu_eclipse

Building the Plugin

Use this commands:

$ export JAVA_HOME=/build/eclipse/jdk
$ export PATH=$JAVA_HOME/bin:$PATH
$ cd arc_gnu_eclipse
$ /build/eclipse/apache-maven-3.5.4/bin/mvn \
    -Dmaven.repo.local=/build/eclipse/repository clean install

After that an archive with the plugin will be saved here:

arc_gnu_eclipse/repository/target/repository-2019.9.0-SNAPSHOT.zip

Installing the Plugin

You can install the plugin to Eclipse for Linux this way:

$ unzip arc_gnu_eclipse/repository/target/repository-2019.9.0-SNAPSHOT.zip \
      -d eclipse-cpp-2020-03-R-incubation-linux-gtk-x86_64/dropins
$ rm -f eclipse-cpp-2020-03-R-incubation-linux-gtk-x86_64/dropins/artifacts.jar \
      eclipse-cpp-2020-03-R-incubation-linux-gtk-x86_64/dropins/content.jar
$ echo "-Dosgi.instance.area.default=@user.home/ARC_GNU_IDE_Workspace" >> eclipse-cpp-2020-03-R-incubation-linux-gtk-x86_64/eclipse.ini

You can install the plugin to Eclipse for Windows this way:

$ unzip arc_gnu_eclipse/repository/target/repository-2019.9.0-SNAPSHOT.zip \
      -d eclipse-cpp-2020-03-R-incubation-win32-x86_64/dropins
$ rm -f eclipse-cpp-2020-03-R-incubation-win32-x86_64/dropins/artifacts.jar \
      eclipse-cpp-2020-03-R-incubation-win32-x86_64/dropins/content.jar
$ echo "-Dosgi.instance.area.default=@user.home/ARC_GNU_IDE_Workspace" >> eclipse-cpp-2020-03-R-incubation-win32-x86_64/eclipse.ini