73 lines
1.7 KiB
Markdown
Raw Normal View History

2021-08-01 14:27:44 -07:00
# Build the code & run tests
## Prerequisites
2021-08-12 21:14:42 +00:00
First of all, you need to make sure you are using maven 3.5.x or higher and JDK 11 or higher.
2021-08-01 14:27:44 -07:00
## Building
The following commands must be run from the top-level directory.
`mvn clean install`
If you wish to skip the unit tests you can do this by adding `-DskipTests` to the command line.
2021-10-15 03:51:13 +05:30
## Create a distribution (packaging)
2021-08-01 14:27:44 -07:00
You can create a _distribution_ as follows.
2021-10-15 03:51:13 +05:30
```
2021-08-01 14:27:44 -07:00
$ mvn clean install
# Create the binary distribution.
$ cd dist && mvn package
```
The binaries will be created at:
2021-10-15 03:51:13 +05:30
```
2021-08-01 14:27:44 -07:00
dist/target/open-metadata-<version>.pom
dist/target/open-metadata-<version>.tar.gz
```
2021-08-12 17:45:27 +00:00
## Run instance through IntelliJ IDEA
2021-08-01 14:27:44 -07:00
Add a new Run/Debug configuration like the below screenshot.
2021-08-01 14:27:44 -07:00
2021-10-15 03:51:13 +05:30
![Intellij Run Configuration](<../../../.gitbook/assets/image (1).png>)
2021-08-01 14:27:44 -07:00
## Add missing dependency
Right-click on catalog-rest-service
2021-10-15 03:51:13 +05:30
![](../../../.gitbook/assets/image-1-.png)
Click on "Open Module Settings"
2021-10-15 03:51:13 +05:30
![](../../../.gitbook/assets/image-2-.png)
Go to "Dependencies"
2021-10-15 03:51:13 +05:30
![](../../../.gitbook/assets/image-3-.png)
Click “+” at the bottom of the dialog box and click "Add"
2021-10-15 03:51:13 +05:30
![](../../../.gitbook/assets/image-4-.png)
Click on Library
2021-10-15 03:51:13 +05:30
![](../../../.gitbook/assets/image-5-.png)
In that list look for "jersey-client:2.25.1"
2021-10-15 03:51:13 +05:30
![](../../../.gitbook/assets/image-6-.png)
Select it and click "OK". Now run/debug the application.
2021-08-01 14:27:44 -07:00
## Coding Style
2021-10-15 03:51:13 +05:30
1. [Refer to coding guidelines](coding-style.md)
2. Configure IntelliJ to disable the \[wild-card imports]
2021-08-01 14:27:44 -07:00
2021-10-15 03:51:13 +05:30
([https://www.jetbrains.com/help/idea/creating-and-optimizing-imports.html#disable-wildcard-imports](https://www.jetbrains.com/help/idea/creating-and-optimizing-imports.html#disable-wildcard-imports))