...
- Download the IntelliJ Community Edition from http://www.jetbrains.com/idea/download/
- Import settings into IntelliJ as explained here:
- Coding Standards
- Set Imports: Preferences -> Code Style -> Java -> Imports. Uncheck "Use fully qualified class names in javadocs"
Setup command line tools and Node
On Mac, using Homebrew:
Code Block |
---|
ruby -e "$(curl - |
...
fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
...
brew install git brew install maven brew install |
...
node.js |
On Linux, using apt:
Code Block |
---|
sudo apt update
sudo apt-get install git
sudo apt-get install maven
sudo apt-get install nodejs |
Make sure git is version 1.8.x or greater installed on your machine:
Code Block |
---|
$ git --version |
...
git version 2.8.2 |
...
brew install nodejs
Please refer to Build System & CI on how to setup building of CDAP.
Creating an IntelliJ project
...
Git clone CDAP master project using either of these:
Code Block |
---|
git clone https://github.com/caskdata/cdap |
...
run: <PATH_CDAP_REPO>/mvn clean package -DskipTests
Set PATH variable :
...
git clone git@github.com:cdapio/cdap.git |
Now build using maven:
Code Block |
---|
cd cdap
mvn clean package -DskipTests |
If you get compile errors similar to this one:
Code Block |
---|
Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer;
at org.eclipse.aether.connector.basic.ChecksumCalculator.update(ChecksumCalculator.java:202) |
this is likely due to the version of maven that does not work properly with latest Java versions. Upgrading to maven 3.6.1 will most likely fix the problem.
Build and run Local Standalone CDAP
Code Block | ||
---|---|---|
| ||
cd <path_to_cdap_repo>
MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" mvn package -pl cdap-standalone,cdap-app-templates/cdap-etl,cdap-examples -am -amd -DskipTests -P examples,templates,dist,release,unit-tests
cd cdap-standalone/target
unzip cdap-sdk-<version>-SNAPSHOT.zip && cd cdap-sdk-<version>-SNAPSHOT
cd bin
./cdap.sh start
|
- The ui runs on localhost:9999Drag and drop example jars; start/stop flows…11011