diff --git a/api-webapp/pom.xml b/api-webapp/pom.xml index 2053ba1..4895c6d 100644 --- a/api-webapp/pom.xml +++ b/api-webapp/pom.xml @@ -7,7 +7,7 @@ org.jeudego.pairgoth engine-parent - 1.0-SNAPSHOT + 0.2-SNAPSHOT api-webapp @@ -67,7 +67,7 @@ ${pairgoth.env} - ${project.version} + ${pairgoth.version} ${pairgoth.api.external.url} ${pairgoth.webapp.external.url} ${pairgoth.store} diff --git a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/server/WebappManager.kt b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/server/WebappManager.kt index 153474a..bbddeed 100644 --- a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/server/WebappManager.kt +++ b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/server/WebappManager.kt @@ -62,8 +62,7 @@ class WebappManager : ServletContextListener, ServletContextAttributeListener, H properties[(key as String).removePrefix(PAIRGOTH_PROPERTIES_PREFIX)] = value } - val env = properties.getProperty("env") - logger.info("Using profile $env", ) + logger.info("pairgoth server ${properties["version"]} with profile ${properties["env"]}") // set system user agent string to empty string System.setProperty("http.agent", "") diff --git a/application/pom.xml b/application/pom.xml index 46ba921..ceaa459 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -4,7 +4,7 @@ org.jeudego.pairgoth engine-parent - 1.0-SNAPSHOT + 0.2-SNAPSHOT application pom diff --git a/pom.xml b/pom.xml index 3d93956..2b13af5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jeudego.pairgoth engine-parent - 1.0-SNAPSHOT + 0.2-SNAPSHOT pom @@ -66,6 +66,7 @@ dev + ${project.version} http localhost 8080 diff --git a/view-webapp/pom.xml b/view-webapp/pom.xml index b4add5d..b7de212 100644 --- a/view-webapp/pom.xml +++ b/view-webapp/pom.xml @@ -7,7 +7,7 @@ org.jeudego.pairgoth engine-parent - 1.0-SNAPSHOT + 0.2-SNAPSHOT view-webapp @@ -84,6 +84,7 @@ ${pairgoth.env} + ${pairgoth.version} ${pairgoth.api.external.url} ${pairgoth.webapp.external.url} ${pairgoth.store} diff --git a/view-webapp/src/main/kotlin/org/jeudego/pairgoth/web/WebappManager.kt b/view-webapp/src/main/kotlin/org/jeudego/pairgoth/web/WebappManager.kt index e26e556..57c5ff0 100644 --- a/view-webapp/src/main/kotlin/org/jeudego/pairgoth/web/WebappManager.kt +++ b/view-webapp/src/main/kotlin/org/jeudego/pairgoth/web/WebappManager.kt @@ -64,11 +64,11 @@ class WebappManager : ServletContextListener, ServletContextAttributeListener, H properties[(key as String).removePrefix(PAIRGOTH_PROPERTIES_PREFIX)] = value } - val env = properties.getProperty("env") - logger.info("Using profile {}", ) + logger.info("pairgoth server ${properties["version"]} with profile ${properties["env"]}") - // let the view be aware of the environment - context.setAttribute("env", env) + // publish some properties to the webapp context; for easy access from the template + context.setAttribute("env", properties["env"]) + context.setAttribute("version", properties["version"] ?: "?") // set system user agent string to empty string System.setProperty("http.agent", "") diff --git a/view-webapp/src/main/webapp/WEB-INF/layouts/standard.html b/view-webapp/src/main/webapp/WEB-INF/layouts/standard.html index 0970051..81ee8df 100644 --- a/view-webapp/src/main/webapp/WEB-INF/layouts/standard.html +++ b/view-webapp/src/main/webapp/WEB-INF/layouts/standard.html @@ -60,7 +60,7 @@
@@ -81,13 +81,13 @@ - - - + + + - + #if($css) - + #end