Commit b43a071c authored by Matija Obreza's avatar Matija Obreza

Included build number in footer.jsp, preparing for minified CSS and JS

parent e55711f4
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.genesys2</groupId>
......@@ -84,9 +85,7 @@
<url>https://oss.sonatype.org/content/repositories/releases</url>
</repository>
<!-- <repository>
<id>sonatype mirror</id>
<url>http://search.maven.org/remotecontent?filepath=</url>
<!-- <repository> <id>sonatype mirror</id> <url>http://search.maven.org/remotecontent?filepath=</url>
</repository> -->
</repositories>
......@@ -357,11 +356,11 @@
<version>${oval.version}</version>
</dependency>
<!--<dependency>-->
<!--<groupId>com.fasterxml.jackson.core</groupId>-->
<!--<artifactId>jackson-databind</artifactId>-->
<!--<version>${jackson.version}</version>-->
<!--</dependency>-->
<!--<dependency> -->
<!--<groupId>com.fasterxml.jackson.core</groupId> -->
<!--<artifactId>jackson-databind</artifactId> -->
<!--<version>${jackson.version}</version> -->
<!--</dependency> -->
<!--Jetty -->
......@@ -455,7 +454,26 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- first check to see if you have locally modified files, and will
fail if there are any. -->
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
<plugin>
<inherited>true</inherited>
<artifactId>maven-compiler-plugin</artifactId>
......@@ -473,7 +491,77 @@
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<jswarn>false</jswarn>
<force>true</force>
<suffix>.min</suffix>
<excludes>
<exclude>**/*.min.js</exclude>
<exclude>**/*.min.css</exclude>
</excludes>
<aggregations>
<aggregation>
<insertNewLine>true</insertNewLine>
<output>${project.build.directory}/${project.build.finalName}/html/js/genesys.js</output>
<includes>
<include>${basedir}/src/main/webapp/html/js/tab.js</include>
<include>${basedir}/src/main/webapp/html/js/crophub.js</include>
</includes>
</aggregation>
<aggregation>
<insertNewLine>true</insertNewLine>
<output>${project.build.directory}/${project.build.finalName}/html/js/genesys.min.js</output>
<includes>
<include>tab.min.js</include>
<include>crophub.min.js</include>
</includes>
</aggregation>
<aggregation>
<insertNewLine>true</insertNewLine>
<output>${project.build.directory}/${project.build.finalName}/html/css/genesys.css</output>
<includes>
<include>${basedir}/src/main/webapp/html/css/custom.css</include>
<include>${basedir}/src/main/webapp/html/css/responsive.css</include>
</includes>
</aggregation>
<aggregation>
<insertNewLine>true</insertNewLine>
<output>${project.build.directory}/${project.build.finalName}/html/css/genesys.min.css</output>
<includes>
<include>custom.min.css</include>
<include>responsive.min.css</include>
</includes>
</aggregation>
</aggregations>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>application.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>
<version>0.9.1</version>
......@@ -484,6 +572,7 @@
<url>https://www.croptrust.org</url>
</organization>
<scm>
<connection>scm:git:git@bitbucket.org:genesys2/genesys2-server.git</connection>
<url>git@bitbucket.org:genesys2/genesys2-server.git</url>
</scm>
<issueManagement>
......
......@@ -19,11 +19,18 @@ package org.genesys2.spring;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
public class AddStuffInterceptor implements HandlerInterceptor {
@Value("${build.name}")
private String buildName;
@Value("${build.revision}")
private String buildRevision;
@Override
public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3) throws Exception {
......@@ -41,6 +48,8 @@ public class AddStuffInterceptor implements HandlerInterceptor {
public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2) throws Exception {
long startTime = System.currentTimeMillis();
arg0.setAttribute("springStartTime", startTime);
arg0.setAttribute("buildName", buildName);
arg0.setAttribute("buildRevision", buildRevision);
return true;
}
......
......@@ -20,3 +20,6 @@ paginator.default.maxPage=4
#Admin
default.admin.email=admin@example.com
build.name=${project.artifactId}-${buildNumber}
build.revision=${buildNumber}
......@@ -13,10 +13,11 @@
<title><sitemesh:write property="title" /></title>
<!-- Bootstrap core CSS -->
<link href="<c:url value="/html/css/bootstrap.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/bootstrap.min.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/jquery-ui.min.css" />" rel="stylesheet" />
<!-- Custom styles for this template -->
<!-- <link href="<c:url value="/html/css/genesys.min.css" />" rel="stylesheet" /> -->
<link href="<c:url value="/html/css/custom.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/responsive.css" />" rel="stylesheet" />
<link href="<c:url value="/html/font/forza.css" />" rel="stylesheet" />
......
......@@ -25,6 +25,10 @@
<a href="<c:url value="/" />" class="pull-left"><img src="/html/images/logo_genesys_footer.png" alt="Genesys - Gateway to Genetic Resources" /></a>
<p class="pull-left"><spring:message code="footer.copyright-statement" /></p>
</div>
<div class="pull-right">
<div class="pull-left" style="text-align: right; color: #808080; font-family: monospace; font-size: 8px;"><spring:message code="page.rendertime" arguments="${springExecuteTime}" />
<br /><a target="_blank" href="https://bitbucket.org/genesys2/genesys2-server/commits/${buildRevision}">${buildName}</a></div>
</div>
</div>
</div>
......@@ -34,6 +38,7 @@
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="/html/js/jquery.min.js"></script>
<script type="text/javascript" src="/html/js/bootstrap.min.js"></script>
<!-- <script type="text/javascript" src="/html/js/genesys.min.js"></script> -->
<script type="text/javascript" src="/html/js/tab.js"></script>
<script type="text/javascript" src="/html/js/crophub.js"></script>
<script type="text/javascript">
......@@ -65,6 +70,3 @@
});
</script>
<!-- Processing time:
<div class="footer clearfix" style="font-size: 80%"><spring:message code="page.rendertime" arguments="${springExecuteTime}" /></div>
-->
......@@ -16,10 +16,11 @@
<title><sitemesh:write property="title" /></title>
<!-- Bootstrap core CSS -->
<link href="<c:url value="/html/css/bootstrap.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/bootstrap.min.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/jquery-ui.min.css" />" rel="stylesheet" />
<!-- Custom styles for this template -->
<!-- <link href="<c:url value="/html/css/genesys.min.css" />" rel="stylesheet" /> -->
<link href="<c:url value="/html/css/custom.css" />" rel="stylesheet" />
<link href="<c:url value="/html/css/responsive.css" />" rel="stylesheet" />
<link href="<c:url value="/html/font/forza.css" />" rel="stylesheet" />
......
......@@ -32,7 +32,7 @@
<c:if test="${cropList ne null and cropList.size() gt 0}">
<div class="content-block" id="crop-list">
<ul class="nav">
<li><a class="show" href="<c:url value="/acn/" />"><spring:message code="crop.all-crops" /></a></li>
<li><a class="show" href="<c:url value="/explore/" />"><spring:message code="crop.all-crops" /></a></li>
<c:forEach items="${cropList}" var="crop" varStatus="status">
<li><a class="show" href="/explore/c/${crop.shortName}"><c:out value="${crop.getName(pageContext.response.locale)}" /></a></li>
</c:forEach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment