Skip to content

Commit d24fea8

Browse files
authored
Merge pull request #10 from EBIvariation/hotfix/swagger-host
Customisable configuration EVA-388
2 parents 4774fea + 64927c7 commit d24fea8

File tree

4 files changed

+39
-13
lines changed

4 files changed

+39
-13
lines changed

eva-server/pom.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@
4949
<finalName>eva</finalName>
5050

5151
<plugins>
52+
<plugin>
53+
<groupId>org.apache.maven.plugins</groupId>
54+
<artifactId>maven-war-plugin</artifactId>
55+
<configuration>
56+
<webResources>
57+
<resource>
58+
<filtering>true</filtering>
59+
<directory>src/main/webapp</directory>
60+
<includes>
61+
<include>**/web.xml</include>
62+
</includes>
63+
</resource>
64+
</webResources>
65+
<warSourceDirectory>src/main/webapp</warSourceDirectory>
66+
<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
67+
</configuration>
68+
</plugin>
69+
5270
<plugin>
5371
<groupId>org.eclipse.jetty</groupId>
5472
<artifactId>jetty-maven-plugin</artifactId>
@@ -62,6 +80,13 @@
6280
</configuration>
6381
</plugin>
6482
</plugins>
83+
84+
<resources>
85+
<resource>
86+
<directory>src/main/resources</directory>
87+
<filtering>true</filtering>
88+
</resource>
89+
</resources>
6590
</build>
6691

6792
</project>
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
eva.mongo.host=
2-
eva.mongo.user=
3-
eva.mongo.passwd=
4-
eva.mongo.auth.db=
1+
eva.mongo.host=${eva.mongo.host}
2+
eva.mongo.user=${eva.mongo.user}
3+
eva.mongo.passwd=${eva.mongo.passwd}
4+
eva.mongo.auth.db=${eva.mongo.auth.db}
55

6-
eva.mongo.collections.variants=
7-
eva.mongo.collections.files=
6+
eva.mongo.collections.variants=${eva.mongo.collections.variants}
7+
eva.mongo.collections.files=${eva.mongo.collections.files}
88

9-
eva.version=
9+
eva.version=${eva.version}
1010

11-
eva.evapro.datasource=dstest
11+
eva.evapro.datasource=${eva.evapro.datasource}
1212

eva-server/src/main/webapp/WEB-INF/web.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</init-param>
4141
<init-param>
4242
<param-name>swagger.api.basepath</param-name>
43-
<param-value>http://localhost:8080/webservices/rest</param-value>
43+
<param-value>${eva.context.root}/webservices/rest</param-value>
4444
</init-param>
4545
<load-on-startup>2</load-on-startup>
4646
</servlet>
@@ -51,9 +51,10 @@
5151
</welcome-file-list>
5252

5353
<resource-ref>
54-
<description>JDBC Data Source</description>
55-
<res-ref-name>jdbc/dstest</res-ref-name>
54+
<description>EVAPRO Data Source</description>
55+
<res-ref-name>jdbc/${eva.evapro.datasource}</res-ref-name>
5656
<res-type>javax.sql.DataSource</res-type>
5757
<res-auth>Container</res-auth>
5858
</resource-ref>
59-
</web-app>
59+
</web-app>
60+

eva-server/src/main/webapp/webservices/api/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
if (url && url.length > 1) {
3434
url = decodeURIComponent(url[1]);
3535
} else {
36-
url = "http://www.ebi.ac.uk/eva/webservices/rest/swagger.json";
36+
url = window.location.protocol + "//" + window.location.host + "/eva/webservices/rest/swagger.json";
3737
}
3838

3939
// Pre load translate...

0 commit comments

Comments
 (0)