Eclipse Sirius Web is a framework to easily create and deploy studios to the web. We keep the principles which made the success of Eclipse Sirius Desktop and make them available on a modern cloud-based stack.
This repository, sirius-web
, contains an example application of the Sirius Web platform, built using the frontend and backend components in sirius-components
.
To build and run the example application you will need the following tools:
To build the components in this repository, you will need the following tools installed:
Warning
|
Note that there are issues with npm under Windows Subsystem for Linux (WSL). If you use WSL and encounter error messages like "Maximum call stack size exceeded" when running NPM, switch to plain Windows where this should work. |
Build steps:
-
Clone the Sirius EMF JSON repository (the
sirius-components
backend depends on it):git clone https://github.com/eclipse-sirius/sirius-emf-json.git
-
Build and install (locally) the EMF JSON JARs:
cd sirius-emf-json mvn clean install -f releng/org.eclipse.sirius.emfjson.releng/pom.xml
If you are behind a proxy, you may get Maven errors about checkstyle.org not being available. In this case you need to explicitly disable CheckStyle from the build:
mvn clean install -f releng/org.eclipse.sirius.emfjson.releng/pom.xml -P\!checkstyle
-
Clone the
sirius-components
repositorygit clone https://github.com/eclipse-sirius/sirius-components.git
-
Build the frontend components:
cd sirius-components/frontend npm install npm run build
You may see some warnings when building the frontend (skipped optional dependencies during
npm install
, circular dependencies detected on an indirect dependency during the build). You can ignore them, they do not cause any actual issue at runtime. -
Publish the built version of the frontend components locally. Still from inside
sirius-components/frontend
:yalc publish
-
Build the backend components:
cd sirius-components/backend mvn clean install
Here again, you may need to add
-P\!checkstyle
to themvn
command if you are behind a proxy.
-
Clone the
sirius-web
repositorygit clone https://github.com/eclipse-sirius/sirius-web.git
-
Build the frontend:
cd sirius-web/frontend yalc add @eclipse-sirius/sirius-components npm install npm run build
You may see some warnings when building the frontend (skipped optional dependencies during
npm install
). You can ignore them, they do not cause any actual issue at runtime. -
Copy the result of the frontend build as static resources in the appropriate backend project. From the root of the repository:
cd sirius-web mkdir -p backend/sirius-web-frontend/src/main/resources/static cp -R frontend/build/* backend/sirius-web-frontend/src/main/resources/static
-
Build the backend:
cd sirius-web/backend mvn clean package
The result is a read-to-run, Spring Boot "fat JAR" in
backend/sirius-web-sample-application/target/sirius-web-sample-application-0.0.1-SNAPSHOT.jar
.
-
Sirius Web uses PostgreSQL for its database. For development or local testing, the easiest way is to start a PostgreSQL instance using Docker. The
scripts
folder contains an example script to do so. From the root of thesirius-web
repository:./scripts/restart-siriusweb-postgresql.sh
WarningThis may take a while the first time you run this as Docker will first pull the PostgreSQL image. If you do not have Docker or want to use an existing PostgreSQL installation, adjust the command-line parameters below and make sure the DB user has admin rights on the database; they are needed to automatically create the DB schema.
-
Start the application:
java -jar backend/sirius-web-sample-application/target/sirius-web-sample-application-0.0.1-SNAPSHOT.jar --spring.profiles.active=dev --spring.datasource.url=jdbc:postgresql://localhost:5433/sirius-web-db --spring.datasource.username=dbuser --spring.datasource.password=dbpwd
-
Point your browser at http://localhost:8080 and enjoy!
WarningThe initial version of Sirius Web has some known issues with Firefox. It is recommended to use a Chrome-based browser until these are fixed.