...
Download and install the appropriate openjdk version in accordance with the component you are using working and set JAVA_HOME .environment variable to point to that
Maven
Download the latest Maven using installer from https://maven.apache.org/download.cgi
...
Code Block |
---|
mvn -version |
Use the settings.xml found in the oparent repo.
Save this Maven settings.xml as your ~/.m2/settings.xml xml (windows c:\users\<username>\.m2)
WSL users can point to one common repo across Windows and Ubuntu as :
Code Block |
---|
ln -s /mnt/c/Users/<username>/.m2 ~ |
Proxy settings for Maven (if required)
If you are behind a proxy you can add a proxy section to your settings.xml
Code Block | |||||||
---|---|---|---|---|---|---|---|
| |||||||
| code
| language
| |||||
xml |
OS Specific Instructions
MAC/OSX (to be reviewed/updated by a MAC user )
get your MBP 2016 ready for development
...
install docker (dmg) - https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac
Redhat/CentOS (to be reviewed/updated by a Redhat/CentOS user )
20190130 - re-validating for RHEL 7.6 subscription
Add the following option to your MAVEN_OPTS in order not to periodically hang on downloading artifacts in linux | -Djava.net.preferIPv4Stack=true | |||||
enable IP4 forwarding to enable the RHEL VM to act as an edge router - without this docker containers cannot communicate | add to /etc/sysctl.conf | |||||
Install docker (required for some repos like dcae-inventory off dcae |
|
Ubuntu (to be reviewed/updated by
...
an Ubuntu user )
enable ubuntu desktop | apt-get update apt-get install ubuntu-desktop | |||||||
enable static IP | vi /etc/network/interfaces add iface enp0s25 inet static address 192.168.15.101 netmask 255.255.255.0 network 192.168.15.0 broadcast 192.168.15.255 gateway 192.168.15.1 dns-nameservers 8.8.4.4 | |||||||
disable strict host checking (client and server) |
| |||||||
Enable non CD repositories so an apt-get update will work | comment out the CD first line in /etc/apt/sources.list | |||||||
enable ssh if skipped during installation so we can remote ssh | sudo apt-get install openssh-server | |||||||
enable root login and gui (no sudo su -) | sudo passwd root sudo usermod -U root sudo reboot now sudo vi /etc/lightdm/lightdm.conf [SeatDefaults] greeter-session=unity-greeter user-session=ubuntu greeter-show-manual-login=true : enable root login vi /etc/ssh/sshd_config FROM: PermitRootLogin prohibit-password TO: PermitRootLogin yes systemctl restart sshd | |||||||
Add the following option to your MAVEN_OPTS in order not to periodically hang on downloading artifacts in linux | in /etc/environment -Djava.net.preferIPv4Stack=true | |||||||
Install docker (required when building docker images) | use the current as of 20180621 17.03 version in the script
|
...
Expand |
---|
If you choose to use HTTP/HTTPS, you'll need to generate an access password. Log in to the Gerrit host https://gerrit.onap.org/, pull down the menu under your user name (at the extreme top right of the browser window), click on "Settings", and select "HTTP Password" This password may have a limited time to live, so you might get errors like this one: Problem running 'git remote update gerrit' Regenerating a password will most likely solve the connectivity issue. Sometimes, the Gerrit interface on HTTPS might be temporarily faulty, so retries might be needed. |
...
Proxy setting for IntelliJ and Git (if required)
Expand |
---|
For developers working with a proxy, you might have proxy issues connecting to Linux Foundation website. To avoid the connection issue, you must define the proxy setting for both IntelliJ and Git. To configure the proxy settings in IntelliJ; click File -> Settings -> Appearance & Behavior -> System Settings -> HTTP Proxy enter the correct proxy settings and click Apply. In case of Manual proxy configuration, while entering the Host name, there is no need to write http:// in front of the URL. For example, if the proxy value is http://one.proxy.com, you would put one.proxy.com as the Host name To configure the proxy settings for Git, play the following command: git config --global https.proxy https://<proxy username>:<proxy password>@<proxy url> git config --global http.proxy http://<proxy username>:<proxy password>@<proxy url> Note: while entering the proxy username, sometimes it may require to add the domain name in front. |
...
Download onap-java-formatter.xml and import into Eclipse.
( Updates updates to the settings should be committed and merged back into the repository. )
ONAP uses Google Java Style with some modifications. ( See Java code style )
...
Now we need to activate the checkstyle on one project and set it as the blueprint for all of them:
Select a project in eclipse and right click->Properties->Checkstyle
check "Checkstyle active for this project"
Select the "ONAP" checkstyle profile
Click "Apply and Close"
Spread blueprint to other projects in Eclipse
...