oasp ide setup - rfreier/oasp4j GitHub Wiki
This Tutorial explains how to setup the development environment to work on and contribute to OASP4j with your Windows computer.
We are using a pre-configured IDE oasp4j-ide for development. To get started follow these steps:
-
Get a Git client. For Windows use:
-
Important: install with option Use Git from the Windows Command Prompts but without Windows Explorer integration.
-
Download TortoiseGit from https://code.google.com/p/tortoisegit/
-
-
Download the IDE
-
If you are a member of Capgemini: download oasp-ide package or the higher integrated devon distribution (for devon please find the setup guide within the devon-dist).
-
If you are not member of Capgemini: We cannot distribute the package. Please consult oasp4j-ide to setup and configure the IDE manually. If you need help, please get in touch.
-
-
Choose a project location for your project (e.g. C:\projects\oasp, referred to with $projectLoc in this setup guides following steps). Avoid long paths and white spaces to prevent trouble. Extract the downloaded ZIP files via Extract Here (e.g. using 7-Zip). Do not use the Windows native ZIP tool to extract as this is not working properly on long paths and filenames.
-
Create a file named $projectLoc\variables-customized.bat in your project location with the following contents:
set SETTINGS_REL_PATH=oasp4j\oasp4j-ide\oasp4j-ide-settings\src\main\settings
-
Open console.bat and check out the git repositories you need to work on into $projectLoc\workspaces\main. with the following commands:
cd workspaces/main git clone --recursive https://github.com/oasp/oasp4j.git git clone https://github.com/oasp/oasp4js.git
-
Run the script $projectLoc\update-all-workspaces.bat.
Hint: You can use update-all-workspaces.bat whenever you created a new project folder in your workspaces folder to separate different project-workspaces. This update will create new Eclipse start batches allowing to run a number of Eclipse instances using different workspaces in parallel.
You should end up having a structure like this in $projectLoc
Do another check whether there are files in folder $projectLoc\workspaces\main\oasp4j\oasp4j-ide!
-
Run the script $projectLoc\eclipse-main.bat to start the Eclipse IDE.
-
In Eclipse select File > Import > Maven > and Import existing Maven Project and then choose the cloned projects from your workspace. Root Directory: $projectLoc\workspaces\main. You can also click the Browse button and select the folder structure. (If there is a exception: Auto share git projects (Waiting) - choose Run in Background)
-
Execute the application by starting the ´io.oasp.gastronomy.restaurant.SpringBootApp´. Select the class and click the right mouse button. In the context menu select the entry 'Run as ⇒ Java Application' (or 'Debug as …'). The application starts up and creates log entries in the Eclipse Console Tab.
Once started, the OASP server applications runs on http://localhost:8081 with /oasp4j-sample-server/ as context-root. Access Server on base url: http://localhost:8081/oasp4j-sample-server, login with waiter/waiter and have a look at the services list provided.
-
If you want to properly test the example application you might want to build the OASP4js-client as follows:
-
Run console.bat
-
Ensure you have a git client on your path:
git --help
If you get an error instead of the git help output, please redo step 1.
-
Now call the following commands:
cd workspaces/main/oasp4js/ npm install -g gulp npm install -g bower npm install cd java mvn install
If [INFO] BUILD SUCCESS → next step
-
You can then extract the client from oasp4js/java/target/oasp4js-sample-*-web.zip into oasp4j/oasp4j-samples/oaps4j-sample-server/src/main/webapp/jsclient. You may have to create the folder
jsclient
by yourself. Restart your tomcat and open http://localhost:8081/oasp4j-sample-server/ or for simpler development run both tomcat and a grunt-server as overlay via:cd workspaces/main/oasp4js gulp serve
A new tab in your webbrowser should open and you can try to sign in:
Test - User Name: waiter, Password: waiter. (Exception: If "Authentication failed. Please try again!" → try to restart Tomcat in Eclipse or try to click the right button on Tomcat → Clean… or Clean Tomcat Work Directory)
You should end up at this page:
-