LIGHT

  • News
  • Docs
  • Community
  • Reddit
  • GitHub

Develop Build

For developers who are working on Light, it is very important to have all related repositories to be built on the local machine and install the jar files into the .m2 repository. It is OK to check out all the repositories from https://github.com/networknt and build them one by one; however, it is very time-consuming. To our contributor’s life easier, we have created a config in the light-config-test repository to utilize light-bot to build necessary repositories in one shot and sync with remote git server on a daily basis or when it is necessary.

Please note: If you are only working on one repository, you can just check out the particular repository and build it locally. We have snapshot versions of all repositories published to the maven central so all dependencies should be downloaded from the Internet.

Please note: The light-bot is only working with Linux and Mac OS at the moment, porting to Windows is still working in progress.

The following are the steps to get it set up.

Environment

The following software packages need to be installed locally before moving to the next step.

  • Oracle JDK 11 or OpenJDK 11
  • Maven 3.5.x
  • Git

A github.com account is needed, and public key needs to be uploaded to the GitHub based on this doc.

Create Workspace

First, a workspace needs to be created under your home directory. Most of the time, networknt will be used.

cd ~
mkdir networknt

Checkout Repos and Build light-bot

Next, we need to check out two repositories and build light-bot to bootstrap the process.

cd ~/networknt
git clone [email protected]:networknt/light-config-test.git
git clone [email protected]:networknt/light-bot.git
cd light-bot
./gradlew build

Start light-bot develop-build without test

This task will check out all the related repo or if they are in the developbuild workspace, then only try to pull from the remote. Once the checkout is done, light-bot will build all of them and install the final jar files to the .m2 repository.

cd ~/networknt/light-config-test/light-bot/develop-build/build-all
java -Dlight-4j-config-dir=./config -Dlogback.configurationFile=./logback.xml -jar ~/networknt/light-bot/bot-cli/build/libs/bot-cli-fat-1.0.jar -t develop-build

Wait for several minutes, all the related Light jar files should be built and installed.

Repeat this when necessary

As multiple developers are working on these repositories, there might be several or more check-ins each day. It is recommended that you run the develop-build task at least every day. Even better, rerun it when you know someone has checked in something that you are depending on. The second time you run the light-bot develop-build task, it will be much faster as it won’t clone every repo again but just pull the latest code from remote. If there is no change on any of the repository, the build will be skipped automatically.

  • About Light
    • Overview
    • Testimonials
    • What is Light
    • Features
    • Principles
    • Benefits
    • Roadmap
    • Community
    • Articles
    • Videos
    • License
    • Why Light Platform
  • Getting Started
    • Get Started Overview
    • Environment
    • Light Codegen Tool
    • Light Rest 4j
    • Light Tram 4j
    • Light Graphql 4j
    • Light Hybrid 4j
    • Light Eventuate 4j
    • Light Oauth2
    • Light Portal Service
    • Light Proxy Server
    • Light Router Server
    • Light Config Server
    • Light Saga 4j
    • Light Session 4j
    • Webserver
    • Websocket
    • Spring Boot Servlet
  • Architecture
    • Architecture Overview
    • API Category
    • API Gateway
    • Architecture Patterns
    • CQRS
    • Eco System
    • Event Sourcing
    • Fail Fast vs Fail Slow
    • Integration Patterns
    • JavaEE declining
    • Key Distribution
    • Microservices Architecture
    • Microservices Monitoring
    • Microservices Security
    • Microservices Traceability
    • Modular Monolith
    • Platform Ecosystem
    • Plugin Architecture
    • Scalability and Performance
    • Serverless
    • Service Collaboration
    • Service Mesh
    • SOA
    • Spring is bloated
    • Stages of API Adoption
    • Transaction Management
    • Microservices Cross-cutting Concerns Options
    • Service Mesh Plus
    • Service Discovery
  • Design
    • Design Overview
    • Design First vs Code First
    • Desgin Pattern
    • Service Evolution
    • Consumer Contract and Consumer Driven Contract
    • Handling Partial Failure
    • Idempotency
    • Server Life Cycle
    • Environment Segregation
    • Database
    • Decomposition Patterns
    • Http2
    • Test Driven
    • Multi-Tenancy
    • Why check token expiration
    • WebServices to Microservices
  • Cross-Cutting Concerns
    • Concerns Overview
  • API Styles
    • Light-4j for absolute performance
    • Style Overview
    • Distributed session on IMDG
    • Hybrid Serverless Modularized Monolithic
    • Kafka - Event Sourcing and CQRS
    • REST - Representational state transfer
    • Web Server with Light
    • Websocket with Light
    • Spring Boot Integration
    • Single Page Application
    • GraphQL - A query language for your API
    • Light IBM MQ
    • Light AWS Lambda
    • Chaos Monkey
  • Infrastructure Services
    • Service Overview
    • Light Proxy
    • Light Mesh
    • Light Router
    • Light Portal
    • Messaging Infrastructure
    • Centralized Logging
    • COVID-19
    • Light OAuth2
    • Metrics and Alerts
    • Config Server
    • Tokenization
    • Light Controller
  • Tool Chain
    • Tool Chain Overview
  • Utility Library
  • Service Consumer
    • Service Consumer
  • Development
    • Development Overview
  • Deployment
    • Deployment Overview
    • Frontend Backend
    • Linux Service
    • Windows Service
    • Install Eventuate on Windows
    • Secure API
    • Client vs light-router
    • Memory Limit
    • Deploy to Kubernetes
  • Benchmark
    • Benchmark Overview
  • Tutorial
    • Tutorial Overview
  • Troubleshooting
    • Troubleshoot
  • FAQ
    • FAQ Overview
  • Milestones
  • Contribute
    • Contribute to Light
    • Development
    • Documentation
    • Example
    • Tutorial
“Develop Build” was last updated: July 5, 2021: fixes #275 checked and corrected grammar/spelling for majority of pages (#276) (b3bbb7b)
Improve this page
  • News
  • Docs
  • Community
  • Reddit
  • GitHub
  • About Light
  • Getting Started
  • Architecture
  • Design
  • Cross-Cutting Concerns
  • API Styles
  • Infrastructure Services
  • Tool Chain
  • Utility Library
  • Service Consumer
  • Development
  • Deployment
  • Benchmark
  • Tutorial
  • Troubleshooting
  • FAQ
  • Milestones
  • Contribute