|
a |
|
b/personalization-manager/README.md |
|
|
1 |
Swagger: http://alfred.eu:8080/personalization-manager/swagger-ui.html
|
|
|
2 |
Raw JSON definition file (used for client generation): http://alfred.eu:8080/personalization-manager/v2/api-docs
|
|
|
3 |
|
|
|
4 |
Service startup config: sudo mcedit /etc/default/tomcat7
|
|
|
5 |
To restart Tomcat: sudo service tomcat7 restart
|
|
|
6 |
Tomcat config: /var/lib/tomcat7/conf
|
|
|
7 |
|
|
|
8 |
Logs: /var/log/tomcat7
|
|
|
9 |
|
|
|
10 |
===== DEPLOYMENT on alfred.eu:
|
|
|
11 |
Via GUI: http://alfred.eu:8080/manager/html (ask TIE for credentials)
|
|
|
12 |
or via maven: mvn tomcat7:redeploy (sometimes gets stuck, need to restart the tomcat service)
|
|
|
13 |
|
|
|
14 |
For the latter you need to provide authentication details in the C:\Users\your_account\.m2\settings.xml, like:
|
|
|
15 |
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
|
|
16 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
17 |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
|
|
|
18 |
http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
|
|
19 |
<servers>
|
|
|
20 |
<server>
|
|
|
21 |
<id>alfred-tomcat</id>
|
|
|
22 |
<username>ask_TIE</username>
|
|
|
23 |
<password>ask_TIE</password>
|
|
|
24 |
</server>
|
|
|
25 |
</servers>
|
|
|
26 |
</settings>
|
|
|
27 |
|
|
|
28 |
===== To generate the REST client:
|
|
|
29 |
|
|
|
30 |
Description of the tool: https://github.com/swagger-api/swagger-codegen
|
|
|
31 |
|
|
|
32 |
Download the tool: http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.1.4/swagger-codegen-cli-2.1.4.jar
|
|
|
33 |
|
|
|
34 |
Command to generate the client (create a .bat file in the same folder as swagger-codegen.jar):
|
|
|
35 |
|
|
|
36 |
java -jar swagger-codegen-cli-2.1.4.jar generate ^
|
|
|
37 |
-i http://alfred.eu:8080/personalization-manager/v2/api-docs ^
|
|
|
38 |
-l java ^
|
|
|
39 |
-o alfred/client/personalization-manager/java
|
|
|
40 |
|
|
|
41 |
See the languages the generator supports: java -jar swagger-codegen-cli-2.1.4.jar langs
|
|
|
42 |
|