Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
b43a071c
Commit
b43a071c
authored
Feb 06, 2014
by
Matija Obreza
Browse files
Included build number in footer.jsp, preparing for minified CSS and JS
parent
e55711f4
Changes
7
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
b43a071c
<?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>
...
...
@@ -43,8 +44,8 @@
<spring.security.oauth2.version>
1.0.5.RELEASE
</spring.security.oauth2.version>
<spring.data.core.version>
1.5.1.RELEASE
</spring.data.core.version>
<spring.data.jpa.version>
1.3.5.RELEASE
</spring.data.jpa.version>
<org.springframework.social-version>
1.0.3.RELEASE
</org.springframework.social-version>
<org.springframework.social-google-version>
1.0.0.M3
</org.springframework.social-google-version>
<org.springframework.social-version>
1.0.3.RELEASE
</org.springframework.social-version>
<org.springframework.social-google-version>
1.0.0.M3
</org.springframework.social-google-version>
<mysql.version>
5.1.25
</mysql.version>
...
...
@@ -69,25 +70,23 @@
<name>
ibiblio.mirrors
</name>
<url>
http://mirrors.ibiblio.org/pub/mirrors/maven2
</url>
</repository>
<repository>
<id>
spring-social-google
</id>
<name>
Spring Social Google
</name>
<url>
http://gabiaxel.github.io/maven/
</url>
</repository>
<repository>
<id>
sonatype-oss
</id>
<url>
https://oss.sonatype.org/content/groups/public
</url>
</repository>
<repository>
<id>
releases
</id>
<name>
Releases
</name>
<url>
https://oss.sonatype.org/content/repositories/releases
</url>
</repository>
<!-- <repository>
<id>sonatype mirror</id>
<url>http://search.maven.org/remotecontent?filepath=</url>
</repository> -->
<repository>
<id>
spring-social-google
</id>
<name>
Spring Social Google
</name>
<url>
http://gabiaxel.github.io/maven/
</url>
</repository>
<repository>
<id>
sonatype-oss
</id>
<url>
https://oss.sonatype.org/content/groups/public
</url>
</repository>
<repository>
<id>
releases
</id>
<name>
Releases
</name>
<url>
https://oss.sonatype.org/content/repositories/releases
</url>
</repository>
<!-- <repository> <id>sonatype mirror</id> <url>http://search.maven.org/remotecontent?filepath=</url>
</repository> -->
</repositories>
<dependencies>
...
...
@@ -259,61 +258,61 @@
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.social
</groupId>
<artifactId>
spring-social-google
</artifactId>
<version>
${org.springframework.social-google-version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.social
</groupId>
<artifactId>
spring-social-web
</artifactId>
<version>
${org.springframework.social-version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.social
</groupId>
<artifactId>
spring-social-core
</artifactId>
<version>
${org.springframework.social-version}
</version>
</dependency>
<dependency>
<groupId>
com.google.oauth-client
</groupId>
<artifactId>
google-oauth-client-servlet
</artifactId>
<version>
1.17.0-rc
</version>
</dependency>
<dependency>
<groupId>
com.googlecode.googleplus
</groupId>
<artifactId>
google-plus-java-api
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-core-asl
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-mapper-asl
</artifactId>
</exclusion>
</exclusions>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.google.api.client
</groupId>
<artifactId>
google-api-client
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-core-asl
</artifactId>
</exclusion>
</exclusions>
<version>
1.3.1-alpha
</version>
</dependency>
<!-- Hibernate dependencies -->
<dependency>
<groupId>
org.springframework.social
</groupId>
<artifactId>
spring-social-google
</artifactId>
<version>
${org.springframework.social-google-version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.social
</groupId>
<artifactId>
spring-social-web
</artifactId>
<version>
${org.springframework.social-version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.social
</groupId>
<artifactId>
spring-social-core
</artifactId>
<version>
${org.springframework.social-version}
</version>
</dependency>
<dependency>
<groupId>
com.google.oauth-client
</groupId>
<artifactId>
google-oauth-client-servlet
</artifactId>
<version>
1.17.0-rc
</version>
</dependency>
<dependency>
<groupId>
com.googlecode.googleplus
</groupId>
<artifactId>
google-plus-java-api
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-core-asl
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-mapper-asl
</artifactId>
</exclusion>
</exclusions>
<version>
0.0.1-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.google.api.client
</groupId>
<artifactId>
google-api-client
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-core-asl
</artifactId>
</exclusion>
</exclusions>
<version>
1.3.1-alpha
</version>
</dependency>
<!-- Hibernate dependencies -->
<dependency>
<groupId>
org.hibernate
</groupId>
<artifactId>
hibernate-core
</artifactId>
...
...
@@ -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 -->
...
...
@@ -423,26 +422,26 @@
<artifactId>
commons-collections4
</artifactId>
<version>
4.0
</version>
</dependency>
<dependency>
<groupId>
javax.mail
</groupId>
<artifactId>
mail
</artifactId>
<version>
1.5.0-b01
</version>
</dependency>
<dependency>
<groupId>
com.github.fernandospr
</groupId>
<artifactId>
javapns-jdk16
</artifactId>
<version>
2.2.1
</version>
</dependency>
<dependency>
<groupId>
com.google.api-client
</groupId>
<artifactId>
google-api-client
</artifactId>
<version>
1.17.0-rc
</version>
</dependency>
<dependency>
<groupId>
org.apache.velocity
</groupId>
<artifactId>
velocity
</artifactId>
<version>
1.7
</version>
</dependency>
<dependency>
<groupId>
javax.mail
</groupId>
<artifactId>
mail
</artifactId>
<version>
1.5.0-b01
</version>
</dependency>
<dependency>
<groupId>
com.github.fernandospr
</groupId>
<artifactId>
javapns-jdk16
</artifactId>
<version>
2.2.1
</version>
</dependency>
<dependency>
<groupId>
com.google.api-client
</groupId>
<artifactId>
google-api-client
</artifactId>
<version>
1.17.0-rc
</version>
</dependency>
<dependency>
<groupId>
org.apache.velocity
</groupId>
<artifactId>
velocity
</artifactId>
<version>
1.7
</version>
</dependency>
</dependencies>
<build>
...
...
@@ -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>
...
...
src/main/java/org/genesys2/spring/AddStuffInterceptor.java
View file @
b43a071c
...
...
@@ -19,10 +19,17 @@ 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
;
}
...
...
src/main/resources/application.properties
View file @
b43a071c
...
...
@@ -19,4 +19,7 @@ paginator.default.fastStep=3
paginator.default.maxPage
=
4
#Admin
default.admin.email
=
admin@example.com
\ No newline at end of file
default.admin.email
=
admin@example.com
build.name
=
${project.artifactId}-${buildNumber}
build.revision
=
${buildNumber}
src/main/webapp/WEB-INF/decorator/entry.jsp
View file @
b43a071c
...
...
@@ -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"
/>
...
...
src/main/webapp/WEB-INF/decorator/footer.jsp
View file @
b43a071c
...
...
@@ -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>
-->
src/main/webapp/WEB-INF/decorator/main.jsp
View file @
b43a071c
...
...
@@ -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"
/>
...
...
src/main/webapp/WEB-INF/jsp/index.jsp
View file @
b43a071c
...
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment