diff --git a/.github/workflows/coral-pr-pipeline.yml b/.github/workflows/coral-pr-pipeline.yml index a0bead50ee..bfa12eee35 100644 --- a/.github/workflows/coral-pr-pipeline.yml +++ b/.github/workflows/coral-pr-pipeline.yml @@ -13,7 +13,7 @@ permissions: contents: read env: - NODE_VERSION: 16 + NODE_VERSION: 18 PNPM_VERSION: 7.13.4 jobs: diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index d224ea2878..deccbf0394 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -3,6 +3,9 @@ name: Java CI with Maven +env: + NODE_VERSION: 18 + on: push: branches: ["main"] @@ -24,6 +27,10 @@ jobs: - uses: actions/checkout@v3 with: persist-credentials: false + - name: Setup node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} - name: Set up JDK ${{ matrix.java-version }} uses: actions/setup-java@v3 with: diff --git a/.gitignore b/.gitignore index bf6afaa4c4..ab4e07e3fc 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ node_modules/ coral/dist* core/src/main/resources/static/assets/coral* core/src/main/resources/templates/coral* +core/nodebuild* # Coral development mode against remote Klaw API coral/.env.remote-api diff --git a/README.md b/README.md index 71b3839282..87bf6d5122 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ For the versions available, see the [tags on this repository](https://github.com ## Features: - Topics (approval): Create, Update, Delete, Promote + - React UI - New look and feel for Browse topics + - Acls (approval): Create,Delete - Connectors (approval): Create - Any connector can be created as long as the required plugin libraries are installed on the server. @@ -46,7 +48,7 @@ For the versions available, see the [tags on this repository](https://github.com - Restore configuration (topics, acls) - Login - - Active directory integration + - Azure / Active directory integration - Single Sign-on (OAuth2) - Based on database @@ -100,6 +102,8 @@ For the versions available, see the [tags on this repository](https://github.com ### Manual mvn clean install +Note - node, npm and pnpm are installed locally (required for React UI assets) through maven execution plugins. + Builds two artifacts core/target/klaw-.jar and cluster-api/target/cluster-api-.jar and follow steps defined at https://klaw-project.io/docs or run the binaries like below diff --git a/core/Makefile b/core/Makefile new file mode 100644 index 0000000000..e1bef8f18d --- /dev/null +++ b/core/Makefile @@ -0,0 +1,21 @@ +CORAL_ROOT = ../coral +CORAL_DIST = $(CORAL_ROOT)/dist + +# This is installed as part of Maven +PNPM = ../core/nodebuild/node/node_modules/.bin/pnpm + +$(CORAL_DIST): ../coral/index.html $(shell find $(CORAL_ROOT)/src) + cd $(CORAL_ROOT); $(PNPM) install --frozen-lockfile + cd $(CORAL_ROOT); $(PNPM) build --assetsDir assets/coral --mode springboot + +src/main/resources/templates/coral/index.html: $(CORAL_DIST) + mkdir -p $(shell dirname $@) + cp -r $(CORAL_DIST)/index.html $@ + +src/main/resources/static/assets/coral: $(CORAL_DIST) + cp -r $(CORAL_DIST)/assets/* $@ + +.PHONY: clean +clean: + rm -rf src/main/resources/templates/coral/index.html + rm -rf src/main/resources/static/assets/coral diff --git a/core/pom.xml b/core/pom.xml index a17d3e10de..bc4d32d074 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -24,9 +24,13 @@ 5.2.3 1.10.0 3.1.0 + 1.12.1 2.1.214 3.0.4 4.1.80.Final + v18.11.0 + 8.19.2 + 7.14.0 1.33 4.4.1 @@ -156,6 +160,71 @@ + + + com.github.eirslett + frontend-maven-plugin + ${front-end-maven-plugin.version} + + nodebuild + + + + install node and npm + + install-node-and-npm + + generate-resources + + ${node.version} + ${npm.version} + + + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + + + Install pnpm + compile + + exec + + + nodebuild/node + bash + npm install pnpm + + + + Clean Coral assets before building + + exec + + clean + + make + clean + + + + Compile and copy Coral assets + + exec + + compile + + make + src/main/resources/templates/coral/index.html src/main/resources/static/assets/coral + + + +