Skip to content

Eclipse

Oleh Astappiev edited this page Oct 16, 2023 · 1 revision

Eclipse

Add project to Workspace

  1. Click File -> Open Projects from File System...
  2. Select the folder where you previously cloned the project
  3. Click Finish
  • Alternatively, you can use New -> Other... -> Git to clone the project directly to your Workspace.

Run project

The IDE will load the project structure from Maven's pom.xml file.

  1. Wait for indexing and validation to finish;
  2. Right-click on package.json file in Project Explorer and select Run as -> npm install;
  3. Right-click on package.json file in Project Explorer and select Run as -> npm run build:dev;
  4. Configure Tomcat server to run our application:
    • Go to Servers tab (right bottom of the screen) and click No servers are available. Click this link to create a new server...;
    • Find the latest Tomcat server (as of writing, it's Tomcat v10.1 Server) and click Next;
    • Click Browse... and select the directory where you installed Tomcat (or alternatively you can click Download and install..), then click Finish;
    • Right-click on the server you created and select Add and Remove...;
    • Double click on Learnweb application (it should be moved to the right panel), then click Finish.
  5. Start the server;
  6. The browser should open, and the project should be deployed.

Create a WAR file

  1. Right-click on pom.xml
  2. Select Run as -> 3 Maven build...
  3. Enter the Goals as clean install and Profiles as prod,!local
  4. Click Run

Alternatively, you can use the console command mvn clean install -P prod,!dev from the root directory.

Clone this wiki locally