Mercurial > dive4elements > gnv-client
changeset 282:d6c0d426e38a
Added the Possibility to get Version-Infomation and Release Date/Time from the GNV-Project using a Browser issue87
gnv/trunk@360 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 23 Nov 2009 16:30:33 +0000 |
parents | 4ec95d586f31 |
children | ef10bf497a16 |
files | gnv/ChangeLog gnv/pom.xml gnv/src/main/resources/applicationMessages.properties gnv/src/main/resources/applicationMessages_en.properties gnv/src/main/webapp/WEB-INF/config/struts-config.xml gnv/src/main/webapp/WEB-INF/jsp/version.jsp |
diffstat | 6 files changed, 111 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv/ChangeLog Fri Nov 20 14:48:33 2009 +0000 +++ b/gnv/ChangeLog Mon Nov 23 16:30:33 2009 +0000 @@ -1,3 +1,18 @@ +2009-11-23 Tim Englich <tim.englich@intevation.de> + + * src/main/resources/applicationMessages*.properties: + Added Properties which hold the Version-information of the + GNV which will be set by te Maven package-process. + * src/main/webapp/WEB-INF/config/struts-config.xml: + Added an Action which make the Version-Information accessible. + Now it is possible to get those Information using /version.do + * src/main/webapp/WEB-INF/jsp/version.jsp: + Added an Page where it is possible to get the Information about the current + Version of the GNV and the ArtifactDatabase + * pom.xml: + Added Plugin for creating the BildTime and BildVersion of the gnv. + Replace Tokens in the /src/main/ressources Files + 2009-11-20 Ingo Weinzierl <ingo.weinzierl@intevation.de> * src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java:
--- a/gnv/pom.xml Fri Nov 20 14:48:33 2009 +0000 +++ b/gnv/pom.xml Mon Nov 23 16:30:33 2009 +0000 @@ -120,6 +120,39 @@ </additionalProjectFacets> </configuration> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>buildnumber-maven-plugin</artifactId> + <version>1.0-beta-2</version> + <executions> + <execution> + <phase>initialize</phase> + <goals> + <goal>create</goal> + </goals> + </execution> + </executions> + <configuration> + <doCheck>false</doCheck> + <doUpdate>false</doUpdate> + <timestampFormat>{0, date, yyyy-MM-dd HH:mm:ss}</timestampFormat> + <format>{0,date,yyyy-MM-dd HH:mm:ss}</format> + <items> + <item>timestamp</item> + </items> + + <revisionOnScmFailure>no_revision</revisionOnScmFailure> + </configuration> + </plugin> + + + </plugins> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> </build> </project>
--- a/gnv/src/main/resources/applicationMessages.properties Fri Nov 20 14:48:33 2009 +0000 +++ b/gnv/src/main/resources/applicationMessages.properties Mon Nov 23 16:30:33 2009 +0000 @@ -1,3 +1,8 @@ +# application.properties +application.name=${pom.name} +application.version=${pom.version} +application.releasedate=${timestamp} + gnviewer.app.title = BSH-GDI genericViewer gnviewer.project.save = Projekt speichern
--- a/gnv/src/main/resources/applicationMessages_en.properties Fri Nov 20 14:48:33 2009 +0000 +++ b/gnv/src/main/resources/applicationMessages_en.properties Mon Nov 23 16:30:33 2009 +0000 @@ -1,3 +1,8 @@ +# application.properties +application.name=${pom.name} +application.version=${pom.version} +application.releasedate=${timestamp} + gnviewer.app.title = BSH-GDI genericViewer gnviewer.project.save = Save Project
--- a/gnv/src/main/webapp/WEB-INF/config/struts-config.xml Fri Nov 20 14:48:33 2009 +0000 +++ b/gnv/src/main/webapp/WEB-INF/config/struts-config.xml Mon Nov 23 16:30:33 2009 +0000 @@ -9,6 +9,14 @@ </global-forwards> <action-mappings> + <action path="/version" + type="de.intevation.gnv.action.ArtifactDatabaseActionBase" + scope="request" + validate="false"> + <forward + name="success" + path="/WEB-INF/jsp/version.jsp"/> + </action> <action path="/start" type="de.intevation.gnv.action.FetchArtifactFactoriesAction" scope="request"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/version.jsp Mon Nov 23 16:30:33 2009 +0000 @@ -0,0 +1,45 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> +<html xhtml="true" locale="true"> + <head> + <title> + <bean:message key="gnviewer.app.title"/> + </title> + <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> + <meta http-equiv="Content-Script-Type" content="text/javascript"/> + <meta http-equiv="Content-Style-Type" content="text/css"/> + <meta http-equiv="Expires" content="Mon, 01 Jan 1990 00:00:01 GMT"/> + <meta http-equiv="pragma" content="no-cache"/> + <meta http-equiv="cache-control" content="no-cache"/> + <meta name="robots" content="noindex"/> + <link href="styles/default.css" rel="stylesheet" type="text/css"/> + <script type="text/javascript" src="scripts/gnviewer.js"></script> + </head> + + <body id="gnviewerbody"> + <div id="overlay"></div> + <div style="width:100%;left:0;top:0;width:100%;height:100%;position:absolute"> + <div id="overlayContent"> + <p> + <bean:message key="gnviewer.productselection.overlay.title"/> + </p> + </div> + </div> + <div id="page"> + <jsp:include page="header.jsp" /> + <div id="basefilter"> + <br/> + <h1> Generischer Viewer </h1> + <b>Name:</b> <bean:message key="application.name"/><br/> + <b>Version:</b> <bean:message key="application.version"/><br/> + <b>Date:</b> <bean:message key="application.releasedate"/><br/> + <h1> Artifaktdatenbank </h1> + <b>Name:</b> N/N<br/> + <b>Version:</b> N/N<br/> + <b>Date:</b> N/N<br/> + </div> + <jsp:include page="footer.jsp" /> + </div> + </body> +</html> \ No newline at end of file