IMPORTANT: This project was transitional (it was only needed during the code contribution to Eclipse Sirius). It is archived and then will be removed completely. Please see https://github.com/eclipse-sirius/sirius-web instead.
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:
-
Git
-
Java 11 (Java 12 and later are currently not supported)
-
Apache Maven 3.6.3
-
Recent versions of Node and NPM: in particular, Node >= 14.
-
Rollup for bundling
sirius-components
(npm install -g rollup
) -
Yalc (
npm install -g yalc
): optional, only needed for local publication of the frontend components -
Docker, or an existing PostgreSQL installation.
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
-
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
-
Publish the built version of the frontend components locally. Still from
sirius-components/frontend
:yalc publish
-
Build the backend components:
cd sirius-components/backend mvn clean install
-
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
-
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
-
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 the repository:cd sirius-web ./scripts/restart-siriusweb-postgresql.sh
Warning: this 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 installation, adjust the 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!