From 080717169aa3e8d20435aa5766d4e05fbe06bbb1 Mon Sep 17 00:00:00 2001 From: Brice Copy Date: Wed, 15 Jan 2020 17:43:40 +0100 Subject: [PATCH 01/38] Update for next development version --- modules/frontend/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 5eb087a..a8cee24 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -4,7 +4,7 @@ com.github.chibyhq ide-frontend - 1.3 + 1.4-SNAPSHOT jar Chiby IDE :: frontend diff --git a/pom.xml b/pom.xml index 0a411f3..708a8b5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.github.chiby.ide reactor - 1.3 + 1.4-SNAPSHOT pom Chiby IDE reactor project From f5117db1e47897e34fb957622ab5a6951a3bd8c2 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 16 Jan 2020 09:26:33 +0100 Subject: [PATCH 02/38] Add enforcer plugin --- modules/frontend/pom.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index a8cee24..e1e5007 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -284,6 +284,29 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + enforce-versions + + enforce + + + + + 3.2.5 + + + 11 + + + + + + com.amashchenko.maven.plugin gitflow-maven-plugin From 22937f1e8f8499151246da0dc02b9173cc3854c7 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Fri, 14 Feb 2020 23:38:12 +0100 Subject: [PATCH 03/38] Upgrade to working wro4j 1.9 --- modules/frontend/pom.xml | 37 ++++++++++++++++++- .../src/main/webapp/WEB-INF/wro.properties | 4 +- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 923101f..da2e0d5 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -326,7 +326,7 @@ ro.isdc.wro4j wro4j-maven-plugin - 1.8.0 + 1.9.0 compile @@ -417,7 +417,40 @@ - + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + ro.isdc.wro4j + + wro4j-maven-plugin + + + [1.9.0,) + + + run + + + + + + + + + + + + + diff --git a/modules/frontend/src/main/webapp/WEB-INF/wro.properties b/modules/frontend/src/main/webapp/WEB-INF/wro.properties index 521e512..05188b2 100644 --- a/modules/frontend/src/main/webapp/WEB-INF/wro.properties +++ b/modules/frontend/src/main/webapp/WEB-INF/wro.properties @@ -1,2 +1,2 @@ -preProcessors=cssImport,cssMin -postProcessors=lessCss \ No newline at end of file +preProcessors=cssImport,cssMin,jsMin +postProcessors=lessCss From 749e1ab32c576323a6b57557897cb52b83268ad4 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:11:07 +0100 Subject: [PATCH 04/38] Re-enable wro4j --- modules/frontend/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 0ef3c8d..9c29406 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -326,7 +326,7 @@ - + com.spotify docker-maven-plugin From 3c92880b877f032f47f2b8a7ec4fb37d719718f2 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:15:31 +0100 Subject: [PATCH 05/38] Update playar --- modules/frontend/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 9c29406..742dbe8 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -30,7 +30,7 @@ 0.3-SNAPSHOT 0.1-SNAPSHOT - 0.4-SNAPSHOT + [0.4-SNAPSHOT,) From a4448f2168f4fe7575786776268e8d0789f88e41 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Sat, 11 Jan 2020 19:15:18 +0100 Subject: [PATCH 06/38] Update to Java 11 --- modules/frontend/pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 7e03320..dbadf43 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -5,7 +5,7 @@ com.github.chiby.ide frontend - 1.2 + 1.3-SNAPSHOT jar frontend @@ -19,11 +19,11 @@ - openjdk:8-jdk-alpine + openjdk:11-jdk-alpine chiby/ide UTF-8 UTF-8 - 9 + 11 2.7.2.4 @@ -31,7 +31,7 @@ rpi3 - resin/raspberrypi3-alpine-openjdk:8-jdk + resin/raspberrypi3-alpine-openjdk:11-jdk chiby/rpi3-ide From e650b561c5bc1c021ebc9f281453ea59e8304cef Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 13 Jan 2020 09:01:29 +0100 Subject: [PATCH 07/38] Add wro support --- modules/frontend/pom.xml | 677 +++++++++--------- .../resources/static/WEB-INF/wro.properties | 2 + .../src/main/resources/static/WEB-INF/wro.xml | 19 + 3 files changed, 370 insertions(+), 328 deletions(-) create mode 100644 modules/frontend/src/main/resources/static/WEB-INF/wro.properties create mode 100644 modules/frontend/src/main/resources/static/WEB-INF/wro.xml diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index dbadf43..8fa8c7a 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -1,202 +1,203 @@ - - 4.0.0 - - com.github.chiby.ide - frontend - 1.3-SNAPSHOT - jar - - frontend - Web frontend for Chiby IDE - - - org.springframework.boot - spring-boot-starter-parent - 2.1.3.RELEASE - - - - - openjdk:11-jdk-alpine - chiby/ide - UTF-8 - UTF-8 - 11 - 2.7.2.4 - - - - - rpi3 - - resin/raspberrypi3-alpine-openjdk:11-jdk - chiby/rpi3-ide - - - - gitlab-x64 - - gitlab-registry.cern.ch/chiby-hq/images/ide - - - - deb - - chiby - - - - + + 4.0.0 + + com.github.chiby.ide + frontend + 1.3-SNAPSHOT + jar + + frontend + Web frontend for Chiby IDE + + + org.springframework.boot + spring-boot-starter-parent + 2.1.3.RELEASE + + + + + openjdk:11-jdk-alpine + chiby/ide + UTF-8 + UTF-8 + 11 + 2.7.2.4 + + + + + rpi3 + + resin/raspberrypi3-alpine-openjdk:11-jdk + chiby/rpi3-ide + + + + gitlab-x64 + + gitlab-registry.cern.ch/chiby-hq/images/ide + + + + deb + + chiby + + + + - ${project.basedir}/src/deb - true - - - - - - jdeb - org.vafer - 1.5 - - true - ${project.basedir}/src/deb/control - ${project.build.directory}/${deb.finalName}.deb - - - - package - jdeb - - - - ${project.build.directory}/${project.build.finalName}.${project.packaging} - file - - perm - /opt/${deb.finalName} - 755 - - - - ${project.basedir}/src/deb/chiby.desktop - file - - perm - /usr/share/applications - 755 - - - - ${project.basedir}/src/deb/chiby.png - file - - perm - /usr/share/pixmaps - 644 - - - - - - - - - - - - + ${project.basedir}/src/deb + true + + + + + + jdeb + org.vafer + 1.5 + + true + ${project.basedir}/src/deb/control + ${project.build.directory}/${deb.finalName}.deb + + + + package + + jdeb + + + + + ${project.build.directory}/${project.build.finalName}.${project.packaging} + file + + perm + /opt/${deb.finalName} + 755 + + + + ${project.basedir}/src/deb/chiby.desktop + file + + perm + /usr/share/applications + 755 + + + + ${project.basedir}/src/deb/chiby.png + file + + perm + /usr/share/pixmaps + 644 + + + + + + + + + + + + - - - org.springframework.boot - spring-boot-starter-web - - + + + org.springframework.boot + spring-boot-starter-web + + org.springframework.data spring-data-rest-hal-browser - - org.springframework.boot - spring-boot-starter-data-rest - - - org.springframework.boot - spring-boot-starter-hateoas - - - - org.springframework.data - spring-data-keyvalue - - - - com.querydsl - querydsl-collections - + + org.springframework.boot + spring-boot-starter-data-rest + + + org.springframework.boot + spring-boot-starter-hateoas + + + + org.springframework.data + spring-data-keyvalue + + + + com.querydsl + querydsl-collections + + + + com.dorkbox + SystemTray + 3.17 + + + + org.webjars + webjars-locator + 0.36 + + + + io.milton + milton-server-ce + ${milton.version} + + + javax.servlet + servlet-api + + + - - com.dorkbox - SystemTray - 3.17 - - - - org.webjars - webjars-locator - 0.36 - - - - io.milton - milton-server-ce - ${milton.version} - - - javax.servlet - servlet-api - - - - - - org.webjars - bootstrap - 3.3.7-1 - - - org.webjars - jquery - 3.2.1 - + + org.webjars + bootstrap + 3.3.7-1 + + + org.webjars + jquery + 3.2.1 + org.webjars qunit 2.1.0 - org.webjars.npm - hybind - 1.4.3 - - - org.webjars - blockly - fdb2698d000 - + org.webjars.npm + hybind + 1.4.3 + + + org.webjars + blockly + fdb2698d000 + org.webjars.bower bootstrap-select 1.12.4 - - org.webjars.bower - jquery - - + + org.webjars.bower + jquery + + org.webjars @@ -218,108 +219,128 @@ blockly-homie [0.1-SNAPSHOT,) - - com.github.chibyhq.playar - repositories - [0.1-SNAPSHOT,) - - - com.github.chibyhq.playar - client - [0.1-SNAPSHOT,) - - - org.springframework.boot - spring-boot-starter-test - test - - - com.vaadin.external.google - android-json - - - - - org.projectlombok - lombok - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - com.google.jimfs - jimfs - 1.1 - test - - - org.mockito - mockito-core - test - - - - + + com.github.chibyhq.playar + repositories + [0.1-SNAPSHOT,) + + + com.github.chibyhq.playar + client + [0.1-SNAPSHOT,) + + + org.springframework.boot + spring-boot-starter-test + test + + + com.vaadin.external.google + android-json + + + + + org.projectlombok + lombok + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.google.jimfs + jimfs + 1.1 + test + + + org.mockito + mockito-core + test + + + + org.vafer jdeb - - - org.springframework.boot - spring-boot-maven-plugin - - - org.springframework - springloaded - 1.2.6.RELEASE - - - - true - true - - - - - - com.jamesward - unsnapshot-maven-plugin - 0.2 - - - initialize - - unsnapshot - - - - - - io.reformanda.semper - dependencyversion-maven-plugin - 1.0.0 - - - set-all - - set-version - - - - - - com.amashchenko.maven.plugin - gitflow-maven-plugin - 1.11.0 - - - com.spotify - docker-maven-plugin - 0.4.13 + + + org.springframework.boot + spring-boot-maven-plugin + + + org.springframework + springloaded + 1.2.6.RELEASE + + + + true + true + + + + + com.jamesward + unsnapshot-maven-plugin + 0.2 + + + initialize + + unsnapshot + + + + + + io.reformanda.semper + dependencyversion-maven-plugin + 1.0.0 + + + set-all + + set-version + + + + + + ro.isdc.wro4j + wro4j-maven-plugin + 1.8.0 + + + compile + + run + + + + + ${basedir}/src/main/resources/static/WEB-INF/wro.xml + ${basedir}/src/main/resources/static + ${basedir}/src/main/webapp/ + false + + + + org.mockito + mockito-core + 2.18.0 + + + + + com.spotify + docker-maven-plugin + 0.4.13 - - ${image.name} - ${base.image} - true - true - - ${project.version} - latest - - - /opt/chiby-ide - ${INSTALLATION_HOME}/applications - /var/log/chiby-ide - C.UTF-8 - http://distrib-coffee.ipsl.jussieu.fr/pub/linux/alpine/alpine/ - - + + ${image.name} + ${base.image} + true + true + + ${project.version} + latest + + + /opt/chiby-ide + ${INSTALLATION_HOME}/applications + /var/log/chiby-ide + C.UTF-8 + http://distrib-coffee.ipsl.jussieu.fr/pub/linux/alpine/alpine/ + + - mkdir -p $INSTALLATION_HOME - mkdir -p $CHIBY_IDE_HOME - chmod -R 777 $CHIBY_IDE_HOME - mkdir -p $IDE_LOGS + mkdir -p $INSTALLATION_HOME + mkdir -p $CHIBY_IDE_HOME + chmod -R 777 $CHIBY_IDE_HOME + mkdir -p $IDE_LOGS - - $INSTALLATION_HOME - ["java","-jar","${project.build.finalName}.${project.packaging}"] - - 8080 - - - $IDE_LOGS - $CHIBY_IDE_HOME - - - - ${project.build.directory} - - ${project.build.finalName}.${project.packaging} - - ${INSTALLATION_HOME} - - - - - - - - - - milton-repo - http://dl.bintray.com/milton/Milton - - - + + $INSTALLATION_HOME + ["java","-jar","${project.build.finalName}.${project.packaging}"] + + 8080 + + + $IDE_LOGS + $CHIBY_IDE_HOME + + + + ${project.build.directory} + + ${project.build.finalName}.${project.packaging} + + ${INSTALLATION_HOME} + + + + + + + + + + milton-repo + http://dl.bintray.com/milton/Milton + + + diff --git a/modules/frontend/src/main/resources/static/WEB-INF/wro.properties b/modules/frontend/src/main/resources/static/WEB-INF/wro.properties new file mode 100644 index 0000000..cc4a328 --- /dev/null +++ b/modules/frontend/src/main/resources/static/WEB-INF/wro.properties @@ -0,0 +1,2 @@ +preProcessors=cssImport,jsMin,cssMin +postProcessors=lessCss,coffeeScript \ No newline at end of file diff --git a/modules/frontend/src/main/resources/static/WEB-INF/wro.xml b/modules/frontend/src/main/resources/static/WEB-INF/wro.xml new file mode 100644 index 0000000..cb89f71 --- /dev/null +++ b/modules/frontend/src/main/resources/static/WEB-INF/wro.xml @@ -0,0 +1,19 @@ + + + + + webjar:bootstrap.css + webjar:bootstrap-select.css + /ide/css/chiby-ide.css + webjar:jquery.js + webjar:bootstrap.js + webjar:bootstrap-select.js + webjar:packery.pkgd.js + webjar:hybind/index.js + /ide/js/chiby-ide.service.js + + + + \ No newline at end of file From cf79d03db8cc5fe55af64d84a1cd73fdecd5eb6c Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 13 Jan 2020 19:50:31 +0100 Subject: [PATCH 08/38] Add working wro processing --- .github/workflows/maven.yml | 19 ++++++-- .gitignore | 1 + modules/frontend/pom.xml | 44 +++++++++++++------ .../resources/static/WEB-INF/wro.properties | 2 - .../src/main/resources/static/WEB-INF/wro.xml | 7 +-- .../src/main/webapp/WEB-INF/wro.properties | 2 + 6 files changed, 52 insertions(+), 23 deletions(-) delete mode 100644 modules/frontend/src/main/resources/static/WEB-INF/wro.properties create mode 100644 modules/frontend/src/main/webapp/WEB-INF/wro.properties diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index da5f736..86b98b1 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,12 +1,23 @@ name: Java CI -on: [push] - jobs: - build: + build-latest-snapshots: + if: contains(github.ref, 'development') runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Build with Maven + run: mvn -P jitpack-latest -B package -DskipTests=true --file pom.xml + build-stable: + if: (! contains(github.ref, 'development') ) + + runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up JDK 11 @@ -14,4 +25,4 @@ jobs: with: java-version: 11 - name: Build with Maven - run: mvn -B package --file pom.xml + run: mvn -B package -DskipTests=true --file pom.xml diff --git a/.gitignore b/.gitignore index 00399a9..9345302 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ buildNumber.properties # Avoid ignoring Maven wrapper jar file (.jar files are usually ignored) !/.mvn/wrapper/maven-wrapper.jar *~ +modules/frontend/src/main/webapp/all.* diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 8fa8c7a..923101f 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -2,13 +2,13 @@ 4.0.0 - com.github.chiby.ide - frontend + com.github.chibyhq + ide-frontend 1.3-SNAPSHOT jar - frontend - Web frontend for Chiby IDE + Chiby IDE :: frontend + Chiby IDE :: Web frontend for Chiby IDE org.springframework.boot @@ -24,9 +24,21 @@ UTF-8 11 2.7.2.4 + + 0.3-SNAPSHOT + 0.1-SNAPSHOT + 0.4-SNAPSHOT + + jitpack-latest + + master-SNAPSHOT + master-SNAPSHOT + master-SNAPSHOT + + rpi3 @@ -210,24 +222,24 @@ 2.1.0 - com.github.chiby.blockly + com.github.chibyhq blockly-pygamezero - [0.3-SNAPSHOT,) + ${blockly.pygamezero.version} - com.github.chiby.blockly + com.github.chibyhq blockly-homie - [0.1-SNAPSHOT,) + ${blockly.homie.version} - com.github.chibyhq.playar - repositories - [0.1-SNAPSHOT,) + com.github.chibyhq + playar-repositories + ${playar.version} - com.github.chibyhq.playar - client - [0.1-SNAPSHOT,) + com.github.chibyhq + playar-client + ${playar.version} org.springframework.boot @@ -412,5 +424,9 @@ milton-repo http://dl.bintray.com/milton/Milton + + jitpack.io + https://jitpack.io + diff --git a/modules/frontend/src/main/resources/static/WEB-INF/wro.properties b/modules/frontend/src/main/resources/static/WEB-INF/wro.properties deleted file mode 100644 index cc4a328..0000000 --- a/modules/frontend/src/main/resources/static/WEB-INF/wro.properties +++ /dev/null @@ -1,2 +0,0 @@ -preProcessors=cssImport,jsMin,cssMin -postProcessors=lessCss,coffeeScript \ No newline at end of file diff --git a/modules/frontend/src/main/resources/static/WEB-INF/wro.xml b/modules/frontend/src/main/resources/static/WEB-INF/wro.xml index cb89f71..4b50b14 100644 --- a/modules/frontend/src/main/resources/static/WEB-INF/wro.xml +++ b/modules/frontend/src/main/resources/static/WEB-INF/wro.xml @@ -7,11 +7,12 @@ webjar:bootstrap.css webjar:bootstrap-select.css /ide/css/chiby-ide.css - webjar:jquery.js + + classpath:META-INF/resources/webjars/jquery/3.2.1/jquery.js webjar:bootstrap.js - webjar:bootstrap-select.js + classpath:META-INF/resources/webjars/bootstrap-select/1.12.4/js/bootstrap-select.js webjar:packery.pkgd.js - webjar:hybind/index.js + classpath:META-INF/resources/webjars/hybind/1.4.3/index.js /ide/js/chiby-ide.service.js diff --git a/modules/frontend/src/main/webapp/WEB-INF/wro.properties b/modules/frontend/src/main/webapp/WEB-INF/wro.properties new file mode 100644 index 0000000..521e512 --- /dev/null +++ b/modules/frontend/src/main/webapp/WEB-INF/wro.properties @@ -0,0 +1,2 @@ +preProcessors=cssImport,cssMin +postProcessors=lessCss \ No newline at end of file From 91323ffbd7a4af247fc42951c7fa81fb96d052b0 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Tue, 14 Jan 2020 08:22:03 +0100 Subject: [PATCH 09/38] Add jitpatck build --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 86b98b1..9fe8355 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,9 +1,10 @@ name: Java CI +on: [push] + jobs: build-latest-snapshots: if: contains(github.ref, 'development') - runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -16,7 +17,6 @@ jobs: build-stable: if: (! contains(github.ref, 'development') ) - runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 From b60e610d8f550f99018b54a464030c5ed7a3b8a7 Mon Sep 17 00:00:00 2001 From: Brice Copy <500789+bcopy@users.noreply.github.com> Date: Tue, 14 Jan 2020 09:42:49 +0100 Subject: [PATCH 10/38] Build stable only for master and releases --- .github/workflows/maven.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9fe8355..cae0f14 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -4,7 +4,6 @@ on: [push] jobs: build-latest-snapshots: - if: contains(github.ref, 'development') runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -16,7 +15,7 @@ jobs: run: mvn -P jitpack-latest -B package -DskipTests=true --file pom.xml build-stable: - if: (! contains(github.ref, 'development') ) + if: contains(github.ref, 'master') || (contains(github.ref, 'release') ) || (contains(github.ref, 'support') ) runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 From 6867b620a7b9549fb332d536bc41e760c03b4b8e Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Tue, 14 Jan 2020 11:23:10 +0100 Subject: [PATCH 11/38] Comment out wro4j incompatible with jdk11 --- modules/frontend/pom.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 923101f..a8d298e 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -23,6 +23,9 @@ UTF-8 UTF-8 11 + ${java.version} + ${java.version} + 2.7.2.4 0.3-SNAPSHOT @@ -36,7 +39,7 @@ master-SNAPSHOT master-SNAPSHOT - master-SNAPSHOT + @@ -232,12 +235,12 @@ ${blockly.homie.version} - com.github.chibyhq + com.github.chibyhq.playar playar-repositories ${playar.version} - com.github.chibyhq + com.github.chibyhq.playar playar-client ${playar.version} @@ -323,7 +326,7 @@ - + com.spotify docker-maven-plugin From cd61eb711a79987729f34bf1e167a585ca0ecc89 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Fri, 14 Feb 2020 23:38:12 +0100 Subject: [PATCH 12/38] Upgrade to working wro4j 1.9 --- modules/frontend/pom.xml | 37 ++++++++++++++++++- .../src/main/webapp/WEB-INF/wro.properties | 4 +- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index a8d298e..0ef3c8d 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -329,7 +329,7 @@ + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + ro.isdc.wro4j + + wro4j-maven-plugin + + + [1.9.0,) + + + run + + + + + + + + + + + + + diff --git a/modules/frontend/src/main/webapp/WEB-INF/wro.properties b/modules/frontend/src/main/webapp/WEB-INF/wro.properties index 521e512..05188b2 100644 --- a/modules/frontend/src/main/webapp/WEB-INF/wro.properties +++ b/modules/frontend/src/main/webapp/WEB-INF/wro.properties @@ -1,2 +1,2 @@ -preProcessors=cssImport,cssMin -postProcessors=lessCss \ No newline at end of file +preProcessors=cssImport,cssMin,jsMin +postProcessors=lessCss From d3f5ab82c93076a0e07150e4b1c89a4e72bda755 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:11:07 +0100 Subject: [PATCH 13/38] Re-enable wro4j --- modules/frontend/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 0ef3c8d..9c29406 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -326,7 +326,7 @@ - + com.spotify docker-maven-plugin From cc98f1432723ddce1202329783892612e527abf0 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Sat, 15 Feb 2020 18:15:31 +0100 Subject: [PATCH 14/38] Update playar --- modules/frontend/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 9c29406..742dbe8 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -30,7 +30,7 @@ 0.3-SNAPSHOT 0.1-SNAPSHOT - 0.4-SNAPSHOT + [0.4-SNAPSHOT,) From 9ef9fee4f79234c1fd1da68a7cb05e3d7fc7330b Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Sat, 15 Feb 2020 23:14:31 +0100 Subject: [PATCH 15/38] Add github action cache support --- .github/workflows/maven.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index cae0f14..9c23815 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -11,6 +11,12 @@ jobs: uses: actions/setup-java@v1 with: java-version: 11 + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- - name: Build with Maven run: mvn -P jitpack-latest -B package -DskipTests=true --file pom.xml From 98c1ada0fdaf20a8a39de4e3a0c31dc52a9dd59e Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Tue, 14 Jul 2020 19:35:37 +0200 Subject: [PATCH 16/38] Fix issue with creating missing chiby-home folders --- .../chiby/ide/frontend/ChibyHomeApplicationSerializer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/frontend/src/main/java/com/github/chiby/ide/frontend/ChibyHomeApplicationSerializer.java b/modules/frontend/src/main/java/com/github/chiby/ide/frontend/ChibyHomeApplicationSerializer.java index 0a630c1..328a282 100644 --- a/modules/frontend/src/main/java/com/github/chiby/ide/frontend/ChibyHomeApplicationSerializer.java +++ b/modules/frontend/src/main/java/com/github/chiby/ide/frontend/ChibyHomeApplicationSerializer.java @@ -46,9 +46,9 @@ public boolean persistApplication(Application app) { Path appHome = applicationHomeResolver.getPathForApplication(app); if (!Files.exists(appHome)) { try { - Files.createDirectory(appHome); + Files.createDirectories(appHome); } catch (IOException e) { - log.log(Level.SEVERE, "Could not create application home directory for " + app.getTitle(), e); + log.log(Level.SEVERE, "Could not create application home directories for " + app.getTitle(), e); } } if (Files.isDirectory(appHome) && Files.isWritable(appHome)) { From ba284bc1cb0f665ef742dcd0e2111d4198098fce Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 7 Sep 2023 17:06:37 +0200 Subject: [PATCH 17/38] Upgrade to m2 central milton version --- modules/frontend/pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 019bcf5..40bbbc0 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -26,7 +26,7 @@ ${java.version} ${java.version} - 2.7.2.4 + 2.8.0.3 [0.3,) [0.1,) @@ -287,7 +287,6 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M3 enforce-versions @@ -315,7 +314,6 @@ org.codehaus.mojo versions-maven-plugin - 2.5 false true From be67515b5c9e3df4ef9a5c89f96d9ea06a94827e Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 7 Sep 2023 17:10:33 +0200 Subject: [PATCH 18/38] Add README instructions --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 30dfbd8..02b4af6 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,16 @@ [![Java 11](https://img.shields.io/badge/Java-11-green "Java 11")](https://java.com) A Blockly-based Spring Boot-enabled IDE + +# Pre-requisites + +* You may need to [install PygameZero on your machine](https://pygame-zero.readthedocs.io/en/latest/installation.html) + +## Developer setup + +* The Chiby server can automatically initialize the folder ``~/chiby-home`` in your user home. By default, it does not attempt to create the folder, but you can set the property upon run : +``` +java -jar chiby-ide.jar --chiby.ide.initialize-home=true +``` + +* The codebase uses Lombok, in Eclipse, you may need to set it up accordingly to avoid compilation errors. \ No newline at end of file From 21ad8575757a3d34e1dba6597faed94036dd8b31 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Fri, 10 Nov 2023 16:27:31 +0100 Subject: [PATCH 19/38] Upgrade hybind --- modules/frontend/pom.xml | 13 ++++++++++++- .../src/main/resources/static/WEB-INF/wro.xml | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 40bbbc0..0640f0d 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -196,7 +196,18 @@ org.webjars.npm hybind - 1.4.3 + 1.7.0 + + + org.webjars.npm + lodash + + + + + org.webjars.npm + lodash + 4.17.21 org.webjars diff --git a/modules/frontend/src/main/resources/static/WEB-INF/wro.xml b/modules/frontend/src/main/resources/static/WEB-INF/wro.xml index 4b50b14..79458ce 100644 --- a/modules/frontend/src/main/resources/static/WEB-INF/wro.xml +++ b/modules/frontend/src/main/resources/static/WEB-INF/wro.xml @@ -12,7 +12,7 @@ webjar:bootstrap.js classpath:META-INF/resources/webjars/bootstrap-select/1.12.4/js/bootstrap-select.js webjar:packery.pkgd.js - classpath:META-INF/resources/webjars/hybind/1.4.3/index.js + classpath:META-INF/resources/webjars/hybind/1.7.0/index.js /ide/js/chiby-ide.service.js From 67eab3a3e8d3596e991e0d79817db0d78b8bc4bf Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:49:22 +0100 Subject: [PATCH 20/38] Update versions for feature branch --- modules/frontend/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 0640f0d..05fe56e 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -4,7 +4,7 @@ com.github.chibyhq ide-frontend - 1.4-SNAPSHOT + 1.4-github-packages-SNAPSHOT jar Chiby IDE :: frontend diff --git a/pom.xml b/pom.xml index 708a8b5..ae6f9d2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.github.chiby.ide reactor - 1.4-SNAPSHOT + 1.4-github-packages-SNAPSHOT pom Chiby IDE reactor project From f0ae2399264dce1b3bc7c3fc7d5b22040c08a040 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:52:40 +0100 Subject: [PATCH 21/38] Upgrade setup actions --- .github/workflows/maven.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9c23815..3c137af 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -6,9 +6,9 @@ jobs: build-latest-snapshots: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 11 - uses: actions/cache@v1 @@ -24,9 +24,9 @@ jobs: if: contains(github.ref, 'master') || (contains(github.ref, 'release') ) || (contains(github.ref, 'support') ) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 11 - name: Build with Maven From 9184fd0cc094a530d89ab5fbc4058b8d9fca9b94 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:52:57 +0100 Subject: [PATCH 22/38] Add publish workflow --- .github/workflows/publish.yml | 19 ++ modules/frontend/pom.xml | 325 ++++++++++++++++++---------------- pom.xml | 66 ++++--- 3 files changed, 232 insertions(+), 178 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9021b70 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,19 @@ +name: Publish package to GitHub Packages + on: + release: + types: [created] + jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: '11' + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 05fe56e..2925f2d 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -1,22 +1,24 @@ - + 4.0.0 - + com.github.chibyhq ide-frontend 1.4-github-packages-SNAPSHOT jar - + Chiby IDE :: frontend Chiby IDE :: Web frontend for Chiby IDE - + org.springframework.boot spring-boot-starter-parent 2.1.3.RELEASE - + openjdk:11-jdk-alpine chiby/ide @@ -25,22 +27,22 @@ 11 ${java.version} ${java.version} - + 2.8.0.3 - + [0.3,) [0.1,) [0.5.4,) - + - jitpack-latest - - develop-SNAPSHOT - develop-SNAPSHOT - develop-SNAPSHOT - + jitpack-latest + + develop-SNAPSHOT + develop-SNAPSHOT + develop-SNAPSHOT + rpi3 @@ -63,12 +65,12 @@ - + ${project.basedir}/src/deb true - + jdeb @@ -88,7 +90,8 @@ - ${project.build.directory}/${project.build.finalName}.${project.packaging} + + ${project.build.directory}/${project.build.finalName}.${project.packaging} file perm @@ -119,18 +122,18 @@ - + - + org.springframework.boot spring-boot-starter-web - + org.springframework.data spring-data-rest-hal-browser @@ -143,29 +146,29 @@ org.springframework.boot spring-boot-starter-hateoas - + org.springframework.data spring-data-keyvalue - + com.querydsl querydsl-collections - + com.dorkbox SystemTray 3.17 - + org.webjars webjars-locator 0.36 - + io.milton milton-server-ce @@ -177,7 +180,7 @@ - + org.webjars bootstrap @@ -286,7 +289,7 @@ test - + @@ -295,43 +298,43 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-versions - - enforce - - - - - 3.2.5 - - - 11 - - - - - - - - com.amashchenko.maven.plugin - gitflow-maven-plugin - 1.11.0 - - - org.codehaus.mojo - versions-maven-plugin - - false - true - true - - - + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-versions + + enforce + + + + + 3.2.5 + + + 11 + + + + + + + + com.amashchenko.maven.plugin + gitflow-maven-plugin + 1.11.0 + + + org.codehaus.mojo + versions-maven-plugin + + false + true + true + + + org.springframework.boot spring-boot-maven-plugin @@ -398,12 +401,12 @@ 2.18.0 - - - com.spotify - docker-maven-plugin - 0.4.13 - + + ${image.name} + ${base.image} + true + true + + ${project.version} + latest + + + /opt/chiby-ide + ${INSTALLATION_HOME}/applications + /var/log/chiby-ide + C.UTF-8 + http://distrib-coffee.ipsl.jussieu.fr/pub/linux/alpine/alpine/ + + + + mkdir -p $INSTALLATION_HOME + mkdir -p $CHIBY_IDE_HOME + chmod -R 777 $CHIBY_IDE_HOME + mkdir -p $IDE_LOGS + + + $INSTALLATION_HOME + ["java","-jar","${project.build.finalName}.${project.packaging}"] + + 8080 + + + $IDE_LOGS + $CHIBY_IDE_HOME + + + + ${project.build.directory} + + ${project.build.finalName}.${project.packaging} + + ${INSTALLATION_HOME} + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 - ${image.name} - ${base.image} - true - true - - ${project.version} - latest - - - /opt/chiby-ide - ${INSTALLATION_HOME}/applications - /var/log/chiby-ide - C.UTF-8 - http://distrib-coffee.ipsl.jussieu.fr/pub/linux/alpine/alpine/ - - - - mkdir -p $INSTALLATION_HOME - mkdir -p $CHIBY_IDE_HOME - chmod -R 777 $CHIBY_IDE_HOME - mkdir -p $IDE_LOGS - - - $INSTALLATION_HOME - ["java","-jar","${project.build.finalName}.${project.packaging}"] - - 8080 - - - $IDE_LOGS - $CHIBY_IDE_HOME - - - - ${project.build.directory} - - ${project.build.finalName}.${project.packaging} - - ${INSTALLATION_HOME} - - + + + + + ro.isdc.wro4j + + wro4j-maven-plugin + + + [1.9.0,) + + + run + + + + + + + + - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - ro.isdc.wro4j - - wro4j-maven-plugin - - - [1.9.0,) - - - run - - - - - - - - - - - - - - - milton-repo - http://dl.bintray.com/milton/Milton - - - jitpack.io - https://jitpack.io - - - + + + + github + GitHub Packages + https://maven.pkg.github.com/chibyhq/chiby-ide + + + + + + milton-repo + http://milton.io/maven/ + + + jitpack.io + https://jitpack.io + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index ae6f9d2..781c03a 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 @@ -10,29 +11,48 @@ Chiby IDE reactor project ${project.name} - + - modules/frontend + modules/frontend - + - - - com.amashchenko.maven.plugin - gitflow-maven-plugin - 1.11.0 - - - org.codehaus.mojo - versions-maven-plugin - 2.5 - - false - true - true - - - - + + + com.amashchenko.maven.plugin + gitflow-maven-plugin + 1.11.0 + + + org.codehaus.mojo + versions-maven-plugin + 2.5 + + false + true + true + + + + + + + + github + + + central + https://repo1.maven.org/maven2 + + + github + https://maven.pkg.github.com/chibyhq/chiby-ide + + true + + + + + - + \ No newline at end of file From 71043fbcec974f1ecd0ab3e43ac722e04afc2be5 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:58:43 +0100 Subject: [PATCH 23/38] Add distribution to setup-java --- .github/workflows/maven.yml | 2 ++ .github/workflows/publish.yml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 3c137af..0315506 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -11,6 +11,7 @@ jobs: uses: actions/setup-java@v3 with: java-version: 11 + distribution: temurin - uses: actions/cache@v1 with: path: ~/.m2/repository @@ -29,5 +30,6 @@ jobs: uses: actions/setup-java@v3 with: java-version: 11 + distribution: temurin - name: Build with Maven run: mvn -B package -DskipTests=true --file pom.xml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9021b70..afcc130 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,7 +12,8 @@ name: Publish package to GitHub Packages - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: - java-version: '11' + java-version: 11 + distribution: temurin - name: Publish package run: mvn --batch-mode deploy env: From 10c8f072a478dbde5ef74b4560391b18382ba4c2 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:50:42 +0100 Subject: [PATCH 24/38] Remove jitpack and snapshot build --- .github/workflows/maven.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0315506..24f7c69 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -3,7 +3,7 @@ name: Java CI on: [push] jobs: - build-latest-snapshots: + build and deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,18 +18,5 @@ jobs: key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - - name: Build with Maven - run: mvn -P jitpack-latest -B package -DskipTests=true --file pom.xml - - build-stable: - if: contains(github.ref, 'master') || (contains(github.ref, 'release') ) || (contains(github.ref, 'support') ) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: temurin - name: Build with Maven run: mvn -B package -DskipTests=true --file pom.xml From 5182f2e368e4b97e69aea6897e4739f03c85f7d8 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:51:50 +0100 Subject: [PATCH 25/38] Fix workflow file --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 24f7c69..632f7f6 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -3,7 +3,7 @@ name: Java CI on: [push] jobs: - build and deploy: + build-and-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 907f7c1a9d39e4c8dcbe006cf11669f4c170ccac Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:55:31 +0100 Subject: [PATCH 26/38] Add manual deploy workflow --- .github/workflows/deploy.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..42f7929 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,18 @@ +name: Deploy package to GitHub Packages + on: workflow_dispatch + jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: temurin + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bbcb705b3b1ae27e10dfc074f419a6e3f4e7a895 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:59:03 +0100 Subject: [PATCH 27/38] Fix workflow syntax --- .github/workflows/deploy.yml | 2 +- .github/workflows/publish.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 42f7929..4a1bc26 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,5 @@ name: Deploy package to GitHub Packages - on: workflow_dispatch + on: [workflow_dispatch] jobs: deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index afcc130..a2f9a8e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,7 @@ name: Publish package to GitHub Packages on: - release: - types: [created] + - release: + types: [created] jobs: publish: runs-on: ubuntu-latest From e1cb9aa6b94285d67f23fbe119303041b17de1c1 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:01:58 +0100 Subject: [PATCH 28/38] Fix workflow files --- .github/workflows/deploy.yml | 36 +++++++++++++++++---------------- .github/workflows/maven.yml | 2 +- .github/workflows/publish.yml | 38 +++++++++++++++++------------------ 3 files changed, 39 insertions(+), 37 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4a1bc26..10e86a7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,18 +1,20 @@ name: Deploy package to GitHub Packages - on: [workflow_dispatch] - jobs: - deploy: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: temurin - - name: Publish package - run: mvn --batch-mode deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +on: [workflow_dispatch] + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: temurin + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 632f7f6..ed7b4be 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -3,7 +3,7 @@ name: Java CI on: [push] jobs: - build-and-deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a2f9a8e..7e72ceb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,20 +1,20 @@ name: Publish package to GitHub Packages - on: - - release: - types: [created] - jobs: - publish: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: temurin - - name: Publish package - run: mvn --batch-mode deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: temurin + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ab883b7b7ac0dd49b82129dcca3ea9330769f13c Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:07:35 +0100 Subject: [PATCH 29/38] Fix workflow syntax --- .github/workflows/deploy.yml | 2 +- .github/workflows/maven.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 10e86a7..8535413 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,6 @@ name: Deploy package to GitHub Packages -on: [workflow_dispatch] +on: workflow_dispatch jobs: deploy: diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ed7b4be..632415d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,6 +1,6 @@ name: Java CI -on: [push] +on: push jobs: build: From e9832da0a04ec0bc554913180632f5f449202f9e Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:12:05 +0100 Subject: [PATCH 30/38] Add a systematic publish --- .github/workflows/maven.yml | 44 ++++++++++++++++++++++++----------- .github/workflows/publish.yml | 1 + 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 632415d..04d95da 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -6,17 +6,33 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: temurin - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Build with Maven - run: mvn -B package -DskipTests=true --file pom.xml + - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: temurin + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build with Maven + run: mvn -B package -DskipTests=true --file pom.xml + + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: temurin + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7e72ceb..05e19d8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,5 @@ name: Publish package to GitHub Packages + on: release: types: [created] From 68e2a7313373c4e6d1ec47a96d94d78db51026d5 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:17:05 +0100 Subject: [PATCH 31/38] Add github profile --- modules/frontend/pom.xml | 43 ++++++++++++++++++++++++---------------- pom.xml | 9 +++++++++ 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 2925f2d..39abfe7 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -36,14 +36,6 @@ - - jitpack-latest - - develop-SNAPSHOT - develop-SNAPSHOT - develop-SNAPSHOT - - rpi3 @@ -51,6 +43,31 @@ chiby/rpi3-ide + + github + + + + github + GitHub Packages + https://maven.pkg.github.com/chibyhq/chiby-ide + + + + + + central + https://repo1.maven.org/maven2 + + + github + https://maven.pkg.github.com/chibyhq/chiby-ide + + true + + + + gitlab-x64 @@ -508,15 +525,6 @@ - - - - github - GitHub Packages - https://maven.pkg.github.com/chibyhq/chiby-ide - - - milton-repo @@ -527,4 +535,5 @@ https://jitpack.io + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 781c03a..da82415 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,15 @@ github + + + + github + GitHub Packages + https://maven.pkg.github.com/chibyhq/chiby-ide + + + central From ce5fa03dec168dd87b7b75e3215734ea677d2639 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:17:19 +0100 Subject: [PATCH 32/38] Add cache support --- .github/workflows/maven.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 04d95da..b40a461 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -32,6 +32,12 @@ jobs: with: java-version: 11 distribution: temurin + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- - name: Publish package run: mvn --batch-mode deploy env: From 08d9619b3ffcaef8fcb171001b1c7b8cd96c7242 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:25:44 +0100 Subject: [PATCH 33/38] Activate github profile --- .github/workflows/deploy.yml | 2 +- .github/workflows/maven.yml | 4 ++-- .github/workflows/publish.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8535413..ca30586 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,6 +15,6 @@ jobs: java-version: 11 distribution: temurin - name: Publish package - run: mvn --batch-mode deploy + run: mvn -P github --batch-mode deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b40a461..165fda7 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -19,7 +19,7 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Build with Maven - run: mvn -B package -DskipTests=true --file pom.xml + run: mvn -P github -B package -DskipTests=true --file pom.xml publish: runs-on: ubuntu-latest @@ -39,6 +39,6 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Publish package - run: mvn --batch-mode deploy + run: mvn -P github --batch-mode deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 05e19d8..23d9b58 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,6 +16,6 @@ jobs: java-version: 11 distribution: temurin - name: Publish package - run: mvn --batch-mode deploy + run: mvn -P github --batch-mode deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From eadd3b92fc933995f61531830c944d0afad3b31c Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:26:11 +0100 Subject: [PATCH 34/38] Remove redundant jitpack def --- jitpack.yml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 jitpack.yml diff --git a/jitpack.yml b/jitpack.yml deleted file mode 100644 index adb3fe1..0000000 --- a/jitpack.yml +++ /dev/null @@ -1,2 +0,0 @@ -jdk: - - openjdk11 From 399b810e12939e5ec82609c14946f4510ab36039 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:26:57 +0100 Subject: [PATCH 35/38] Fix bug when initializing sample projects from fatjar --- .../ide/frontend/ChibyHomeDataInitializer.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/frontend/src/main/java/com/github/chiby/ide/frontend/ChibyHomeDataInitializer.java b/modules/frontend/src/main/java/com/github/chiby/ide/frontend/ChibyHomeDataInitializer.java index a53c97e..b4cda62 100644 --- a/modules/frontend/src/main/java/com/github/chiby/ide/frontend/ChibyHomeDataInitializer.java +++ b/modules/frontend/src/main/java/com/github/chiby/ide/frontend/ChibyHomeDataInitializer.java @@ -1,12 +1,14 @@ package com.github.chiby.ide.frontend; import java.io.IOException; +import java.net.URI; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.Collections; import java.util.UUID; import java.util.logging.Level; @@ -56,8 +58,18 @@ public void run(ApplicationArguments args) throws Exception { Path homePath = fileSystem.getPath(frontendConfig.getHome()); if( ( (!Files.exists(homePath)) || Files.list(homePath).count() == 0) && frontendConfig.isInitializeHome()){ Files.createDirectories(homePath); - Files.newDirectoryStream(Paths.get(ClassLoader.getSystemResource("sample-projects").toURI())) - .forEach(this::findApplicationDefinition); + + String resourceDirectory = "/sample-projects"; + URI uri = getClass().getResource(resourceDirectory).toURI(); + Path path; + + if (uri.getScheme().equals("jar")) { + path = FileSystems.newFileSystem(uri, Collections.emptyMap()).getPath("/BOOT-INF/classes" + resourceDirectory); + }else { + path = Paths.get(uri); + } + + Files.newDirectoryStream(path).forEach(this::findApplicationDefinition); if(serializer != null){ serializer.persistAllApplications(); From a09ef4680a648fec81746e257d3960996b363f0f Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:29:38 +0100 Subject: [PATCH 36/38] Support full headless mode to avoid tray icon exception --- .../ide/frontend/FrontendApplication.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/frontend/src/main/java/com/github/chiby/ide/frontend/FrontendApplication.java b/modules/frontend/src/main/java/com/github/chiby/ide/frontend/FrontendApplication.java index eb4d737..02a3ca2 100644 --- a/modules/frontend/src/main/java/com/github/chiby/ide/frontend/FrontendApplication.java +++ b/modules/frontend/src/main/java/com/github/chiby/ide/frontend/FrontendApplication.java @@ -1,5 +1,7 @@ package com.github.chiby.ide.frontend; +import java.util.logging.Level; + import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.context.ConfigurableApplicationContext; @@ -7,21 +9,38 @@ import com.github.chiby.ide.frontend.desktop.IdeTrayIcon; +import lombok.extern.java.Log; + @SpringBootApplication @EnableMapRepositories("com.github.chibyhq.store.model.repositories") +@Log public class FrontendApplication { private static ConfigurableApplicationContext s_context; + private static IdeTrayIcon s_trayIcon; + public static void main(String[] args) { SpringApplicationBuilder builder = new SpringApplicationBuilder(FrontendApplication.class); - builder.headless(false); + + // By default, we assume a desktop environment + boolean headless = System.getProperty("chiby.ide.headless", "false").equalsIgnoreCase("true"); + + log.log(Level.INFO, "Running in headless mode ? {0}",headless); + + builder.headless(headless); s_context = builder.run(args); - IdeTrayIcon tray = new IdeTrayIcon(); + if(!headless) { + s_trayIcon = new IdeTrayIcon(); + } } public static ConfigurableApplicationContext getContext() { return s_context; } + + public static IdeTrayIcon getTrayIcon() { + return s_trayIcon; + } } From e8adba6944bdeb15f85f4a11f8f421c68104e3de Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:32:06 +0100 Subject: [PATCH 37/38] Update versions for development branch --- modules/frontend/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 39abfe7..9f9f688 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -6,7 +6,7 @@ com.github.chibyhq ide-frontend - 1.4-github-packages-SNAPSHOT + 1.4-SNAPSHOT jar Chiby IDE :: frontend diff --git a/pom.xml b/pom.xml index da82415..08f7016 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.github.chiby.ide reactor - 1.4-github-packages-SNAPSHOT + 1.4-SNAPSHOT pom Chiby IDE reactor project From c385dba7a6f709b1e9f894abd250183c2f49bd57 Mon Sep 17 00:00:00 2001 From: bcopy <500789+bcopy@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:32:37 +0100 Subject: [PATCH 38/38] Update versions for release --- modules/frontend/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/frontend/pom.xml b/modules/frontend/pom.xml index 9f9f688..45021c5 100644 --- a/modules/frontend/pom.xml +++ b/modules/frontend/pom.xml @@ -6,7 +6,7 @@ com.github.chibyhq ide-frontend - 1.4-SNAPSHOT + 1.4.0 jar Chiby IDE :: frontend diff --git a/pom.xml b/pom.xml index 08f7016..9f853a1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.github.chiby.ide reactor - 1.4-SNAPSHOT + 1.4.0 pom Chiby IDE reactor project