2017-03-17 19:07:29 +01:00
|
|
|
# Building Eclair
|
|
|
|
|
|
|
|
## Requirements
|
2019-07-31 15:35:26 +02:00
|
|
|
|
|
|
|
- [OpenJDK 11](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot).
|
2019-03-25 14:42:06 +01:00
|
|
|
- [Maven](https://maven.apache.org/download.cgi) 3.6.0 or newer
|
2018-09-03 18:03:40 +02:00
|
|
|
- [Docker](https://www.docker.com/) 18.03 or newer (optional) if you want to run all tests
|
2017-03-17 19:07:29 +01:00
|
|
|
|
|
|
|
## Build
|
2019-07-31 15:35:26 +02:00
|
|
|
|
2020-02-24 15:42:26 +01:00
|
|
|
Eclair is packaged as a compressed archive with a launcher script, the archives are built deterministically
|
2020-03-27 10:44:16 +01:00
|
|
|
so it's possible to reproduce the build and verify its equality byte-by-byte. To build the exact same artifacts
|
2020-02-24 15:42:26 +01:00
|
|
|
that we release, you must use the build environment (OS, JDK, maven...) that we specify in our release notes.
|
2020-01-30 15:27:02 +01:00
|
|
|
|
2019-07-31 15:35:26 +02:00
|
|
|
To build the project and run the tests, simply run:
|
|
|
|
|
2017-03-17 19:07:29 +01:00
|
|
|
```shell
|
2020-02-24 15:42:26 +01:00
|
|
|
mvn package
|
2017-03-17 19:07:29 +01:00
|
|
|
```
|
2018-09-03 18:03:40 +02:00
|
|
|
|
2020-05-07 16:40:00 +02:00
|
|
|
NB: if the build fails, you may need to clean previously built artifacts with the `mvn clean` command.
|
2020-03-27 10:44:16 +01:00
|
|
|
NB: some of the tests use [Docker](https://www.docker.com/), so make sure your docker daemon is running.
|
|
|
|
|
2019-07-31 15:35:26 +02:00
|
|
|
### Other build options
|
2018-09-03 18:03:40 +02:00
|
|
|
|
|
|
|
To skip all tests, run:
|
2019-07-31 15:35:26 +02:00
|
|
|
|
|
|
|
```shell
|
2020-02-24 15:42:26 +01:00
|
|
|
mvn package -DskipTests
|
2019-07-31 15:35:26 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
To only build the `eclair-node` module, run:
|
|
|
|
|
2017-03-17 19:07:29 +01:00
|
|
|
```shell
|
2020-02-24 15:42:26 +01:00
|
|
|
mvn package -pl eclair-node -am -DskipTests
|
2017-12-01 13:56:01 +01:00
|
|
|
```
|
2019-07-31 15:35:26 +02:00
|
|
|
|
|
|
|
To run the tests, run:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
mvn test
|
|
|
|
```
|
|
|
|
|
|
|
|
To run tests for a specific class, run:
|
|
|
|
|
2017-12-01 13:56:01 +01:00
|
|
|
```shell
|
2019-07-31 15:35:26 +02:00
|
|
|
mvn test -Dsuites=*<TestClassName>
|
2017-03-17 19:07:29 +01:00
|
|
|
```
|
2019-02-21 15:11:44 +01:00
|
|
|
|
2019-07-31 15:35:26 +02:00
|
|
|
## Build the API documentation
|
2019-03-26 18:10:09 +01:00
|
|
|
|
2019-07-31 15:35:26 +02:00
|
|
|
### Slate
|
2019-03-26 18:10:09 +01:00
|
|
|
|
|
|
|
The API doc is generated via slate and hosted on github pages. To make a change and update the doc follow the steps:
|
|
|
|
|
2019-07-31 15:35:26 +02:00
|
|
|
1. `git checkout slate-doc`
|
|
|
|
2. Install your local dependencies for slate, more info [here](https://github.com/lord/slate#getting-started-with-slate)
|
|
|
|
3. Edit `source/index.html.md` and save your changes.
|
|
|
|
4. Commit all the changes to git, before deploying the repo should be clean.
|
|
|
|
5. Push your commit to remote.
|
|
|
|
6. Run `./deploy.sh`
|
|
|
|
7. Wait a few minutes and the doc should be updated at [https://acinq.github.io/eclair](https://acinq.github.io/eclair)
|