You need tools below to import ardublock source code to Eclipse.
- Git tools
- can find tools for your operating system from github: https://help.github.com/set-up-git-redirect
- We use maven to manage java packages.
- I am very to recommend you install a maven plugin, if you develop openblocks. it will help you raising development efficiency.
Prepare The code
First, you need to clone the source code from github. Ardublock is depended on Openblocks. You can find these two repo here
you will find the git clone url on the right or page.
then you need to clone this two repos. for example ardublock clone url is https://github.com/heqichen/ardublock.git and openblocks clone url is https://github.com/heqichen/openblocks.git
now open your terminal, and go to your development directory. For example, my development directory is ~/ardublock/
$ cd ~/ardublock/
$ git clone email@example.com:heqichen/ardublock.git
$ git clone firstname.lastname@example.org:heqichen/openblocks.git
you will get something like this.
Cloning into ‘openblocks’…
remote: Counting objects: 2166, done.
remote: Total 2166 (delta 0), reused 0 (delta 0), pack-reused 2166
Receiving objects: 100% (2166/2166), 4.20 MiB | 6.00 KiB/s, done.
Resolving deltas: 100% (863/863), done.
Checking connectivity… done.
and same as ardublock project. Finally got two repo in your local machine.
Import to Eclispe
Now Lets import the source code.
$ cd ardublock # go into ardublock folder
$ mvn validate # downlaod maven packages
$ mvn clean #
$ mvn eclipse:clean # clean eclipse project
$ mvn eclipse:eclipse # change project to eclipse project
After these commands, Maven will download the required packages and make eclipse project.
now we can import ardublock into elicpse
File -> Import -> Gernal -> Existing Projects into Workspace
you may find some error, because of missing openblocks package.
there are two method to resolve this problem.
1. install the openblocks package locally.
go to openblocks folder and run
$ mvn clean
$ mvn install
After these command, maven will compile and install openblocks package in your local machine.
Now, no error any more.
Another method is import openblocks in your eclipse.
run command as ardublock and import openblocks into your eclipse. Also can solve the problem.
39,053 total views, 4 views today