* Update kamon and kanela-agent Previous version was not compatible with JDK21, see https://github.com/kamon-io/kanela/issues/150. * Add and configure maven wrapper to use maven 3.9.9 This will make it easier to control which version of maven is used to build eclair, which in turns makes deterministic builds easier, as well as using recent compiler options (to target newer JDKs for example). For example, even recent versions of Github runner images use an old version of maven and there is no easy way to upgrade. * Update Dockerfile We now use multiarch (amd64/arm64) base images. * Run CI tests with JDK21 * Update doc to recommend Adoptium OpenJDK21 * Target Java 21 Eclair now targets Java 21 and will require a compatible Java Runtime Environment. It will no longer work on JRE 11 and JRE 17.
2.2 KiB
Building Eclair
Requirements
- OpenJDK 21.
- Maven 3.9.2 or newer
Build
Eclair is packaged as a compressed archive with a launcher script. The archives are built deterministically so it's possible to reproduce the build and verify its equality byte-by-byte. To build the exact same artifacts that we release, you must use the build environment (OS, JDK, maven...) that we specify in our release notes.
To build the project and run the tests, simply run:
./mvnw package
Notes:
- This command will build all modules (core, node, gui).
- If the build fails, you may need to clean previously built artifacts with the
./mvnw clean
command. - Archives can be found in the
target
folder for each module.
Skip tests
Running tests takes time. If you want to skip them, use -DskipTests
:
./mvnw package -DskipTests
Run tests
To only run the tests, run:
./mvnw test
To run tests for a specific class, run:
./mvnw test -Dsuites=*<TestClassName>
To run tests using a specific number of threads, run:
./mvnw -T <thread_count> test
To run tests with a specific version of bitcoind
, run:
BITCOIND_DIR=<absolute/path/to/directory> ./mvnw test
Build specific module
To only build the eclair-node
module, run:
./mvnw package -pl eclair-node -am -Dmaven.test.skip=true
To install eclair-core
into your local maven repository and use it in another project, run:
./mvnw clean install -pl eclair-core -am -Dmaven.test.skip=true
Build the API documentation
Slate
The API doc is generated via slate and hosted on github pages. To make a change and update the doc follow the steps:
git checkout slate-doc
- Install your local dependencies for slate, more info here
- Edit
source/index.html.md
and save your changes. - Commit all the changes to git, before deploying the repo should be clean.
- Push your commit to remote.
- Run
./deploy.sh
- Wait a few minutes and the doc should be updated at https://acinq.github.io/eclair